Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Warning about "WS-I Basic Profile compliant" WDSLs

Best Practices Guide

Written By: David E. Jones, jonesde@apache.org

Alert
titleOFBiz does not generate "WS-I Basic Profile compliant" WDSLs
typeWarning

OFBiz does not generate "WS-I Basic Profile compliant" WDSLs. If using Apache CXF at the consumer endpoint is an option for you have a look at OFBIZ-4245


Info

If you look for contributor best practices here you go: OFBiz Contributors Best Practices

Table of Contents

  • Introduction
  • General Concepts
  • Data Layer
  • Logic Layer
  • Presentation Layer

...

When preparing data in view actions you should make the data available to the view template by putting it in the "context" object. All attributes in the context object will be made available in the context of the template, if the template languge language supports that.

While the use of JSP is not recommended in OFBiz, it is supported. Note that when using JSP for a view template you cannot use the Screen Widget so the actions facility will not be available. Our recommendation for JSPs is to have a single scriplet scriptlet at the top of the page that prepares the data. In this case try to call worker services or worker Java methods to do most of the work and to keep as much logic as possible out of the page.

...

The best-practice template engine that we recommend for HTML and other text generation is FreeMarker. It is like Velocity from Jakarta, but much more flexible and fits in nicely with other OFBiz Core Framework tools. Rather than running FreeMarker templates directly we strongly recommend using the OFBiz Screen Widget so that actions can be associated with screens and they can be decorated with common templates. We'll describe how to best use this below.

The view presenation presentation templates should always be kept as simple as possible and common content such as headers, footers, sidebars, and so on should be added at run-time using the decoration pattern. The template file that should be used to decorate each page is specified in the screen definition XML file.

...