Classes

More About EssenceOne Classes 

Adding And Using Classes Within The Routers Controllers
Within our Routers we have stacked our Views and Controllers. Now we want to bring in Data and Classes to handle the Data within our Controllers. We begin by placing the Controller file above the View file in order to allow the View to call the Controller and it's Classes and Functions Automatically. Because it is staged above the View it will not need a Includes function to do this. It is Automatically done when it is staged within the Router Class itself. This makes EssenceOne very easy to develop with. And because each page template is broken down into manageable parts it makes it just as Dynamic as any other Php Framework out there with less misunderstanding.
Example: Based from a members profile page.:
  • c2/class_user_check.php---------here we bring in the user re direct if session fails before header
  • v2/header.php
  • v2/horizontal_menu.php
  • c2/user_profile.php---------------here the controller to bring in the class user profile data
  • v2/left_menu.php 
  • c2/class_wall_post.php-----------here we call the users wall post data class
  • v2/content (pagename.php)
  • c2/class_groups_list.php----------here we call the class user groups list for the right menu section
  • v2/farright_menu.php
  • v2/footer.php
All the Class Controllers when called above there respective Views makes everything dynamically possible.
If you wish to add more or create newer pages for even more dynamic data. Now you have a Framework that works for you and not against you.



 

No comments:

Post a Comment