5 Replies Latest reply on May 29, 2010 1:02 AM by Dan Allen

    Seam Application Framework

    Cloves Almeida Newbie

      Seam Application Framework


      Hi all. I've seen from modules list that an application framework is planned. Not much detail is given, but I'd like to give a few suggestions.


      It should be targeted at building ERP like applications, which means:




      • stimulate very consistent GUIs.

      • CRUD like functionality should be dead-simple to implement.

      • Business process management and monitoring should be integrated.

      • Developer should be encouraged to implement features in a very modular fashion (think OSGi, but simpler)

      • A lot of smart convention over configuration very common features like login, entity search, entity list, process start, process resume, etc.





      One of the best open source framework that I know to provide such functionality is OpenERP (http://doc.openerp.com/), in Python. But they have some caveats like having to maintain a custom ORM, a (sub-par) workflow engine, and close to no testing code.


      The GUI part could be implemented using a smart JSF template and a tweaked version of Metawidget. One could provided default list/tree/form views for beans. There would be declarative ways to add things like menu items and action buttons to forms. For example, the following bean:




      @Entity
      public class Person {
           @Id
           private Long id;
           
           private String name;
           
           @OneToMany
           private Set<Person> children;
      }




      would have a corresponding Person.view.xml file:


      <entity type="com.myapp.Person">
          <form>
              <property name="name"/>
              <property name="children" />
          </form>
          <list>
              <property name="name"/>
          </list>
      </entity>





      And anywhere a form view of Person is required, it would render the name as textbox and the child as the list version of Person (default for Set).


      For modularity, IMO, runtime activation like OSGi is not needed. The current CDI spec, with Decorators an such does the job. What is needed is an easy way to create a module, something along the lines of seam-gen. For instance:



      $ seam-app-framework create-project "MyProject" ./MyProject
      ...
      $ seam-app-framework create-module "MyModule" ./MyModule
      ...
      $ cd ./MyProject
      $ seam-app-framework link-module ../MyModule
      $ seam-app-framework archive




      (it would build a MyModule.jar and integrate into MyProject.ear archive)


      As for BPM, just integrating Drools Flow or jBPM as planned, and provide a few built-in services like a task list viewer, admin view of all process, etc. What is most important is to encourage the developer to use the functionality instead of implementing their own using the CRUD functionality.


      That's my 2cents. Some might think of it too narrow-minded but think that maintaing and developing such systems is what most developers do for a living :)