Millstone provides a new way of creating server side applications for the Java environment, bringing the ease of use and modularity of component-based development to Internet development. The leading idea in Millstone is to provide a full featured user interface component framework that is not restricted to any terminal type, , enabling any terminal to present the Millstone components using specific terminal adapters.
Millstone focuses on providing an easy to learn programming model without compromising robustness or power of the architecture. The application programming interfaces also provide direct data binding possibilities on all levels.
Application environment
Millstone applications run in normal Java2 Enterprise Edition environments: Millstone applications can be built alongside other Java Servlets and Java Server Pages. The basic structural difference from those standard technologies is that Millstone applications only contain logical user interfaces with only minimal presentation details, if any. The presentation is created automatically using a theme that maps the logical user interface to a visual presentation.
Millstone applications can use and be used alongside all the facilities provided by the Java application environment, including JDBC-compatible relational databases, Enterprise Java Beans (EJB), JNDI directories, Java applets and so on. On the other hand, Millstone applications themselves do not require any of those facilities. To deploy Millstone applications in web environment, only a Java Servlet container is required for communication with Web-browser.
Millstone in Java Enterprise Edition Architecture
Millstone structure
Millstone applications run like conventional applications: the user starts the application, the application lasts while the user uses it and the application is finished on the users request. This is different from most web-oriented programming models, where the application is defined as set of templates that are used to generate a page for each request, and only the data connected to continuous processes is stored either in client or server side session or in a database. Because of this, the programming model of Millstone is more closely related to conventional client-side programming than traditional Internet-programming, which enables the developer to concentrate more on the business process without having to verify the data passed from previous stages of the application.
Millstone application structure
A typical Millstone application consists of data storage, business logic, application logic and a terminal adapter. The application provides user interfaces by using Millstone UI components. The components are represented on a client terminal through a terminal adapter that translates the user interface to client terminal. A set of themes can be defined to describe the look and feel of the user interface presentation on those devices. The application can access business logic trough Enterprise Java Beans or access the data storage layer directly. Millstone also provides a set of interfaces defining a consistent data model for connecting user interface components directly to different data sources or business logic providers.
Component model
A Millstone application is a program that extends an application class defined in the Millstone base library. Each application instance initializes its user interfaces and business logic connections on start and they last while the application is running. The Millstone base library provides an extensive set of basic user interface components that can be directly used by the application, but it is also possible to easily extend the functionality of provided standard UI components.
The user interface components are active throughout their lifespan, but some client terminals refresh the user interface presentation on user-initiated transactions (web page requests, for example). The terminal adapter hides the details of different terminal standards and thus the programmer can assume continuous operation of the components.
The user interface components provide an event framework that can be used for easily connecting the user interface to application and business logic. The user interface components' event framework is based on a hierarchical event model, where the event listeners can select the detail level of the received events. It is also possible to connect the events directly to arbitrary methods for easy passing of events from user interface to application logic.
Web adapter
The Millstone Web Adapter is a terminal adapter that connects Millstone user interface components to a web-environment. The Web Adapter supports a variety of different web browsers and adapts the user interface components suitable for web browsers using a set of different Internet technologies including XML, XSLT, HTML, JavaScript, CSS and HTTP.
The Millstone Web Adapter includes a default theme that can be extended and modified for custom looking interfaces and new user interface components. The looks of the user interfaces can be customized by providing XML style sheets (XSL) that map the intermediate logical user interface definition language (UIDL), provided by the user interface components, to HTML.
Data interface
Most of the basic Millstone UI components support direct data access through these interfaces. This enables, for example, a Table UI component to directly connect to a table in a relational database, thus allowing the application to easily display the contents of the database table. The data connection can naturally be two-way, allowing any modifications to the Table-component's contents to be updated into the database without any special programming needed. Each of the UI components also implement data source interfaces, allowing the UI components to be connected to each other.