1 Reply Latest reply on Apr 1, 2014 12:39 AM by Brian Leathem

    [ANNOUNCE] Automate JSF Data presentation with AspectFaces

    Tomas Cerny Novice

      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/ACR-13-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



      Its free, its open, its in production!