Models

Business Model

A business model is a description of the business objects and business rules which belong to a given application domain.

The business models describes the objects that belong to the application domain. The business model is described via UML class diagrams. Qualifier and multiple inheritance are not supported.   

UML (Unified Modeling Language) is a general purpose standard modeling language. Netsilon uses UML class diagrams for the graphic representation of the business object classes.

 

Navigation Model

UML has no dedicated support for web application developments. Beyond UML diagrams, Netsilon provides a graphical representation of the dynamics of a web application. This graphical notation has been designed to provide a high level view of the dynamics of a web application.

The navigation model relies on web pages, which are either zones (templates for HTML files) or plain HTML files, and relations between these zones and HTML files. The navigation elements are organized as follows:

The non-HTML files are files required for the execution of the application; like images, Cascading Style Sheets, Animations...

Web pages contain HTML text.  Web pages are either HTML files or zones. HTML files are logical files, whereas zones are templates that retrieve their content (HTML) at execution time. 

Web pages are said to be entry pages when they can be called (via a dynamic link) without passing parameters. This happens typically for the index.html.

A fragment is a page to be included in another page (or another fragment).

A contextual page designates a page which requires parameter passing (it cannot be composed, it is not a fragment) to be called.

Static HTML pages are transferred without being compiled to the HTTP server. They will not be used as the basis for program generation (there will not be a corresponding program file; however, these static files are often used to specify the HTML text of a zone). Static files are either explicitly designated as static, or placed in a static folder.

The distinction between non-HTML, HTML files and zones is done at creation time. HTML files have .htm or .html extensions. It is possible to copy existing HTML files within the htdocs subfolders.

Zones

Zones are essential construction elements for dynamic web application development. A zone is an abstract description of a web page, which can be used as a node of the navigation model, and whose corresponding HTML description may be retrieved in various ways, both at compilation time and execution time.

Zones provide the support for an abstract description of the navigation within a web application, independently of the HTML files that will be used to implement this navigation. Zones also provide a clean way to organize the collaboration between software developers and HTML integrators. Zones can be seen as interfaces, and HTML files as implementation of these interfaces.

Zones may retrieve their HTML in the following ways:

Statically at compilation time :

Dynamically at execution time :

Notice: headers are stripped out from the HTML retrieved from urls when the zone is a fragment (HTML content starting at the <body> tag by default). Relative urls are taken in the base context of the deployment site (root path).

HTML files

HTML files are files containing HTML text. These file can be hand-written or generated with web authoring tools.

Context variables

Each page has got a context given by a list of variables available at execution time. These variables have a name, a type, and may have a default value. An entry page (not a fragment) is a page which has no context variables, or whose context variables have default values.

Some variables have session scope; they are shared by all the pages that belong to a session (a session stores the context of the interaction of one given user of the application, sessions have a parameterized lifetime). The session is automatically created the first time a given user connect to the application.

Context and session variables can be edited in the Session and Current File Context of the web pages (either zones or HTML files).

Decision centers

The navigation model is represented with a directed graph. The nodes are HTML web pages (zones or HTML files), the edges are either hypertext links between pages or composition relations between pages and fragments (or between fragments themselves)

The dynamic nature of the web pages is modeled using decision centers, dedicated to specific domains:

 

The location of a decision center within a given HTML file is specified by a special tag, which will be expanded into HTML statements at compilation time.

Decision centers (excepted system variable displayers) support an Entry Action, a sequence of Xion instructions executed when the decision center is executed (before the web page execution, or during the call for linkers and forms). The action entry may also define local variables, which may be initialized in the entry action. Session variables are accessible in the action entry context.

Notice: As decision centers can be shared by several web pages, it is only possible to access to those context variables shared by all the web pages, and whose highest level common ancestor in not OclAny or Collection(OclAny). For instance, if the decision center 1 is used by the web page a.html (context v of type Integer) and the page b.html (context v of type Double) the v variable will be seen in this decision center as being of type Real.

Composers, collection displayers, linkers and forms require a target web page. This target web page may be chosen dynamically at runtime via a Boolean Xion expression. The different decisions (target web page guarded by the Boolean Xion expressions) are ordered and evaluated at runtime in a sequence. The first expression that resolves to True determines the choice of the target web page. It is possible to specify a default decision, which will be chosen if no other was taken.

The contextual decision menu provides operations to reorder the decision sequence, to make a decision become the default decision and to delete a decision (which does not delete the target web page). 

Local variables can be said to be User Defined, which means that their value comes from the client browser, either as forms parameter, or as URL parameters.

At execution time, when the web page is generated, the decision center evaluates the conditions and embeds the first fragment (in the sequence) whose condition evaluates to True.

In case there is no such True condition, the decision center embeds no fragment.

It is possible to have one fragment designed as the default fragment, and have it embedded if all others fragments where not selected.

Action language

Netsilon features a powerful high level action language, named Xion. An action language is a language to express actions, in the terms of the model (classes, relations, operations...).

Xion combines the power of a constraint language (like OCL, Object Constraint Language) and the ease of use of a Java like syntax. 

Xion expressions will be translated by Netsilon into PHP or Java lines of code, as well as optimized SQL queries. Using Xion completely hides the details of the programming languages, freeing the developer of the programming details.

Netsilon features a Xion editor, with semantic completion, freeing the developer of mastering the syntax of Xion. Xion is model aware, all classes defined in the business model by the developer, can be manipulated by Xion.

Action code can be stored either in methods or in the action entries in the navigation model. Reusable actions should better be stored in the methods of the business classes.

 

Native code inclusion

Xion supports native code inclusion. Existing modules of code (Java, PHP...) can be called by Xion through an interface mecanism.

 

Sessions

Sessions model the interaction between the web application and a given user, at some point in time.

A session is created whenever a user starts to interact with the web application. Sessions end by timeout, when the user has not been active for some (parameterized) period of time.

Session are created implicitly by Netsilon. Information can be stored in session variables. A very common use of session variables is to store state information, and then have the web application built as a state machine, using the session variables as state variables.

Session timeout and implementation (URL, Cookies or Both) are specified in the property panel, after having selected the root of the project. When a session times out, the url specified in the session property panel is called (all the dynamic links generated by the linkers are aware of the session lifetime).

 

Previous    Summary    Next