rss

PHP ORM: Doctrine 2

Category : PHP

At the start of my career as a developer, there were almost no ORM for PHP, there existed some classes that enabled you to easily access DB but not ORM.

ORM(Object Relational Mapping) in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. In other words it maps the relational database to the objects in your application. So each table becomes and object.

Doctrine is one of the powerful ORM present for PHP and with Doctrine 2 its has provided more features and ease of accessing database.

Share

Creational design patterns

Category : Application Design

SingletonEnsure that only one instance of a class is created and Provide a global access point to the object.

Factory (Simplified version of Factory Method) – Creates objects without exposing the instantiation logic to the client and Refers to the newly created object through a common interface.
Factory MethodDefines an interface for creating objects, but let subclasses to decide which class to instantiate and Refers to the newly created object through a common interface.
Abstract Factory – Offers the interface for creating a family of related objects, without explicitly specifying their classes.
Builder – Defines an instance for creating an object but letting subclasses decide which class to instantiate and Allows a finer control over the construction process.
Prototype – Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
Object Pool – reuses and shares objects that are expensive to create..

Share

Amit Yadav is Stephen Fry proof thanks to caching by WP Super Cache