TechAlpine – The Technology world

What is DooPHP?

Overview: DooPHP is a high performance open source PHP framework. It is also a rapid development framework for PHP application development. It uses common design patterns like MVC and ORM. The framework helps to write less code for performing tasks and also reduce development costs.

In this article, I will talk about DooPHP features and other related details.

Introduction: DooPHP is one of the fastest available PHP frameworks. It helps developers to develop robust web applications based on web 2.0. It is very light weight and it has a small source code footprint. DooPHP is easy to learn. This framework is highly capable to deliver faster page loads beyond any comparison. While this framework is fast, it is also quite feature rich. DooPHP supports the common features which are essential on a web platform. As a developer, in order to learn DooPHP, one should only know PHP and Object Oriented Programming. DooPHP framework focuses on the following core areas –

  • MVC
  • REST
  • URI Routing
  • ORM
  • Flexible Template Engine
  • Easy to use
  • High Performance
  • Logging and profiling tools
  • Authentication

Features of DooPHP:

DooPHP comes with the features that are used in the Web 2.0 development. It follows a very loosely coupled design which helps the developers to add new functionalities to the framework very easily. Features with the Doo framework comes up are –

  • MVC Architecture – MVC stands for Model View Controller. Doo framework adopts the proven technique of splitting the application into separate layers –
    • The presentation layer – View
    • The business logic layer – Controller
    • The data access layer – Model

Using these three components we can easily achieve robustness and code reusability.

  • URI Routing – Doo provides sophisticated processes for URL mappings to controllers, actions and also to generate URLs. It can also be used for external code which doesn’t follow the MVC pattern. With the URI routing feature, we get clean and simple URL for our website. 

For example a complicated URL – “http://mydomain.net/mainPage.php?sectionPage=news&year=2014&month=07&day=25”

Can be simplified to “http://mydomain.net/news/2014/07/25 “with the help of URI routing feature

  • Authorization – DooPHP has got a built in Authorization and Authentication It uses ACL or Access Control List which is easy to use. ACL defines the rules in a single flat file which is easy to use and maintain.
  • Database Replications – DooPHP is based on the master slave database setup. DooPHP can easily be integrated with MYSQL database which supports the master slave feature.
  • Data Cache – DooPHP has its own data caching mechanism and supports –
    • Disk Cache
    • APC or Alternative PHP Cache
    • Mem Cache
    • XCache
    • EAccelerator

Best part of this caching mechanism is that the storage media of caching can be changed easily without making any change in the code.

  • Frontend Cache – DooPHP has a very sophisticated frontend cache mechanism which supports both partial page cache and full page cache. In the frontend cache we can customise which page is to be cached and which is not. This provides a great help in speeding up any website.
  • Code Generation – DooPHP provides tools which can easily and automatically generate code which we require e.g. routing, Controller and model files. These tools are GUI based, thus very easy to use. Any beginner can get started easily with the help of these GUI based tools.
  • Internationalization – In DooPHP we can easily extend the controller to add new features like multi lingual support to our application
  • High Performance – DooPHP is the fastest pattern which follows MVC. It uses the lazy loading approach and also avoids using functions or methods which are relatively slow. It has a small memory footprint which is used to store the frontend cache.
  • Centralized Configuration – In DooPHP configurations are defined as associative array which is easily readable and familiar to all PHP developers. Over all there are only three configuration file in Doo PHP –
    • Common Project settings
    • Routing related settings and configurations
    • Database related settings and configurations
  • RESTful API – Most common websites which are based on web 2.0 have REST enabled web services. If you are building your own RESTFull API which makes request to 3rd party web services, for example social media websites – facebook or twitter, we can easily integrate these using DooPHP as it has a native support to REST.
  • Database ORM Tool – DooPHP has a database abstraction layer and inbuilt ORM tool. We don’t need any manual SQL. It has the ability to escape malicious input characters. Using Doo, working with CRUD and relational databases are become easier.
  • Flexible templates – Doo has the ability to provide flexible template mechanism thus allowing the end user to customise the website as per their choice. While achieving this target, we won’t like to have any malicious function call in the template which might crash the entire application. In short, the template should remain as HTML as it can be. DooPHP allows us to have a control on the contents and decide what should be allowed in the template and what not.
  • HTTP Authentication – DooPHP has an out of the box support for HTTP Digest auth. We can have simple authentication for a file, page, controller or action classes by simply defining the routes or by a simple method call.
  • Works anywhere – Doo PHP doesn’t require any other tools or utility apart from the standard PHP library. It can run on any PHP mode: mod_php, CGI or FastCGI. Applications can be deployed on the domain root directory or on any sub folder or any sub domain.
  • E_Strict – DooPHP is E_Strict complaint and it doesn’t throw any unwanted notices, errors or warnings to the end users.
  • AJAX Support – DooPHP has a good support to AJAX library. It also works fine with JavaScript, Jquery etc.

Installation & Setup:

DooPHP requires the PHP version 5.1.x or higher version of PHP. If you are a beginner, it is recommended to use the WAMP server which has Apache, Mysql and PHP combined.

Running DooPHP on Google App Engine:

The Google App Engine is based on the PAAS concept. This engine comes up with the following advantages –

  • Faster development
  • Faster deployment
  • Simple administration
  • No need to take the hassle of patches and backups
  • Easily scalable

The current version of Google App engine has support for only Python and Java. There is no direct support for PHP. However with the help of Quercus (open source Java Implementation of PHP) we can easily run DooPHP on Google App Engine.

Summary: In the above discussion, we have covered the main features of DooPHP, its importance, installation etc. It is one of the most popular rapid development frameworks for PHP developers with support to related components like ORM, authentication, caching, internationalization etc. Let us conclude our discussion in the form of following bullets.

  • Doo PHP is one of the fastest available PHP frameworks.
  • It is easy to learn – One should have the knowledge of Object Oriented Programming and PHP.
  • Doo PHP comes with an array of features. The important ones are listed below –
    • High performance.
    • Less learning curve.
    • Great flexibility.
    • It’s lightweight. The core package is less than 1mb.
    • Http Authentication.
    • Support for MVC and RESTFul APIs.
    • URI Routing.
    • Internationalization.
    • Flexible templates.
    • Easy to integrate with any environment.
Tagged on:

Leave a Reply

Your email address will not be published. Required fields are marked *


8 + 8 =

TechAlpine Books
-----------------------------------------------------------