- 1 Introduction
- 2 Background
- 3 Scope
- 4 Description
- 5 Relationship with other Eclipse-based Projects
- 6 Organization
- 7 Tentative Plan
The goal of the proposed Texo project is to provide model and template driven development technology for web application development projects. Texo will be based on and use components currently present in the Eclipse Modeling Framework (EMF) and Eclipse Modeling Framework Technology (EMFT) projects. Texo is a proposed open source component in the Eclipse Modeling Framework Technology (EMFT) project.
This proposal is in the Project Proposal Phase (as defined in the Eclipse Development Process document) and is written to declare its intent and scope. This proposal is written to solicit additional participation and input from the Eclipse community. You are invited to comment on and/or join the component. Please send all feedback to the eclipse.technology.emft newsgroup (please prefix the subject with [texo]).
Although EMF is very popular in RCP and Eclipse tool development environments, it is largely unknown in the web application development world. This eventhough web application development projects can benefit greatly from template and model-driven techniques such as provided by the Eclipse Modeling Framework. Model and template driven generation techniques are especially usefull for data-driven web applications. In this environment standard templates for common web-ui constructs (e.g. file-upload, one-to-many editing etc.) can result in large productivity gains in the development phase and increase the quality of the developed solution. In addition, runtime availability of the domain model (like EMF provides) is very usefull in a web application for supporting common tasks such as import/export and security and tracking and tracing.
The Texo project will provide web application development teams with EMF-like functionality. The solution is targeted to small as well as larger teams. Smaller teams can benefit from the availability of high-quality and function-rich templates, larger teams can benefit from the extendability of the proposed solution.
The solution should be complete in that it should support generation of most (if not all) artifacts which are relevant for a web application project: java beans, ui-backing beans, property files, configuration files, navigation definitions etc. Next to delivering a focused toolset to support artifact generation, the solution will provide a set of high-quality, function-rich templates for common web application constructs. These templates can be overridden and extended by users of the solution.
The initial scope of the Texo project is to provide generation functionality for the following artifact types:
- Java Bean classes: annotated pojos which are specifically annotated for different target platforms (for example Spring)
- UI backing beans: in the web app environment views are typically backed by a backing bean which provides access to the model and handle ui-specific actions. Initially the focus will be on backing beans for JSF
- Bean configuration: web frameworks offer different ways of configuring backing and model beans, the solution will initially support JSF
- I18n support: generation of property files for i18n of labels, possibly resource backing beans to provide labels for specific web frameworks
- Page flow: JSF provides a navigation model, also Spring Web Flow and other frameworks have their own navigation model, initially the focus will be on supporting the generation of JSF navigation definitions.
- Web Page: generation of JSF web pages using macro templates for complete web pages and micro templates for generating ui-code for specific efeatures covering for example one-to-many editing, many-to-one, primitive list types, primitive type editing, etc.
Initially the solution will focus on application generation for JSF (with Ajax components) environments with Facelets and Spring/Seam as target server side frameworks.
In a later phase the following topics are covered:
- Extend UI component support: within another initiative, the Presentation Modeling Framework, a ui-model for standard dialogs and ui-use-cases is being developed. Texo will build further upon this standard ui-model and provide an implementation specific for JSF web application environments.
- Generation of test cases: test cases and a test-driven approach are an important part of any development project. However developing testcases is often considered to be tedious work by many developers. A solution which can also automatically generate test cases or at least skeletons for test cases will make it much easier for web developers to adopt a test-driven approach and will result in higher quality and more robust web applications.
- Merging of generated and manually edited artifacts: merging of generated and manually edited artifacts is important for supporting an incremental development scenario. The solution will use JMerge for java code merging. Many generated artifacts (jsf, configuration files) are however expressed in xml. There are currently no solutions for automatic merging of generated xml pages. This topic will therefore require more study and will be covered in a later phase. Also merging of property files will be handled in a later phase.
The use scenario of the solution: the user of the solution starts from an ecore model. The ecore model can be enriched with additional jpa and ui annotations. By right-clicking on an ecore model and selecting a Texo menu option a separate view opens which shows the epackages and eclasses in a tree structure. When right-clicking on an eclass the user can select from the available (i.e. registered) generation workflows and generate a set of artifacts for that eclass (and its ui/jpa annotations) using the selected workflow. On project level it is possible to define some common generation properties, for example target project.
The solution consists of the following parts:
- (UI) Annotations
- Templates for java beans, JSF pages, etc.
- Runtime layer
Annotations play an important role in the solution. The solution will define a set of ui annotations which can be used on model level. The ui annotations will control how model elements are translated to ui dialogs. An example of a ui annotation is the @Password which tags a String EFeature of being a password field which needs to be displayed/edited in a specific way, other annotations are for example @File for fileupload, @Text(lines=2) to denote a text box instead of a single line string, etc.
In addition Texo will support standard annotation definitions such as jpa and other framework specific annotation sets.
The current ui-annotation model can be found here.
Templates are an important part of the solution as they should implement best-practices for web application development. Templates define the usability of the solution. See the artifact types above for a list of the template types which will be provided. Templates are initially developed using the m2t XPand language. The user can override templates and work flow definitions using the XPand and MWE aspect oriented techniques. In addition it will be possible to extend the artifact generation tooling with own templates and work flows. This extendability will be supported through extension points and through scanning of current development projects for template and work flow definitions. This is similar to how current EMF works.
The solution will make use of the Teneo project to generate jpa annotations in the source code. The generated jpa code will be fully standards compliant. This means that the generated annotated pojos can be used in any jpa enabled environment.
At runtime there will also be support for a model-driven development philosophy. At runtime the domain model will be provided using an in-memory representation (provided by EMF). For example it will be possible to identify the EClass for a specific pojo and instantiate a pojo using the EClass. The runtime support will also include (de-)serialization for xmi/xml.
The tooling will mainly support easy selection of an eclass and generating artifacts for the selected eclass. In addition the tooling will support extendability of templates and work flows.
Styling is an important topic in a web application. The solution should generate web applications which are nice to look at. The user should want to use and demo the generated web application right from the start. Styling is covered in the templates.
The solution will be developed using the following main principles:
- Simple, low cost of entry: the solution should be simple to use and users should not require an extensive modeling background, it should be possible to create a model and generate a fully working app in less than 10 minutes.
- Generate standard code/artifacts: the generated code and artifacts should conform as much as possible to the standard way-of-working in the target environments.
- No framework, generate!: the runtime part of the solution should be as small as possible, the focus is on generating artifacts not on replacing them by additional frameworks. The only exception is runtime support for in-memory models which is often not supplied by web frameworks.
- Generate a good-looking directly usable app: the goal of the solution is to generate web applications which users want to use and demo right out-of-the-box.
Relationship with other Eclipse-based Projects
Texo will build upon and make use of the following Eclipse projects/components:
- EMF: ecore, jmerge and xmi serialization
- Ecore Tools project: maintenance of ecore models and code generation integration
- M2T - XPAND: templates and artifact generation
- MWE: for artifact generation workflow
- Teneo: model to jpa persistence generation
In addition the generated artifacts will be maintainable using tools provided by the following Eclipse projects:
- Martin Taal
Code will be completely new, based on current experience with code generation in web application environments.
- Ed Merks, IBM
- Jim van Dam, Hipes
- Dimitar Giormov, SAP
- April/May 2008: proposal
- June 2008: pojo/backing bean generation, initial tooling
- July 2008: templates for standard UI components, JSF page and navigation generation
- September 2008: first fully functional and public release, incl property files and configuration file generation