Presentation is loading. Please wait.

Presentation is loading. Please wait.

 An essential supporting structure of any thing  A Software Framework  Has layered structure ▪ What kind of functions and how they interrelate  Has.

Similar presentations


Presentation on theme: " An essential supporting structure of any thing  A Software Framework  Has layered structure ▪ What kind of functions and how they interrelate  Has."— Presentation transcript:

1

2  An essential supporting structure of any thing  A Software Framework  Has layered structure ▪ What kind of functions and how they interrelate  Has actual programs  Interface of software  Software tools for designing framework  Layer of Operating System  Layer of Network communication tools

3  Why we need a framework?  When client set his preference for particular framework  When we have tight deadline of project  When there are many developers on project and not have good skills  When the feature of project match with requirements Framework is more comprehensive than protocol and more prescriptive than a structure

4  No. of ways to do a task  It includes  Generalized format  Good for practice  Simple and easy  Solutions to common problems  Helps to design and build framework  Common pattern relevant to E-Commerce  Model view controller  Registry  Singleton

5  Separate UI from logic of Application MVC CONTROLLER VIEWMODEL  View- UI  Model- Data  Controller- Business rules

6  Model  Represents the data, and does nothing else.  Does NOT depend on the controller or the view.  View  Displays the model data  Sends user actions (e.g. button clicks) to the controller  Can be independent of both the model and the controller  Can be a controller and depends on the model.  Controller  Provides model data to the view  Interprets user actions such as button clicks  Depends on the view and the model.  In some cases, the controller and the view are the same object.

7

8  Separate UI from logic of Application MVC (Web) CONTROLLER VIEWMODEL  View- UI  Model- Data  Controller- Business rules Web Browser Database  Web Browser  Database

9 View Model Object Controller

10  Stores collection of objects within framework  Based on shared tasks of different controllers and models  Query to database  User authentication  Uploading files  Viewing contents  Few frameworks stores these functions into objects

11  Registry keep objects together of a framework  It provide single point of contact  To access core functions  To create communication b/w objects  Allows an object have multiple instance to handle different events  Database handler with multiple instance can responds to multiple queries

12 REGISTRY DATABASEVIEW MAIL PROGRAM FILE SYSTEM DB HANDLER TEMPLATE MANAGER EMAIL SENER FILE SYSTEM MANAGEMENT AUTHENTIC ATION HANDLER REST FRAMEWORK

13  Singleton restrict an object to one instance only  Different to registry w.r.t restriction on object  Make it difficult and required lot of effort to implement  Singleton with registry is useful to ensure single instance of registry in framework Singleton -instance Singleton() If(instance==nul) Instance=new Singleton(); Return instance;

14 REGISTRY DATABASEVIEW MAIL PROGRAM FILE SYSTEM DB HANDLER TEMPLATE MANAGER EMAIL SENER FILE SYSTEM MANAGEMENT AUTHENTIC ATION HANDLER REST FRAMEWORK SINGLETON

15  Define a way to arrange and organize things  Framework includes files and folders  A framework needs structure for  Models  Views  Controllers  Registry and its obects  Uploaded files  Libraries  Any other code

16  Deals with data used by application  Structuring a model depends on DBMS

17  Deals with look and styles of application  View includes  Templates  Images  Javascripts  Stylesheets  There should be a separate folder for each of the view

18  Deals with set of rules to control models and views  There are different rules for different models and views  Users Controller  Controls and handles user’s views, models  Administrator Controller  Handles Admin's views and models  An entire controller should be in a seperate folder

19  Provide a single point of interaction among different objects  Handles database objects and others

20  Deals with different files uploaded during application running  Files includes  Pictures of products  Files having descriptions of products  Contents of site pages  Should be arranged in a folders w.r.t categories  Admin & users may have different uploads structure

21  Deals with the extra functionality borrowed from different sources  Also known as Third Party Files/libraries  Libraries are pre-written and well defined codes for a specific functionality  Libraries includes  Files dealing with core functionality  Folders to organize files  Jquery, Ajax, google adsense etc.

22 REGISTRY VIEWS MAIL PROGRAM FILE SYSTEM DB HANDLER TEMPLATE MANAGER EMAIL SENER File System Management AUTHENTIC ATION HANDLER DB INDEX.PHP USER CONFIG.PHP CONTROLLER MODEL

23  MVC  Can’t be implemented until main features of framework are not well-defined  Can be implemented as an example, if features are not well-defined

24  Registry  Simple to implement with two functions  Function to create an object and store it with its key  Function, when called with key in parameter, return required object  Based on URL with parameters  Registry Implementation Registry Implementation

25  Singelton  Easy to implement, just restrict an object to instantiate only once  Use registry to create new instance with single check  If there is no instance of object then created  Else return object itself  Singleton Implementation Singleton Implementation


Download ppt " An essential supporting structure of any thing  A Software Framework  Has layered structure ▪ What kind of functions and how they interrelate  Has."

Similar presentations


Ads by Google