5 Replies Latest reply on May 29, 2010 1:02 AM by dan.j.allen

    Seam Application Framework

    cjalmeida

      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 :)

        • 1. Re: Seam Application Framework
          yahawari

          maybe also provide a default way for picking One-To-Many and Many-To-One. current seam-gen navigates away from the page (losing most of the values the user had in the).

          • 2. Re: Seam Application Framework
            clerum

            To me this is a lacking in Richfaces. There really needs to be a slick component for making ManyToOne Assocations

            • 3. Re: Seam Application Framework
              greggilles

              I've been reading the development meeting minutes and checking the project status page, but I've seen nothing regarding the Application Framework.  The Framework, along with Seam-Gen were two key reasons for originally choosing Seam. 


              Can someone confirm that this will be part of the Seam 3.0 release, or point me to this information if I've missed it somewhere?  Just want to make sure these won't be dropped.

              • 4. Re: Seam Application Framework
                nickarls

                It's in.

                • 5. Re: Seam Application Framework
                  dan.j.allen

                  Greg, rest assured it will be in. We are just drowning at the moment in things to do trying to get all the modules started and on a consistent path. The application framework is important not only for rapid development for web pages, but also for REST, so there is definitely motivation to get it going. So it's going to ramp up very soon.