Flexible, Strongly Typed, Mixed Client/Server Web Framework

The StrataCode web framework supports an extended form of HTML that gives you the power of Java mixed with HTML. Tags can extend other tags either in code or template form, override attributes, use data binding expressions for attributes or content for incremental refresh. High level tag operations support repeating tags and easy ways to bind your forms to data models.

Declarative Web Framework


Tag APIs

The default tag types, Body, Form, etc. implement a subset of the Javascript DOM API that works on both the client and the server. For declarative changes, i.e. those which can be converted into data binding expressions, the updates are incrementally refreshed automatically as properties change. If you need to change the HTML yourself in code, you use the DOM api and refreshes again are scheduled automatically. You do not have to choose whether this code runs on the client or server. That will be managed by the frameworks you have chosen.

Client/Server Transparency

Most frameworks require the application code to explicitly partition itself into client and server by separating the code and managing the communication. With StrataCode, framework layers generate code to manage the sychronization of each type. For each type name, there may be a version that runs on the client or a version that runs on the server or both, synchronizing properties back and forth.

Server layers include code that uses database operations. Code that should run on the server for security operations. By simply setting properties that are shared by client lsyers, you get client/server connectivity for free.

For example, if you have the shared properties: { String queryParam List results }

then a server layer define:

   results := query(queryParam)

the client sets queryParam, that change is synchronized to the server, the server updates results in the response.

To do an insert you just go the other way. In the shared model you have:

   firstName, lastName;
   insertCount; // incremented each time the insert button is pressed

in the server layer:

   insertCount =: insert(firstName, lastName);

or to do an update do this in the server layer:

   firstName =: update();
   lastName =: update();

In the rare case you need it, you can set an ExecMode annotation to explicitly control where a given method or field lives.

To support push, the server can initiate the sync over a web socket or be polled for syncs - no other changes to the model are required.

At the framework level, events can be customized to Java code snippets that are inserted into the layer definitions, letting you build efficient, incremental synchronization even for complex data structures. That code gets converted automatically to Javascript so you get efficient, high-level IPC injected at the framework level.

This same framework could similarly build very efficient .NET and IOS integrations.

One Template Language, Different Ways to Evaluate

StrataCode templates can run in three different ways:

StrataCode's Java to Javascript Engine

StrataCode's has a unique Java to Javascript conversion capability. Built on the powerful StrataCode language framework, it is simple, flexible, customizable, and produces readable, usable Javascript code with intuitive type, method and property names. Unlike GWT, you can use this Javascript code from other Javascript easily as it exposes Java-like apis directly in Javascript, using predictable conversion rules and flexible special casing as required for name conflicts. You keep your code in Java or StrataCode using maintainable, strongly typed APIs.

Click here for more info on StrataCode's Javascript conversion framework.