WebMacro Framework Design Overview

Here's an overview of WebMacro's overall design. You can also:

WebMacro Servlet Design

WebMacro's fundamental idea is to separate work into three distinct categories:
  1. Page design: Create HTML templates using WebMacro Script. This can be done using many regular old HTML editing tools, since the script language does not interfere with HTML syntax.

  2. Domain logic: Write your business logic in back end classes that know nothing about servlets. Make them available using WebMacro's ResourceProvider.

  3. Controller code: Write session management code in standard Java. Just subclass from WMServlet. Your code will examine the request, select a template, and put all the information it will require into a hashtable. WebMacro does the rest.

A framework like this is called a Model/View/Controller (MVC) approach to servlet design.

Your business logic objects represent a model which your servlet interacts with. The front end templates are views into the system. You create a controller by subclassing from WMServlet--here you process the request and perform session management tasks, including selecting which template to return.

In Fundamentals of Servlet Design I present the reasons why this is usually the right way to design a servlet--it's also a good introduction to the overall design principles behind WebMacro.

WebMacro provides extensive support for all three levels of the MVC architecture:

This way of doing things has numerous advantages:

Now that you know all about WebMacro, why not try it out?


On to: Download WebMacro


Introduction | Download

api | design | faq | goals | links | license | othertech | quickstart | script | status