Chapter 1. Introduction to the Naos Framework

Table of Contents

1.1. Overview and features
1.2. The name
1.3. Installation
1.3.1. Tools
1.3.2. Create a new project
1.3.3. Run an existing application

1.1. Overview and features

  • Transparent support of AJAX, which enables access to an application even though JavaScript is deactivated. You write your HTML links as you are used to, the correct interpretation is done by the framework automatically. Example:

    <a href="vapp:/myinfo/publications/cancel">Close</a>

    This feature is available without additional effort for the developer.

  • A flexible layout system with the ability to define several independent view areas. A layout configuration file defines, which HTML elements should be detected as view area. Example:

    				[layout]
    				title = "Digital|Vita My Information"
    				views = page					; comma separated list
    				
    				view.page.match = id:view_page			; define identification of html tag, which we want to use as view output
    				view.page.replace = inner			; modes are "inner" and "outer"
    				

    In this example the HTML element with id="view_page" should be considered as View "page".

  • Automatic handling of forms, that means if an form has to be displayed you can do this with the simple and well-known HTML elements. No additional PHP code or similar is required! The following example shows a form which is automatically populated with the data which is provided by the business logic. No additional effort in addition to this HTML code is required. Example:

    				<form name="main/register" action="vapp:/main/register/register">
    				<table>
    				    <tr>
    				        <td>University</td>
    				        <td><select name="university" /></td>
    				    </tr>
    				    <tr>
    				        <td>Faculty</td>
    				        <td><input name="faculty" type="text" /></td>
    				    </tr>
    				    <tr>
    				        <td colspan="2"><input type="submit" value="Register"/></td>
    				    </tr>
    				</table>
    				</form>
    				

  • I18N support according to established software standards. Translatable strings can be marked with the token tr. An external Phing task scans the application for these strings and safes or updates them to a translation file. Just make a copy of this file for every languages you want to support and translate this file with the open source tool QT Linguist. See http://trolltech.com/products/qt/features/tools/linguist and http://trolltech.com/images/products/qt/qt-linguist for further information.

  • Support for standardized menu trees. These can be easy managed by the Naos management interface (which will be introduced with naos.framework.v6).

  • The concept of datanodes enables the framework to bind data to a node. This allows the user to establish a link between data and workflows either implicitly (e.g. create a new page - normal user) or explicitly (e.g. link datanode X to menu entry Y - power user).

  • A high-performance persistence layer enables the developer to define classes of objects via XML. These objects interact with a MySQL database automatically. Other persistence layer with a broader support of backends can be integrated easily, e.g. Propel http://propel.phpdb.org/trac/.

  • A mature module approach. This supports the reuse of application parts and supports a well arranged application architecture.

  • A application based on the Naos framework can be easily integrated into Apache with an automatically generated Apache configuration snippet. Everything you have to do, is to include the generated snippet into your Apache configuration with a single line.

  • The PHP layer makes use of the standard libraries Zend Framework and the Smarty Template Engine. The JavaScript layer makes use of the standard libraries Prototype Framework and script.aculo.us.