About us
Contact us
Products
Services
Articles
 Twitter    Bookmark and Share

Devsphere Mapping Framework

Handling pure HTML forms automatically without mixing Java code, JSP tags and HTML markup

DevsphereTM Mapping Framework provides an API that allows you to map objects to HTML forms, XML documents and text. The mappings are bi-directional. You can set the properties of an object to the values gathered using an HTML form. You can also fill a pure HTML form with the data contained by an object. An object can be converted to a text / XML document and vice-versa.

This framework offers architectural, development, testing and deployment benefits. It is extensible, scalable, robust, easy-to-use, standards-based, well documented and it will not interfere with the way you like to work. You'll continue to use your preferred tools and editors to build the Java code and HTML forms. You just won't have to mix that code anymore. Why would you build JSP files or servlets to generate forms when the insertion of the form values and messages can be automated? The framework parses (and caches) the HTML forms and fills them with data extracted from objects allowing you to return partially filled forms to the user's browser. You can control where each message is inserted and you'll still be able to include dynamic content if necessary. You'll continue to use servlets and JSPs to call the framework's APIs and to generate dynamic content that isn't form related such as catalogs, reports, views, etc.


Architectural benefits

DevsphereTM Mapping Framework

  • supports an application model that makes a clean separation between object processing, form generation and data handling. This is similar to the MVC model.
  • extends the JavaBeans model (without altering it) with concepts specific to form processing, such as optional properties, default values and error messages.
  • brings object oriented features, such as inheritance, containment and aggregation into the form processing domain.
  • allows you to build easily internationalized Web applications. The I18N support exists in the application model and is extended by the framework's API.

Development benefits

DevsphereTM Mapping Framework

  • frees Web Application Developers of the routine tasks (such as form data handling, user error handling and dynamic form generation) and let them focus on the business logic (object processing).
  • is easy to use and reduces significantly the development time. Existent Java classes and HTML forms don't need any changes. The only requirement is the use of the same names for object properties and form elements.
  • reduces the maintenance costs. The application model separates the components of the applications in five categories: data beans, bean resources, forms, handlers and processors.
  • maps objects to XML and text simplifying the building of software that needs messaging (such as B2B applications) and XML/text-based persistence (such as Web-based administration utilities).

Testing benefits

DevsphereTM Mapping Framework

  • splits the mapping errors in two categories: user errors (like "missing data" and "number format error") and application errors. For example, an application error may occur when there are no form elements with the name of an object property. In this case, the object property cannot be mapped. The "missing form element" error would be inserted at the beginning of the HTML form that is sent through the servlet's output stream. To correct the error, the developer would have to edit the HTML file and add the form element.
  • reloads the cached HTML forms after they are modified. This avoids the restarting of the application and is much faster than recompiling a JSP page.
  • includes an extensible logging mechanism which provides loggers that wrap print streams and servlet contexts. You may define new loggers that suit the needs of your application.

Deployment benefits

DevsphereTM Mapping Framework

  • is very fast and doesn't need too much memory. For HTML parsing, it uses a custom parser highly optimized for forms. Pure HTML files can be parsed only once and cached in memory. You may control which forms are cached and which of them aren't. For XML parsing, the framework uses the SAX API.
  • may run in any servlet engine / application server based on the Servlets 2.x API using any JDK/JRE version (except the old JDK 1.0). If the servlet engine supports Java Server Pages, the JSPs can take full advantage of the framework's API.
  • may also run outside of a servlet engine / application server, in the absence of the Servlet API. For example, a standalone application that does offline processing could use the framework to convert text / XML documents to objects.

Documentation

Developer's Guide and API Documentation are available for browsing. You'll also find them within the downloaded package.

The first chapter describes the framework, enumerates the benefits of using it, defines terms and concepts, explains the features and provides an API overview.

The next chapter presents an application model and describes the components: data beans, forms, bean resources, handlers and processors. It also gives more information about the framework's features.

Later chapters give implementation details about the mapping between JavaBeans and

Another chapter exemplifies the building of the five types of components: data beans, forms, bean resources, handlers and processors. Then, it shows an equivalent example that doesn't use the framework and compares the two solutions. It also explains the advantages of using bean-independent servlets.

The framework may also be used to

The API Documentation describes the two public packages: com.devsphere.mapping and com.devsphere.logging.


Copyright © 2000-2009 Devsphere

About us
Contact us
Products
Services
Articles