Cake PHP – OOPS approach for PHP                       www.otssolutions.com
What is CakePHP ?• CakePHP is written in PHP and is modeled  after the concepts of Ruby on Rails (ROR)• CakePHP is a rapid...
Why use CakePHP ?• Model, View, Controller Architecture• Helps developers to reduce code  repentance in creation of websit...
Why use CakePHP ?• Data Sanitization• Security, Session, and Request Handling  Components• Flexible View Caching• Full sup...
Where to use CakePHP ?• Highly scalable projects• Projects with Heavy Database Interactions  and Object Relational Mapping...
Where not to use CakePHP ?•   Basic Blog•   Basic CMS•   Basic E-Commere•   Basic Forums / Bulletin Boards
Who is using CakePHP ?
What is MVC approach?
What is MVC approach?• Model/View/Controller (MVC) is a  software architecture used for building  applications.• MVC separ...
What is OOPs?• Object-oriented programming is a method  of implementation in which programs are  organized as cooperative ...
OOPs advantages over conventional approaches • OOP provides a clear modular structure   for programs which makes it good f...
OOPs advantages over conventional approaches • OOP provides a good framework for code   libraries where supplied software ...
Characteristics of OOPs • Class definitions • Objects • Abstraction • Encapsulation • Inheritance • Generic classes • Poly...
How OOPs work • Classes describe objects • Objects inherit from superclasses
Class Hierarchies
Advantages of OOPs •   Simplicity •   Modularity •   Modifiability •   Extensibility •   Maintainability •   Re-usability
OOPs in PHP • PHP 5 has a full object model as   compared to PHP4. • PHP treats objects in the same way as   references or...
OOPs Features in PHP Autoloading : Autoloading is a mechanism where you can specify where the code should look for a class...
OOPs Features in PHP Interfaces : PHP does not have multiple inheritance, so each object can only have one parent, and the...
OOPs Features in PHP Type Hinting : We use the instanceOf comparison operator to check that an object with the correct cap...
OOPs Features in PHP Fluent Interfaces : This is a neat trick that can often be seen in particular in framework code, so i...
Thank You            http://www.otssolutions.com/
USA                                                                             India                                     ...
Upcoming SlideShare
Loading in …5
×

Cake php oops approach for php

2,817 views

Published on

OTS Solutions delivering high quality open source solutions like Cakephp Application Development, Cakephp Web Development services by expert professional developers.

Published in: Technology
1 Comment
0 Likes
Statistics
Notes
  • http://www.dbmanagement.info/Tutorials/MYSQL-PHP.htm
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total views
2,817
On SlideShare
0
From Embeds
0
Number of Embeds
127
Actions
Shares
0
Downloads
26
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide

Cake php oops approach for php

  1. 1. Cake PHP – OOPS approach for PHP www.otssolutions.com
  2. 2. What is CakePHP ?• CakePHP is written in PHP and is modeled after the concepts of Ruby on Rails (ROR)• CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications.• CakePHP makes use of commonly known design patterns like ActiveRecord, Association Data
  3. 3. Why use CakePHP ?• Model, View, Controller Architecture• Helps developers to reduce code repentance in creation of websites or web applications.• Application Scaffolding.• Built in view helpers for AJAX, JavaScript, HTML Forms.• Access Control Lists
  4. 4. Why use CakePHP ?• Data Sanitization• Security, Session, and Request Handling Components• Flexible View Caching• Full support for PHP OOP’s approach And• It is developed under the MIT license so it is free for everyone
  5. 5. Where to use CakePHP ?• Highly scalable projects• Projects with Heavy Database Interactions and Object Relational Mapping• Projects where caching is needed• Projects which needs to be implemented with MVC approach• Where code re-usability is necessity
  6. 6. Where not to use CakePHP ?• Basic Blog• Basic CMS• Basic E-Commere• Basic Forums / Bulletin Boards
  7. 7. Who is using CakePHP ?
  8. 8. What is MVC approach?
  9. 9. What is MVC approach?• Model/View/Controller (MVC) is a software architecture used for building applications.• MVC separates the business logic and application data from the presentation data to the user.• Applications built using MVC approach are re-usable and expressive.
  10. 10. What is OOPs?• Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which represents an instance of some class, and whose classes are all members of one or more hierarchy of classes united via inheritance relationships.
  11. 11. OOPs advantages over conventional approaches • OOP provides a clear modular structure for programs which makes it good for defining abstract data types where implementation details are hidden and the unit has a clearly defined interface.. • OOP makes it easy to maintain and modify existing code as new objects can be created with small differences to existing ones.
  12. 12. OOPs advantages over conventional approaches • OOP provides a good framework for code libraries where supplied software components can be easily adapted and modified by the programmer. This is particularly useful for developing graphical user interfaces.
  13. 13. Characteristics of OOPs • Class definitions • Objects • Abstraction • Encapsulation • Inheritance • Generic classes • Polymorphism • Operator and Function overloading. • Message Passing
  14. 14. How OOPs work • Classes describe objects • Objects inherit from superclasses
  15. 15. Class Hierarchies
  16. 16. Advantages of OOPs • Simplicity • Modularity • Modifiability • Extensibility • Maintainability • Re-usability
  17. 17. OOPs in PHP • PHP 5 has a full object model as compared to PHP4. • PHP treats objects in the same way as references or handles, meaning that each variable contains an object reference rather than a copy of the entire object. • PHP supports Visibility, abstract and final classes and methods , additional magic methods, interfaces, cloning and typehinting
  18. 18. OOPs Features in PHP Autoloading : Autoloading is a mechanism where you can specify where the code should look for a class name that follows a particular pattern. Once you have set this up, usually very early in the script when everything gets configured, then you can simply instantiate classes without having to expressly include their declaration files.
  19. 19. OOPs Features in PHP Interfaces : PHP does not have multiple inheritance, so each object can only have one parent, and the top-level parent of all objects is of type StdClass. However PHP does support interfaces, which allows polymorphism (one class which can look like another) in PHP.
  20. 20. OOPs Features in PHP Type Hinting : We use the instanceOf comparison operator to check that an object with the correct capabilities had been received, but we can make this simpler by using type hinting in our functions and object methods. .
  21. 21. OOPs Features in PHP Fluent Interfaces : This is a neat trick that can often be seen in particular in framework code, so it is worth a mention here. A “fluent interface” is one where you can chain the methods together, useful especially where you would be calling a sequence of methods on the same object.
  22. 22. Thank You http://www.otssolutions.com/
  23. 23. USA India United kingdom4433 Merlin Gurgaon ( Haryana ) 88 Wood Street 795, Udyog Vihar, Phase-V Way , Soquel 10th Floor London Gurgaon(Haryana) IndiaCA 95073 EC2V 7RS Ph: +91 124 4101350United States +91 124 4748100 Ph: +44 208 099 1660Ph: +1 408 540 0001 Write to us at: sales@otssolutions.comWrite to us at: sales@otssolutions.com Write to us at: sales@otssolutions.com http://www.otssolutions.com/

×