Cake PHP – OOPS approach for PHP

Slides:



Advertisements
Similar presentations
PHP + Framework + MVC. What is Framework? Common code - Generic functionality Extensible - Specific functionality Unlike library – Flow Dictated by.
Advertisements

Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Web Applications Development Using Coldbox Platform Eddie Johnston.
AJAX Implementation on Petrolwatch.com.sg Cake PHP & Script.aculo.us.
Ruby on Rails by Manik Juneja Ruby On Rails. Ruby on Rails by Manik Juneja Rails is a Web Application development framework. Based on the MVC pattern.
Object-Oriented PHP (1)
Basic OOP Concepts and Terms
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
Object-oriented Programming Concepts
Software Architecture Patterns (2). what is architecture? (recap) o an overall blueprint/model describing the structures and properties of a "system"
ASP.NET Programming with C# and SQL Server First Edition
Course Instructor: Aisha Azeem
C++ fundamentals.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
UNIT-V The MVC architecture and Struts Framework.
| Lugano, Ruby on Rails.
What is Object-Oriented Programming?. Objects – Variables and Logic inside "Objects", not standalone code – Objects contain related variables and functions.
Introduction To System Analysis and design
UFCEUS-20-2 : Web Programming Lecture 5 : Object Oriented PHP (1)
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Ruby & rails by Nicholas Belotti. What is ruby Ruby is an object orientated scripting language. In Ruby...everything is an object! Ruby was released in.
Introduction to Object-oriented programming and software development Lecture 1.
An Object-Oriented Approach to Programming Logic and Design
Codeigniter is an open source web application. It occupies a very small amount of space in the memory and is most useful for developers who aim to develop.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
CakePHP is an open source web development framework. It follows Model-View- Controller and is developed using PHP. IT is the basic for user to create.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Objected Oriented Programming & Design JAVA Shishir Gupta (704) (704)
Arnold Geraldo Designing and Making of The Online Auction Website Using CakePHP Framework.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
Design.ppt1 Top-down designs: 1. Define the Problem IPO 2. Identify tasks, Modularize 3. Use structure chart 4. Pseudocode for Mainline 5. Construct pseudocode.
Model View Controller MVC Web Software Architecture.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Learners Support Publications Object Oriented Programming.
Abstraction ADTs, Information Hiding and Encapsulation.
Chapter 6 – Architectural Design Lecture 1 1Chapter 6 Architectural design.
© 2007 Lawrenceville Press Slide 1 Chapter 8 Objects  A variable of a data type that is a class. Also called an instance of a class.  Stores data  Can.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 31. Review Creational Design Patterns – Singleton Pattern – Builder Pattern.
MVC WITH CODEIGNITER Presented By Bhanu Priya.
Date : 3/04/2010 Web Technology Solutions Class: PHP Web Application Frameworks.
Chapter 9 Web Application Design. Objectives Describe the MVC design pattern as used with Web applications Explain the role and responsibilities of each.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
Team: Daniel, Jeremy, Tai, Mike, Slavko (Formerly “Team Ramani Map”)
Introduction The concept of a web framework originates from the basic idea that every web application obtains its foundations from a similar set of guidelines.
PHP + Framework + MVC. What is Framework? Common code - Generic functionality Extensible - Specific functionality Unlike library – Flow Dictated.
Web Technology Solutions
OOP - Object Oriented Programming
Object Oriented Programming
Object-Oriented Programming Concepts
Top 12 PHP Frameworks 2016.
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
CHAPTER 5 GENERAL OOP CONCEPTS.
Interfaces Unit 08.
Content Management System
Distribution and components
Haritha Dasari Josue Balandrano Coronel -
PHP Training at GoLogica in Bangalore
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Types of Programming Languages
Ruby on Rails by Manik Juneja
Ruby on Rails by Manik Juneja
An Introduction to Software Architecture
Basic OOP Concepts and Terms
Object-Oriented PHP (1)
Oriented Design and Abstract Data Type
Presentation transcript:

Cake PHP – OOPS approach for PHP

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 Mapping, Front Controller and MVC.

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

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

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

Where not to use CakePHP ? Basic Blog Basic CMS Basic E-Commere Basic Forums / Bulletin Boards

Who is using CakePHP ?

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.

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.

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.

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.

Characteristics of OOPs Class definitions Objects Abstraction Encapsulation Inheritance Generic classes Polymorphism Operator and Function overloading. Message Passing

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 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

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.

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.

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..instanceOf

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.

Thank You

India Gurgaon ( Haryana ) 795, Udyog Vihar, Phase-V Gurgaon(Haryana) India Ph: Write to us at: United kingdom 88 Wood Street 10th Floor London EC2V 7RS Ph: Write to us at: USA 4433 Merlin Way, Soquel CA United States Ph: Write to us at: