Ajax in Action: Using the Model to Generate the View


News: Ajax in Action: Using the Model to Generate the View

  1. This is the third in a three-part series of excerpts of Manning's Ajax in Action Chapter 4. This is the first of three chapters that apply refactoring and patterns to the client-side codebase. You won't see much of the asynchronous requests that give Ajax its name in this chapter, but the style of programming being discussing here is a direct consequence of being able to make asynchronous requests.

    Dividing the codebase into three discrete layers using MVC makes the JavaScript code in an Ajax application more ordered and maintainable, but it also results in a certain amount of overhead of communication between the tiers. In this installation, we look at a way of reducing this overhead by generating the View layer automatically from the Model.

    Read "Using the Model to Generate the View"
  2. Anyone interested in learning more about Ajax or meeting Dave Crane:

    Ajax in Action author Dave Crane will be presenting a 3-day training course Developing applications with Ajax at Skills Matter in London, UK on February 21-23.

    Following this he will be presenting an additional 1-day course on Ajax with Ruby on Rails.
  3. Many tools generate code relative to user interface based on database metadata information.
    Some implementations use ER schemas to generate de code. Others use OO models to generate it.
    The generated code is operational with a few adjustments.
    But this approach come with many problems, like system evolution, code synchronization, performance and other issues, like user interface appearance and comportment.
    Also, the big problem is the binding of the business rules.

    A new concept is proposed by software called Merlin (http://merlin.dev.java.net).
    This project aims to create the a complete user interface at runtime, without any line of code.
    The user interface are "rendered", by reflection and AOP techniques from a complex metadata graph, that contains (in many others) information from a OO model.
    The proposal is very interesting, much more when the project declare that n-levels of master/detail can be obtained. The features also include validators (that can be defined by annonations or can be reused from Hibernate Validators, Apache Commons or Struts config), support for Swing and JSF, usability based on success solutions (like Eclipse UI, JGoodies UI and others...), support to dynamically binding of business rules and a formidable historical configuration environment. The use of historical information (across multiple systems) aims to enable a "free configuration" after development of some systems.
    The Merlin is a free project developed by http://www.3layer.com.br, a new brazilian company.