Blog do projektu Open Source JavaHotel

niedziela, 24 marca 2013

MVC (MVP) framework, the show must go on

MVP framewok
I created the next version of Jython/GWT MVC framework. But I would rather call it following MVP (not MVC) framework. Current demo version (Google App Engine implementation) is available here. The demo was also tested with Tomcat and Glassfish. Prerequisite: Derby database (should be available somewhere in tha class path). Instruction how to setup Eclipse project is available here. Pom.xml file (maven) will be provided later. Current state of art is described here.

General description
The general structure is presented below :

  • VIEW part. Based on GWT. Consisting of two packages. GWT UI and Jython UI. Creates UI components and interacts with PRESENTER via server Java code.
  • DTO (Data Transient Objects). Transfers data between client (browser) side and server side. It is simple Java maps and lists of maps (as rows). Java shared (shared between GWT and server code) code (the same for application data and XML metadata) is available here.
  • Server side Java code. Receiver of GWT RPC calls. Adapter between client (browser) side and PRESENTER Jython code. Transform Java maps and list to Jython data structures (dictionary and sequences) and vice versa. Source code.
  • MODEL. Jython dictionaries and sequences of dictionaries (rows). Carriers of data between application code and VIEW part. 
  • PRESENTER. Jython code, application logic. Responses to the client action, sends data to background database and extracts data. Sample application code.
  • XML metadata. Is used by VIEW to create UI widgets and objects. Sample data is available here.
Features implemented so far
  • Reading lists in pages (chunks). It is necessary for big lists (of course - it depends what one means by "big").
  • Alert and error windows messages.
  • Simple data validation at the client side (more complicated validation should be performed at the application-Jython code).
  • Additional UI widgets: date and time picker, rich text format, mulitline editing.
  • Confirmation for add/delete/change CRUD actions.
  • Custom helpers, also "select" tag.
GUI testing (additionally to JUnit tests). GUI testing is performed by Selenium extension to BoaTester. The 'selenium' best test cases are available here

Next step
Next step is to implement security: authorization and authentication. I plan to use Apache Shiro. It is simple and seems to cover all topic necessary here.

Brak komentarzy:

Prześlij komentarz