[ANNOUNCE] Automate JSF Data presentation with AspectFaces

Community Driven Extensions Project
Post Reply
tomce
Posts: 2
Joined: 18 Mar 2014, 20:35

18 Mar 2014, 20:36

Hello folks,

I would like to share with you our open-source project AspectFaces. We recently presented it at JBoss DevConf http://youtu.be/aTLoxlfKOjY?t=1s

The idea is to generate user interface for data presentation at runtime with Aspect-oriented approach. Your UI presentation adapts to entity classes that you expose at your UI page.
Basically instead of writing forms/tables all you need to do is to pass your instance to a custom component. Such as: <af:ui instance="#{bean.entity}" edit="true"/>
Based on the entity, its fields, annotations (JPA, Beans Validation, Hibernate Validation, etc.) or the application context you can define generic rules how to present data fields in the user interface.
The generic concept allows you to reuse there rules among different data. A particular field presentation is described through a template concept. In such template can be integrated any kind of information or concern (validation, security, etc). Furthermore, templates are resolved towards the data class field names, their properties a constrains as well as towards the application runtime context (EL) - thus avoid errors introduced by human factor, reduces restated information and separates concerns (each concern can be defines separately). It also gives you an option to use XLST-like layouts. Since all the UI is generated at runtime, it is possible to combine various layouts, presentations, validations, security and maintain it only at a single location.

In our production Java EE 6 we only need 28 mapping rules to present (currently) more than 90 entities in the UI! We get the same performance as with pure JSF, we support different screen sizes (as various layouts can be be integrated to present the same data).
But most importantly in a study presented at ACM ACR (http://dl.acm.org/citation.cfm?id=2577561 page 53 http://www.sigapp.org/acr/Issues/V13.4/ ... 4-2013.pdf)
It presents large UI CODE-REDUCTION! We reduced 21 thousand Lines of code from the total UI code of 60 thousand LOC. Which gives us reduction around 30% of the UI code that you would normally need to maintain by hand. At the same time it reduces most of the restatements in the UI linking the application data entities.

We will be happy for your feedback and contribution.
Find live examples, documentation, git, maven repo and JIRA at
aspectfaces.com

Its free, its open, its in production!

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

20 Mar 2014, 09:20

Hi,

This is definitive interesting. But

- JSF is standard. Most people don't want to learn another non-standard language to develop JEE based web apps
- The coding UI on Java side and automatically UI generation haven't success until now. Think about GWT for example.
- How does it look for complex custom forms and custom components with JavaScript interactions, animations, etc.?
- What is about if we don't have JPA entities und use web services? Does it work too?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

28 Mar 2014, 14:42

I approach this, using Entity Beans for example, using custom annotations that are used to generate UIComponent trees automatically.
Because I use a dialog configuration class which is mapped to corresponding POJOs on a property basis and can use several of these classes for different sections of a dialog it is possible to easily build complex dialogs with full functionality.

The annotations are currently hand crafted as the processing implementations cannot be done automatically anyway and there is no requirement for complete JSF coverage, this means that extensions are done according to project demands.

Most of the actual magic is left to EL expressions to reference things, a decision which was easy to make because the existing JSF "glue" is all that is needed.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests