Discussions

News: OpenXava 3.1.2: AJAX applications from JPA entities

  1. OpenXava 3.1.2, released recently, is a model-driven framework to develop Java Enterprise applications in an agile way: With OpenXava you provide only your POJOs annotated with JPA and you obtain an AJAX application ready for production. The main new feature of this 3.1.2 release is the support for view inheritance. Although OpenXava generates a workable user interface from your naked JPA entities, you have the option to refine the produced user interface using the @View annotation. Just in this way: @Entity @View(name="WithSections", members = "name, sex;" + "mainLanguage;" + "experiences { experiences }" ) public class Programmer { Since version 3.1.2 you can defined a view extending an existing one. For example, you can reuse the WithSections view in a child class of Programmer: @Entity @View(name="WithSections", extendsView="super.WithSections", members = "favouriteFramework;" + "frameworks { frameworks }" ) public class JavaProgrammer extends Programmer { As you can see, the way to extends a view of the superclass is using the super prefix for extendsView. In this case the WithSections view of the JavaProgrammer entity will have all the members of the WithSections view of Programmer entity plus its own ones. Look the aspect of WithSections view of JavaProgrammer. You can learn more about this new feature in the OX wiki. Moreover, OpenXava 3.1.2 has a lot of new features and fixes, including the translation of the reference guide to Russian, and the new @OnSelectElementAction annotation for collections. What do you think about generating the full application from JPA entities? Do you like the @View annotation? What do you think about the 'view inheritance' new feature? More info: http://www.openxava.org/
  2. This is the best description of OpenXava I could find on the OpenXava site: http://today.java.net/pub/a/today/2008/06/24/automatic-user-interface-with-openxava.html . It's amazing to me how difficult many projects make it for the interested to get a meaningful overview in a reasonable time frame. Annotation-based, 'automatic' RAD-Web-interfaces seem to be the current trend. I wonder how far you can go with annotation-base programming, which and how many annotations make sense.
  3. which is at least part of what openxava is doing. i like the idea of using annotations to mask out a "remote interface" on your classes for ajax calls. seems like there's some similar architectural ideas in Adobe Flex, put to good use. generating the entire view from the model, on the other hand, might be losing sight of why we separate presentation from data in the first place. seems like it could create some pressure to structure the model to suit a specific view, which would then create a barrier to later abstraction as your application grows. i'd also be interested to know how you can express workflow concepts in OpenXava. For example, views personalized to a user's role. of course, these are pretty abstract concerns and maybe there are obvious answers. openxava looks like a really interesting idea.
  4. might be losing sight of why we separate presentation from data in the first place.
    With OpenXava annotation you define you preferred way to display your objects in an abstract way, but it does not contain any implementation detail about user interface, it's just abstract. It's the user interface generator that interpret it creating a suitable user interface. By now, OX generates AJAX application that can run inside a Java portal, but other UI generatos, such as JavaFX, FLEX or Mobile devices, can be developed. So, your application would have another user interface without touching a single line of your source code.
    seems like it could create some pressure to structure the model to suit a specific view, which would then create a barrier to later abstraction as your application grows.
    You can define several views for the same entity. Moreover, you always have the option of creating a handmade view.
    i'd also be interested to know how you can express workflow concepts in OpenXava. For example, views personalized to a user's role.
    For this case, a common solution is to define a view for each user role, and generate a module (a module produces a portlet) for each view. Then, using the portal security, the administrator can assign the modules to the roles, groups, etc.
  5. I wonder how far you can go with annotation-base programming, which and how many annotations make sense.
    The question is not about annotations, but about Business Component concept. The first point is to put all the stuff about the same business concept in the same place, thus when the developer has to change the structure and business logic he need to touch a reduced number of files (one for business concept). The second point is to generate automatically all the possible stuff, in this way, the business component (a Java class in OX case) has more declarations and less programming. An example of the above idea is JPA. With JPA you put inside your entity info about database access, but it's a declarative info, the real database access is done automatically by the JPA engine. You have two advantage, you only have to touch one file (the JPA entity) for change structure (you do not need to touch external XMLs, or rewrite DAO objects), and you do not need to write database access code. OpenXava extends this idea to user interface. This is very practical if you changes your model frequently. In OpenXava for adding a new property to an entity, just add the property to the entity, run the application and see the change. You touch only one file. How many files do you need to touch to do the same with your favourite framework?