Académique Documents
Professionnel Documents
Culture Documents
Give you confidence about using Web Experience Factory (WEF) on real projects, small or large Answer questions you may have about how your team works with the WEF framework Provide pointers and short demos for features you should get to know Provide tips for how you can leverage the complete WEF toolkit to get the maximum benefit in terms of:
Rapid development Best practice implementation and high quality code that performs well Automating and enforcing your development standards and practices Good team development practices
IBM Corporation
Agenda
Background - Why WEF Key resources and getting started Developing user interfaces for desktop or mobile/multi-channel Developing services and data access Team development Testing, debugging, and performance Tailoring the automation framework
IBM Corporation
How to do more with less? How can I support delivery to a wide range of devices? How do I enable new team members quickly? How do I ensure code quality and enforce standards?
IBM Corporation
Web Experience Factory uses a model-based code generation approach to boost productivity and address those challenges Faster time-to-market and cheaper solution delivery Improved end-user experience for desktop and mobile devices Easier integration with existing technology investments Increased solution flexibility
Easier and faster than traditional coding to develop exceptional web experiences
2012 IBM Corporation
WEF features a model-based development approach using builders A builder is a tool with a wizard-like configuration UI that automates a design pattern, generating all the necessary application code and artifacts Builders are combined in a model and edited using the Web Experience Factory graphical Designer IDE Application code Web Experience Factory code generation engine Model
Builder 1 Builder 2 Etc.
Agenda
Background - Why WEF Key resources and getting started Developing user interfaces for desktop or mobile/multi-channel Developing services and data access Team development Testing, debugging, and performance Tailoring the automation framework
Let's start by making sure you know where you can get information and help:
Web resources and community Training IBM services and business partners IBM Support
The WEF wiki is the key place where the WEF team publishes information and samples It's our direct path to get material out to our development community, easily and quickly Key wiki pages to visit:
Samples directory see the new categorized directory of over 100 samples! Getting started videos short videos to show concepts and see how WEF works Learning Web Experience Factory page has links to key resources for all sorts of tasks Product documentation all versions, and it's editable
Product documentation
developerWorks forum
This forum is closely monitored by the WEF team Go here to look for solutions to questions, or to post a question
developerWorks community
Includes blogs from the WEF team
New in WEF 8.0: Feeds to the forum and the community blogs are available right from the IDE
Training it's a great idea to start with some training, so you get a good introduction to a range of WEF skills
Training is available from IBM and from business partners 2-5 day classes are available Classes are available for introductory, advanced, and mobile/multi-channel topics Training can be remote or on site
Services bringing in WEF experts can be a great way to deliver a project quickly and to help build in-house skills
IBM Software Services for Collaboration IBM Global Business Services Business partners
IBM Support
Use this for problem reports
14
Install and get up and running Get to know the Designer IDE Learn the edit/test cycle Learn how to download and explore samples Get comfortable with the model-based code generation paradigm Understand what's easy with WEF, what's harder
Install is dead simple install with provided Eclipse or into RAD For the simplest quick start, use all the defaults, including WAS CE test server If you have Portal installed, it's easy to configure Publish to point to your Portal server Start by making a project that includes the Building Models samples, to make sure your test server is configured correctly For Portal testing, publish a test portlet and put it on a page A local test server is usually preferred, but remote (with auto-deploy) can work very well also with HTTP update mode
Icons for Add Builder, Regen Model Builder list for this model Problems view (ignore at your peril)
Tabs to switch between Source, Design, Model XML, and Builder Call Editor views
17
Source View shows generated Java, JSP, schemas, etc. Model XML View shows the XML for model file for each builder used Application Tree shows a tree of all the generated WebApp elements (Pages, Methods, Events, Schemas, Variables, Linked Java Objects, Data Services, etc.)
When you first configure a server, you publish your project to the server After that, any edited files are automatically copied over to the server where they can be tested immediately
You don't need to re-publish the project in order to test most changes
There are over 100 valuable samples available on the WEF wiki, showing a wide variety of techniques Learn how to download/install these samples, and try some out! To install a sample (.pkg or .zip): Right-click on project, Import, Web Experience Factory Archive Creating an archive to share code is also simple right-click on project and Export, Web Experience Factory Archive
Run
The builders in a model generate the code of the application Many builders create application elements
E.g., the View & Form builder creates multiple pages with all the supporting code
Some builders bring in external or custom code and inject it into the application
E.g., Linked Java Object builder, Client JavaScript builder, Imported Page
You can think of a model-based application as being generated from four main parts:
2. Templates and configuration files that control code generation (themes, RDD libraries, HTML templates, etc.)
1. Model
- Builder Calls that generate the main application - Builder Calls that customize and enhance the application
Generated application
3. Supplemental code and artifacts such as Java classes, JS files, custom HTML
23
Does the productivity boost of using WEF to build an application depend on the characteristics of the application? Yes. For UI development, the biggest productivity boost is for screens where the UI pattern is supported by one of the high-level builders of WEF
This includes data grids, views, input forms, simple or complex lists, and many other UI patterns
Agenda
Background - Why WEF Key resources and getting started Developing user interfaces for desktop or mobile/multi-channel Developing services and data access Team development Testing, debugging, and performance Tailoring the automation framework
The Page Automation framework within WEF does the work of generating UI from schema-typed data All the UI code is generated based on the fields in the schema There's a rich set of tools that let you control and customize the generated UI
Schema Views and forms
Base page the template with placeholders where data and generated elements will be placed Data the Page Automation elements generated from schema, including layout, rich behavior, backing code Added elements added by builders (Link, HTML, Image, Text, etc.)
Search form data section Display data section, with paging controls Text added at placeholder location Buttons added at placeholder locations by high-level builder or with Button builder
From a single Data Field Settings builder, you can easily control the appearance and behavior of all the fields in an application Automatically reference a shared library of Rich Data Definitions
A Dojo library is provided, and libraries can be customized to meet your standards
For each field, you can control labels, visibility, column sorting, validation, field type (drop-down, checkbox, rich text editor, date picker, etc.), and more Generated page
Example: Portlet Adapter + Service Consumer + View & Form + Data Field Settings + Theme + Data Layout + Custom HTML
Dynamic profiling is used to generate multiple application variations from a single source model Variations can be tied to user groups or other attributes
For different customers, partners, roles, regions, etc. For different device types desktop vs. smartphone, for example
Any aspect of application can be varied by profile: look and feel, level of functionality, services, logic, etc.
Profiles can generate many application variations from one source model
Profiles
Regions Roles
Profiles Sale VP Profiles Sales Sale VP Manager Sales Rep Sales Manager Sales Rep
Application Instances
Source model
Agenda
Background - Why WEF Key resources and getting started Developing user interfaces for desktop or mobile/multi-channel Developing services and data access Team development Testing, debugging, and performance Tailoring the automation framework
You can transform data from your back end schema into a UI-friendly schema that's nice to work with on the UI side Data access and transformation is done in a service provider model, separate from the UI or service consumer layer This provider/consumer model architecture has these benefits:
Independently develop back end and presentation layers Automatic support for service testing Develop UI model without any back end access, using a stub provider Reuse service models in multiple presentation models
Generated application
Using the builders for accessing your back end data (whatever it is) Creating and using schemas and mapping/transforming data between schemas
Use the Service Operation builder, the Transform builders, or LJO code with the IXml API
Defining a public interface, using Service Definition and Service Operation Programming with the IXml API easy-to-use interface for XML data Caching options for cross-user caching: Service Operation, Cache Control
Agenda
Background - Why WEF Key resources and getting started Developing user interfaces for desktop or mobile/multi-channel Developing services and data access Team development Testing, debugging, and performance Tailoring the automation framework
Files that you directly edit are stored in source code control:
Models Hand-coded Java, HTML, JavaScript Other files such as RDD base libraries, UI theme files, properties
Generated files are not stored in source code control Eclipse plug-ins are available for SCM systems (SVN, ClearCase, Rational Team Concert, etc.) Compare and Merge for models are available in Designer
ANT scripts are provided for doing automated builds These generate WAR files from your project files stored in source code control You can customize these scripts as needed The Web Experience Factory files that go into the WAR are pulled from a factory image taken from your WEF installation
Service providers Java classes (used as LJOs) UI themes, with CSS, base pages, HTML Templates, etc. RDD libraries for use with Data Field Settings Imported models these are like C++ #include: the builders from another model are copied into the current model context Custom builders
You can't directly access WEF assets (models, UI themes, custom builders, etc.) across different Eclipse projects Instead, you can make your customized WEF assets available as a Feature Set in all of your projects
See wiki document on the details of this
Adding the Feature Set is done with a simple checkbox in the project properties Feature Sets can be automatically updated
Custom feature set Text With Image Builder
Agenda
Background - Why WEF Key resources and getting started Developing user interfaces for desktop or mobile/multi-channel Developing services and data access Team development Testing, debugging, and performance Tailoring the automation framework
About testing
The applications you build with WEF are web applications, so you can test them with any standard web application testing tools
Functional test tools Performance and load test tools
For the service layer, you have a generated test harness you can use for testing Your hand-coded Java code can be testing with Java unit test frameworks Upcoming article and sample on wiki on using automated unit testing with WEF models
WEF is a high-level framework, where you work at a level of abstraction above the Java code level Most debugging and troubleshooting is at this higher model level
What actions are called, what are the values of model variables, etc.
You can debug at the Java level, but more often the model level is where you look Java debugging is used primarily for debugging your custom Java code, not for debugging the code from WEF See next slide for debugging tools
See Debugging Your Web Experience Factory Application on the Web Experience Factory wiki for more information on these 2012 IBM Corporation
47
Agenda
Background - Why WEF Key resources and getting started Developing user interfaces for desktop or mobile/multi-channel Developing services and data access Team development Testing, debugging, and performance Tailoring the automation framework
Builders and models can automate and enforce standards and practices across a project generate code the way you want it This is very valuable for any bigger project or team For example: Rich behavior and appearance of data fields can be defined in a shared RDD (Rich Data Definition) library Look and feel can be centrally defined using UI themes and reusable data layout templates Common features can be automatically included using Imported Model Logging and error handling code can be automatically added Custom builders can automate any desired practices and standards
Key practices for getting the most benefit from the modeling and code generation framework
Use documented best practices for out-of-the-box features Have one or more developers who focus on framework aspects of the project and on defining standard practices for the team Create key shared framework elements for the project, e.g., UI themes, RDD libraries, custom builders Continually review project implementation, and keep an eye out for best practices and for potential additional automation
Use the Model Reporting tool for a quick snapshot of all the models in a project and to find best practice issues Look for common patterns where custom builders would be valuable
Summary
Web Experience Factory is a very rich framework for rapid development and flexible delivery Use it to its maximum advantage! From day one, use the out of the box high-level tools and automation, for rapid development and complete customization control For bigger projects and teams, take advantage of the ability to customize the framework to automate and enforce your patterns and practices
Establish a framework team or center of excellence to lead this
Questions?
54