Naanal is modular framework. It can be extended easily by adding more modules. The Naanal framework has to be kept always outside the application directory.
The Demo is available at http://auieoerp.com/wsplugin
It has very simple installation procedure. Just need to extract the zip file. And point the Naanal main file(naanal.php) in the application's main file(index.php).
The Framework has 2 type of inputs. 1) page param 2) action param
page param
This is the input param represents module's controller class. This param is passed to the application using URL Get or URL Post.
Ex: index.php?page=accounts
action param
This is the input param represents module's controller class's method. This param is passed to the application using URL Get or URL Post.
Ex: index.php?page=accounts&action=list
Usage
The placement of application files are based on different perspective
Theme Designer
Files are placed inside the "Application Root/themes/Your Theme" directory.
Module Templace Designer
Files are placed in either "Application Root/workplace" directory (or) "Application Root/modules/Your Module" directory
Module Developer
Files are placed in "Application Root/modules/Your Module" directory
Business Logic Developer
Files are placed in "Application Root/businessmodules/Your Business Module" directory
Application Library Developer
Files are placed in either "Application Root/utils.php" (or) "Application Root/librarymodules/Your Business Module" directory
Project Manager (or) Team Leader
Files are placed in either "Application Root/ClsConfig.php" (or) "Application Root/modules/Your Module/config.php" file
Flow of control
When a request is made from URL,
Assume URL's page parameter is $page
Assume URL's action parameter is $action
Priority 1) If the file named as {$page}_{$action}.php exist in workplace, it will be used
Priority 2) If the file named as $page.php exist in workplace, it will be used
Priority 3) If controller class(Cls{$page - First Letter Is Capital}) exist, the method (related to URL's action parameter) will be triggered and then go to {$action}.php (or) {$page).php
Priority 4) If the file named as {$action}.php exist it will be used
Priority 5) If the file named as {$page).php exist it will be used
Ex: if the module name is "test" and action is "myact"
the controller class is "ClsTest"
the file name has to be "ClsTest.php"
There must be a action method inside the ClsTest.php
i.e
class ClsTest
{
public function myact()
{
return array("key1"=>"val1","key2"=>"val2");
}
}
the template files is "test_myact.php"
if there is no action specified in the url, the "test_create.php" will be picked.
Now two variables key1 and key2 from the myact method, is available to test_myact.php.
If the test_myact.php has following code,
The output will be
val1,val2 (see the myact method inside the ClsTest class
[Application Input]
[Application Output]
[Controller]
[Wrapper]
[DBTable]
[Template]
[Themes]
[Library Class]
[Library Function]
[FAQ]
[sections of Development]
Wiki: Application Input
Wiki: Application Output
Wiki: Controller
Wiki: DBTable
Wiki: FAQ
Wiki: Module
Wiki: Standard To Follow
Wiki: Template
Wiki: Themes
Wiki: Wrapper
Wiki: sections of Development