Nutshell

EssenceOne

A New Path 
Lets build in reverse. Lets say we need a new Module for Admin and we know it's Alphanumeric Order as Module m8/ so all our Views and Controllers will be within v8 and c8 respectively. The path we need will be---> index.php?mod=admin&page=administrator. To understand this path we will need a class added to the Module Class Router for the Mod admin. Next we will need a Module Class Page Router Named class_administrator and we can call it and include it within the stack within the Main Module Class Router. Within the new class_administrator class we will add all pages needed for this module like users ban, post filters, analytic's. advertising and billing etc. 

Add A New "Module Class Page Router"
For each added module you may need pages to show list. view, add, delete, update etc. To organize all of these pages we will create a new Module Class Page Router for it and stack all the needed pages according to the template Page-Part breakdown for each conditionally called page.

Add The New Module Class Page Router To The MAIN "Module Class Router"
Add the new Module Class path into the Module Class Router and call it's class method by name conditionally there.

Add The Views And Controllers
Next we add all the needed Views and Controllers(action scripts and forms) needed for our new Module Class Page Router and stack them conditionally also.

Mix and Match Other Modules Views And Controllers Dynamically
Easily add the users profile etc. views and controllers onto any added module within the page stack. Or add a Groups List onto any page or any module etc. There is no limits !

Error Handling and Exception Rules
Add a new module class page router called class_error_all.php and add the conditions for true or false from both the Module class router or the module class page routers stacks respectively. Example IF MOD= ''  EMTY ( OBJECT_FLUSH AND THROW EXCEPTION BY MANY ERROR PAGES } ELSE { OJECT FLUSH PATH TO LOGIN }

Security
Many Frameworks will tell you blatantly to use their frameworks because they are hack proof. I will only say this once. Nothing Is Hack Proof. But If you have every file within your applications folders protected by .htaccess "DENY TO ALL" or access within the server DENIED there is no need for anything else within EssenceOne. Because all file naming is not passed by the routers but only passed as second hand names using GET for each module, there is absolutely no need. While EssenceOne uses two sessions stored variables for each user nothing more is required period. Another fact is it would be of more benefit to store the login and password without using an email also. All bots are using bogus emails to login and register. I have noticed no attempts or logs containing tries when using only username and password credentials without an email address. Just something to consider. You still get the email but it will not be used to login.

Using Php _GET Method
There has been much debate over using _GET within Php. I will only say if using it in reverse to the norm you should be able to thwart off attacks using it than not using it. EssenceOne never depends on GET but depends entirely on two session stored user variables. The GET method only directs Paths by secondary name only and upon sessions failure redirects to the login page. This actually prevents anything other than what is named to be path'ed to. If you want your Admin hack proof name the files as AsdFgh 561zxc.php etc. And also name their _GET name as such also or a fine odd numbered hash etc. "Vxbncm787XXz9"

Two Cents Worth
EssenceOne comes completely set up to begin developing. It has several classes and has Session Users already installed to begin membership websites. The examples may seem rough at first, but once you implement you own classes and functions you should find how simple it truly is. Always remember Rasmus Lerdorfs take on Oop Frameworks versus Procedural. This will help anyone understand the difference when it comes to simplicity and speed. Rasmus explains in great detail the problems and sacrifice in speed of execution of programs using Php Frameworks. FaceBook and WordPress DO NOT use a Framework !

In A Nut Shell
When i first began EssenceOne i was naturally coding using only the Module Class Page Routers as indexers without being wrapped within a class or using a Module Class Router. This too is very efficient, but with larger database sites this truly helps to be wrapped within a Class to prevent naming errors. But if you are programming a normal non progressive site, then try this approach. EssenceOne does not need anything but the class router and your own template. Just by copying the class router here in this blog you can begin dynamically building with it. Make several copies for each Module you need and run with it. Then pick out a nice template and break it down into manageable sections, or whole pages if you like. For dynamic sites break them down to where each section of your pages can bring in Class or Function Data in many different ways,, Please Enjoy !   


No comments:

Post a Comment