Request for project

 

Name: ano-*

Proposals: ano-jax, ano-jsx, ano-ccs

Purpose

automation of js-backend communication

Idea: 

Provide an interface which allows to send data from js to backend as json/java objects and vice versa. 

 

Requirements: 

  • Plugable into any other framework (esp. ano-site and ano-maf).
  • Minimal amount of configuration
  • Configuration via annotation

 

Usage Scenario

Scenario 1

Form submission. Form is sent as JSON Object, which is translated to PO and is transported directly to API.

 

Scenario 2

Moskito, JS Enabled Frontend (Dashboard).

 

Scenario 3.

 

Solution Proposal

Basic Components

Basic idea is to introduce another 'scope' like Application, Request, Session and Page which resides inside the Session. As with the other scopes it may be possible to store any Object in this scope.
Special defined annotations for CLASS and METHOD of the stored objects may define the time to live for the whole object, the client visibility for methods and the transportation policy
(e.g. if attribute-values of an object are transported direct='on generation time' or remote='on ajax call')

A JavaScript-Generator creates a String with all neccessary JavaScript for the client to reflect and call all objects/methods in the ClientScope. By wrapping this generator in a Taglib you need only to include one simple tag
in a jsp to have all javascript in place.

A CommunicationServlet may receive the ajax calls from the client to call the methods in the ClientScope.

Review of Requirements

Plugable into any other framework

Yes: Only dependencies to standard servlet packages like javax.servlet.*

Minimal amount of configuration

Yes: Configuration is only:

  1. add CommunicatonServlet to web.xml
  2. bring taglib.tld and jar-file into place
Configuration via annotation

Yes: Use simple Objects, define visibility and ttl by annotations

 

  • No labels