Registry itself is easy and straightforward in implementation The objects of registry are actually complicated to store and manage Objects of Registry are: DB Handler Template Management Sending User Authentication Registry Files Management
Database handler needs to have following functionality: Connection to Database Managing multiple database connections Performing queries Return common query information Caching queries Making common queries easier
Database Handler may have following extra functions: Inheritance ▪ Base functions of any database Abstracting the logic to queries ▪ Pass query information only and hide other detail Debugging Information ▪ Debug and optimize slow queries
User Authentication object needs the following functions Process Login Request Check to see if the user logged in Logout user Maintain information about logged in user
object required the following functions: Parsing Security Management Files system Management Parsing Running an online helpdesk ▪ Replies to customers queries, assign categories and departments to queries Running online basic services to customers
Security Management Manage a ban list Validation of certain data of Files Management Create files and folders on server Manage permissions of files Process upload files Delete files Display files and directory
Password protected pages Restrict access to page based permissions Easy way to add CSS and Javascript files to pages Loading ‘onLoad’ function on page tag
Core task of framework are managed in registry with its single instance Core functions are required almost on each pages Framework must know what code should run and when to run? Framework decides using two ways: URL User behavior or input
If true Return the page If false/else Match first part of the URL in DB Call appropriate controller w/someprod Controller Databas e User Input View/Browser Found? truefalse
Qurick and easy method Inflexible method we may have different request formats to be sent to different models
We create a router responsible for Matching the pattern of the URL Routes the request in specified format
Where is the E-Commerce in framework we have studied? E-Commerce functionality will fit into it by ▪ Adding models and controller of each function ▪ Like category management, products, checkout etc.
Each object can be a part of registry Example: A basket containing different products in it Easy way for users to view pages with shopping basket with items containing in it. Not good for practice During execution process, we will use call back to call a function Where and when a callback is called and what callback did.