Wiki

Clone wiki

AspectFaces / Home

Aspect Faces is Java-based universal transformation tool, which based on meta-model built from data model inspection performs static or dynamic (runtime) integration of multiple aspects into a single output. By aspects are meant for example class properties, their names, data types, internationalization, components to present the data, security policy, layouts, validation rules etc. and all these faces can be described separately. Using meta-model, Aspect Faces integrates them together into textual output such as XML-based files, Java source files etc. The processing is built on text manipulation where are placed some expressions in common Unified Expression Language. With a benefit of the component-oriented description of all captured facets, Aspect Faces are able to significantly reduce the amount of manually created application source code because it is enough to describe each aspect just once. Then the combination can be automated. Without this approach developers often duplicate a large amount of code to acquire the desired behavior which there can be acquired with a simple parametrization of processed components.

Aspect Faces provides both static and dynamic integration of all given aspects. Since the dynamic approach is much more efficient and convenient, it is also much harder to implement. By now, the users are able to statically generate the output code in many textual languages, but this approach is based on a generation of output for all possible variations of aspects. On the other hand, the dynamic approach with lazy inspection is more developer-friendly but it is also much harder to integrate with a target technology. So far, Aspect Faces provides dynamic integration only with JavaServer Faces 2.0+, but there is hard work on integration with also other technologies such as React AFReact, AngularJS (AFAngular2 form-model-generation) or Swing AFSwinx.

Features

  • Automated UI generation (Forms/Tables) based on code inspection
  • Separation of concerns into independent components (Aspect Oriented Programming)
  • Runtime concern weaving -> context-aware UI
  • Single focal point of information (method READ: RichEntity Aspect/Audit Design)
  • Separate definitions of individual concerns: Data binding, Presentations, Layout, Security, Validation, Conditionals, ...
  • Support for concern profiles (may differ per usage or even per user)
  • Configuration by exception

Benefits

  • Reduction of development and maintenance efforts
  • Significant reduction of source code duplication
  • UI load performance equivalent to vanilla JSF
  • Support for layouts, security, and validation
  • Single focal point of information

Getting Started: Demo

Feel free to try out our demo. You may want to check out the source code. It's surprisingly simple!

Getting Started: Guide

To get started with Aspect Faces, we recommend you to follow our Guide to understand how is Aspect Faces designed, how to attach it to your project and how to efficiently use it.

  1. Intent-and-motivation
  2. Installation
  3. Usage
  4. Type Mapping
  5. UI Widgets
  6. Layouts
  7. Model Annotations
    1. Aspect Faces Context
    2. Profiles and Security
    3. Field Wrapping
    4. @UiUse and @UiType
    5. Field Ordering
    6. Multiple instances
  8. Static Weaving

Getting Started: Showcase

To see the full power of Aspect Faces feel free to check out our showcase at http://showcase.aspectfaces.com/. It describes a lot of possibilities and configuration variants to get use the framework in a way you need.

Compatibility

Integrable with third-party libraries: Drools, Picket link, Spring Security, ... Java-friendly: Java EE 6, Spring, J2EE compatible Dynamic on-demand integration for JavaServer Faces 2 Compatibility with all sorts of JavaServer Faces components: RichFaces, ICEFaces, PrimeFaces, Tomahawk, ... Known Issues By now, Aspect Faces supports only Mojarra implementation of JavaServer Faces 2+. MyFaces are not supported yet.

Known Issues

By now, Aspect Faces supports only Mojarra implementation of JavaServer Faces 2+. MyFaces are not supported yet.

Contribution

If you would like to contribute to this project and help us to move faster, do not hesitate and visit our issue tracking and repository or contact us.

Facts view

Standard approach AspectFaces approach
Restating and enhancing information from lower layers Aspect-driven approach
Many cross-cutting concerns in one place Inspection-based approach
Strong coupling among security, presentation, data and conditionals Generative approach
Fragment duplication to capture different presentations and layouts No information duplication
Error-prone and tedious work Separate definitions of individual concerns
Lots of tiny details that must reflect the underlying data data-binding, presentations, layout, security, conditionals..
Every data model change impacts UI Runtime weaving process
Lack of reuse Integration with existing code
Often must make a copy of a UI code Integration with third party
Hard to capture and adjust to runtime conditions Direct support for adaptive user interfaces with minimized costs
Painful and inefficient support for adaptive user interfaces Template extensions to Widgets
Time consuming and expensive development Full customization of the result
Automated client-side user input validation
RichFaces, ICEFaces, PrimeFaces, Tomahawk, ADF, etc.
Custom form layouts
Generation profiles (read-only, edit, search)
Role base access control or third party access control (Drools, Picket link, Spring Security)
Reasonable development cost and time reduction
Java EE compatible
much more...

Updated