Home » Education » Naanal PHP Work

Naanal PHP Work

posted in: Education 0

Introduction
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 framework is
available at https://sourceforge.net/projects/naanalframework

Step By Step Instruction :

Installation
It has very simple installation procedure. Just need to extract the zip file. And refer the Naanal main file(naanal.php) in application’s main file(index.php).

The Unit 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
1) Designer Perspective
a) Theme Designer
b) Module Template Designer
2) Developer Perspective
a) Module Developer
b) Business Logic Developer
c) Application Library Developer


3) Project Manager Perspective.

a) Project Manager (or) Team Leader

Theme Designer
Files are placed inside the “Application Root/themes/Your Theme” directory.

Module Template 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

Follow john:
Latest posts from