Package net.java.html.json

This API allows you to write your application logic in Java and present it using modern HTML rendering technologies like Knockout .

See:
          Description

Class Summary
Context Represents context where the Model and other objects operate in.
Models Information about and operations for classes generated by the @Model annotation.
 

Annotation Types Summary
ComputedProperty Can be used in classes annotated with Model annotation to define a derived property.
Function Methods in class annotated by Model can be annotated by this annotation to signal that they should be available as functions to users of the model classes.
Model Defines a model class named Model.className() which contains properties defined via Model.properties().
OnPropertyChange Defines a method that is supposed to be notified when a property defined by Model has been changed.
OnReceive Static methods in classes annotated by Model can be marked by this annotation to establish a JSON communication point.
Property Represents a property in a class defined with Model annotation.
 

Package net.java.html.json Description

This API allows you to write your application logic in Java and present it using modern HTML rendering technologies like Knockout .

Use @Model annotation to define one or more model classes with properties. Don't waste time writing setters or getters - they will be generated for you. Just instantiate your classes and use them!

The class generator does not stop with getters and setters -- internally it generates bindings for various HTML technologies. Just include appropriate technology implementation on classpath of your application and your model class(es) will automatically be bound to your HTML elements (after calling applyBindings() on your model).

You don't have bother with JavaScript. All your application logic is in Java. The necessary JavaScript needed for the HTML bindings remains hidden as an implementation detail of communication between the generated model class(es) and appropriate technology bridge (like artifact with id ko-fx and group id org.apidesign.html).

The model classes can be used for JSON based server communication. Just use @OnReceive annotation to define a communication point in the model class. Please note, that the model classes can easily be used on server as well (tested with Jersey) - the same code can run in your browser as well as on your server.

Behavior of model classes can be enriched by using @ComputedProperty annotation (to define derived properties) and by @Function annotation to define handlers to be invoked from the HTML elements.



Copyright © 2013 API Design. All Rights Reserved.