Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Cargando en…3
×

Eche un vistazo a continuación

1 de 29 Anuncio

Más Contenido Relacionado

Presentaciones para usted (20)

A los espectadores también les gustó (20)

Anuncio

Similares a Php Web Frameworks (20)

Más reciente (20)

Anuncio

Php Web Frameworks

  1. 1. PHP Web Frameworks
  2. 2. Hello! I am Shreyans Let’s learn about some web frameworks You can find me at: shreyansjasoriya@gmail.com
  3. 3. Web Frameworks
  4. 4. What is a Web Framework ? ➜A web application framework is a type of framework specifically designed to help developers build web applications. ➜These frameworks typically provide core functionality common to most web applications, such as user session management, data persistence, and templating systems. ➜By using an appropriate framework, a developer can often save a significant amount of time building a web site.
  5. 5. Features of Web Frameworks
  6. 6. Features Data Persistence A core feature of all web applications is their need to store information and build web pages based on stored information. Unlike a set of static pages, most web application pages are dynamically generated from persistent data. (One notable exception is the caching of dynamic pages to improve performance.) For example, a publisher will type an article on an administrative web page, with multiple fields for article body, title, author, etc. That page will later be dynamically generated when a user requests the article from the web application. This allows each article to be templated the same and lets a publisher edit content without knowing HTML or having to edit files directly on a server. Obviously each web application has its own needs for the exact data structures to persist. A framework can assist in data persistence with a variety of features: •A consistent API to access multiple data storage systems •Automatic or simplified storage and retrieval of data objects, such as with ORM •Core business object structure, so all data, even across multiple systems, will have a consistent basic interface •Performance enhancements, such as caching above the database layer •Data integrity checks, such as validating relationships or confirming required fields are filled •SQL building
  7. 7. Features Session Management and User Authentication : Static public websites can typically treat each visitor as completely anonymous. Web applications, however, often require user accounts and persistence of information across page views. Some web server and runtime configurations provide basic session persistence, but user account management and application specific logic need to be built on top of it. Frameworks can provide generic user accounts, sometimes extendible, so people can register, login, and reset passwords. They can also provide user management for administrators.
  8. 8. Features Security •Sometimes web application pages are only to be made visible to authenticated users. Frameworks can automatically check and require authentication before generating a page. •Once an end user is authenticated, a framework can check the specific permissions for that user. These permissions may be managed in a variety of ways. A framework might provide role-based access control, or any of a variety of other security features. These are typically managed by a developer in code or a site administrator through an administrative interface. Caching •To improve web application performance, web developers will often cache certain content so it does not need to be regenerated on each page request. Frameworks can offer a common interface to disk or database storage of cached content.
  9. 9. Features Templating A framework may provide one or more templating systems or engines with consistent interfaces for developers. Most often the framework will make available developer-defined fields or data structures available within templates (i.e. push). Conversely a templating system may request data back through the framework (i.e. pull). The templating system may be something as simple as keyword replacement or may be robust enough to automatically generate content such as form fields from parameters.
  10. 10. Features Administrative Interface It's very common for dynamic web sites to need a section specifically built for site administrators. Here the site can be configured and data can be altered. Administrators might create user accounts, manage permissions, change page content, generate reports, or anything else as required. Web application frameworks can assist in building administrative interfaces by: Generating a navigation structure Providing common interface elements to form fields, such as a date field with a calendar Automatically generating edit and list pages from persistent data structures; developers will often define the basic fields or desired interfaces and these will be built into a page by the framework.
  11. 11. PHP Frameworks ➜The CodeIgniter Framework ➜The CakePHP Framework ➜The Zend Framework ➜The Symfony Framework ➜The Yii Framework ➜The Kohana Framework
  12. 12. CodeIgniter A British Columbia Institute of Technology Project.
  13. 13. CodeIgniter Codeigniter is a simple to learn micro-framework that comes bundled with unmatched flexibility and comprehensive documentation. Exclusive Features •Offers incredible control in comparison to other frameworks specially Yii. •Best framework for Beginners as it is simply great and easier to learn •Exceptionally High performance and broad compatibility delivered with standard hosting •Zero configuration required to let the task easier for you •Large scale monolithic libraries that let complexity break into simplicity •Thorough maintenance Required skills – PHP and OOP basics Latest Stable Version- 2.1.4 Most Suited for – Beginners Release Date – Feb 28,2006 Licensed Under- OSL
  14. 14. CakePHP Cake Software Foundation, Inc.
  15. 15. CakePHP CakePHP ranks fifth amongst all the open source web application frameworks that follows all the Model- View-Controller (MVC) approach and software design patterns. Exclusive Features Good code generation and scaffolding features that rapidly build prototypes to suit all your needs No complicated XML/YAML file configurations to set up databases Perfectly suited for commercial applications Immense Built functionalities like Translation access, database access, caching, validation and authentication Securing your App from antisocial elements through CSRF protection, form tampering protection, SQL injection prevention, XSS prevention. Required skills – PHP, OOP and ability to sort out Frameworks Latest Stable Version – 2.4.5 Most Suited for – Experts Release Date – April 2005 Licensed Under- MIT
  16. 16. Zend Framework Zend Technologies
  17. 17. Zend Framework Zend is the one and only framework which is best suited for Enterprise Projects. No other framework can match upto its flexibility, scalability and robustness. However, this framework is not meant for Beginners and even Intermediates but it can be of benefit to only the niche which is absolutely expert in PHP Programming as well as Object Oriented Concepts. Exclusive Features Offers the most efficiently designed workflows and API-centric applications that deploy amazingly fast Agile Design methodology that focuses on delivering the high quality enterprise apps World class Cloud support on servers. No Cloud lock-in, get everything on your choice of clouds. Inherently excellent streamlining and automation process that brings software from codes to production The most coolest Drag and Drop editor, and unmatched front-end support (HTML, CSS and JavaScript) at your ease Instant Online Debugging and PHP Unit testing tools to assist with codes and test case report. Intuitively connected Database Wizard and Editable Table Viewer for exclusive database connectivity. Required skills – PHP 5 and Expert OOP knowledge Latest Stable Version – 2.2.5 Most Suited for –Experts Release Date –March 3, 2006
  18. 18. Symphony Framework a SensioLabs Project
  19. 19. Symphony Symfony bags third position amongst all other PHP Frameworks. It is one of the most actively used framework that ships with a powerful ORM and excellent documentation. The frequency of its fast adoption can be cited from the fact that Drupal, the most popular Open source CMS framework worldwide uses the symfony components upto its latest version (Drupal 8). Exclusive Features The most stable, sustainable and flexible 3 in 1 framework that is quickly adaptable to all your needs Entirely Configurable with its “Dependency Injector” and “Event Dispatcher” Can be used as a standalone micro framework (Symfony 2) without you having to reinvent the wheel and installing the entire framework Lets you build and customize everything as per your own needs Growing Ecosystem of expert Community, Mailing Lists and IRCs etc. and many other service companies Extensible up to the brim and is presented as “Bundles” that are intended to add extra functionalities to the framework. Lets you leverage the power and strength of development by allowing to validate roles and improve productivity Apparently accessible to satiate professionals and advanced users with its amazing documentation and best practices. Required skills – PHP 5, OOP , ORM, Console Latest Stable Version – 2.4.1 Most Suited for – Intermediates / Experts Release Date – 22nd October, 2005 Licensed Under- MIT
  20. 20. Yii Framework Yii Software LLC
  21. 21. Yii Framework Yii is a high performance feature rich framework that mainly lets you focus on the beautifulness of the code while doing all the grunge work completely behind the scenes. A lot of things in Yii happen automatically but still the learning curve is slightly steeper. Exclusive Features •Powerful Caching system that loads your web applications extremely fast. •Security at its best with Yii. From input validation and output filtering to SQL injection attacks and cross-site scripting (XSS) prevention, it offers everything to ensure your application is safe and secure. •Provides excellent support for writing and running both unit tests and functionality tests, which are prominently based on PHPUnit and Selenium. •There is a detailed documentation for everything if you get stuck anywhere. May it be any single method or property, everything is clearly and systematically documented. •Works fantastically well with 3rd party codes. It is designed in a way that you can even use codes from PEAR or ZEND framework into your Yii Web Application. •Has a built in authentication support that is facilitated via RBAC (Role Based Access Control). •Well integrated with JQuery and comes bundled with major Ajax enabled widgets like auto completion input field, Treeview, Data Grid etc that lets you write highly efficient and versatile UI. •Supports message translation, date and time formatting, number formatting, and interface localization. •Offers professionally clean and reusable code that follows MVC pattern. •Integrates best with both the relational and non relational databases. Required skills –PHP5 , OOP Latest Stable Version – 1.1.14 Most Suited for – Intermediates Release Date – Dec 1, 2013 Licensed Under- BSD
  22. 22. Kohana Framework Yii Software LLC
  23. 23. MVCIn layman’s terms...
  24. 24. Model View Controller
  25. 25. View ➜The view in MVC is the presentation layer. ➜This is what the end user of a product will see and interact with. ➜The view doesn’t consist of business logic in most clear designs. ➜The interface is fit for purpose and is the area of interaction. Therefore you could simply output HTML for consumers to interact with or output SOAP/XML for businesses to interact with. ➜Both use the same business logic behind the system otherwise known as the models and controllers.
  26. 26. Controllers ➜The controller is where the magic happens and defines the business application logic. ➜This could be where the user has sent a response from the view, then this response is used to process the internal workings of the request and processes the response back to the user. ➜Taking a typical response where a user has requested to buy a book. The controller has the user id, payment details, shipping address and item choice. These elements are then processed through the business logic to complete a purchase. ➜The data is passed through the system into the model layer and eventually after the entire request satisfies the business definitions, the order is constructed and the user receives their item.
  27. 27. Models ➜The models in MVC are the bottom most layer and handle the core logic of the system. ➜In most cases this could be seen as the layer that interacts with the data source. ➜In systems using MVC, the controller will pass information to the model in order to store and retrieve data. ➜Following on from the example above controller definition, this is where the order details are stored. Additional data such as stock levels, physical location of product of the book amongst many things are all stored here. If that was the last book in stock ordered, the next request for this item may check if it’s available and disallow the order as the item is no longer available.
  28. 28. Benefits of MVC ➜Different skill levels can work on different system levels. For example designers can work on the interface (View) with very little development knowledge and developers can work on the business logic (Controller) with very little concern for the design level. Then they simply integrate together on completion. ➜As a result of the above separation projects can be managed easier and quicker. The designer can start the interfaces before the developer and vice versa. This development process can be parallel as opposed to being sequential therefore reducing development time. ➜Easy to have multiple view types using the same business logic. ➜Clear route through the system. You clearly know where there different levels of the system are. With a clear route of the system, logic can be shared and improved. This has added security benefits as you clearly know the permitted route from the data to the user and can have clear security checks along the route. ➜Each layer is responsible for itself. (Relates to point 1) This means that you can have clean file structure which can be maintained and managed much easier and quicker than a tightly couple system where you may have lots of duplicate logic. ➜Having a clear structure means development will be more transparent which should result in reduced development time, maintenance problems and release cycles if applied properly.

Notas del editor

  • View
    In the world of property you could think of the view as the interior of a property or the outer layer of a property that the inhabitants interact with. The interior can be customised for purpose and the same property can have many different types of tenants. For example a property of a particular design could contain residential dwellings. The same internal space could easily be used as office space, where although in the same property has a different purpose. However the property structure is the same. Therefore the environment in which the users interact does not interfere with the structure of the building.

    Controllers
    If we compare this to a property, we could compare the ordering of a book online to turning on a light switch. A tenant will flick the switch to on just like ordering a book. The switch itself is an element in the view layer which sends the request to the controller just like clicking a checkout button on a web site. The business logic in this case is what the electrician installed and are embedded within the property designs. The switch is flicked, which completes the circuit. Electricity runs through all the wires including the fuse box straight through to the light bulb. Just like the user receiving a book, in this case the tenant receives light. The whole process behind the scenes involving the electricity cabling is not visible to the the tenant. They simply interact with the switch within the space and from there the controller handles the request.

    Models
    Sticking with out example of turning on a light switch, this level in our structure could be the electricity supply. When the tenant flicks the switch, the internal circuit must request electricity to power the request which is similar when the user requested data from the database, as in data is needed to process a request. If the dwelling isn’t connected to an electric supply, it cannot complete the process. Business benefits from using MVC.

×