Pages

Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Friday, September 5, 2014

Cakephp-Overview of Programming Patterns

Active Record Pattern

Active Record Pattern is for those application's which use relational databases.
The interface of an object conforming to this pattern would include functions such as Insert, Update, and Delete, plus properties that correspond more or less directly to the columns in the underlying database table.

Association Data Mapping

An Association data mapping pattern allows Relational object to associate with other Relational Objects the way they are associated in Relational Databases.

Front Controller

The Front Controller Pattern allows handling of all requests to be at a centralized location from where they are redirected specified Request Processors.

MVC

MVC expended as Model View Controller is a pattern where

Model's act as a wrapper classes for Database Table's
Controller's act as wrapper classes for Business Logic
and View act's as file for User Interface
 

Sunday, September 15, 2013

OOPS-PHP-Magic Methods

1. __get($property)

Get value for a property set in a class foe example

 function __get($property)  
 {  
 return $this->properties[$property];  
 }  


Usage: echo $st->name;

2. __set($property,$value) Set value for a property
 function __set($property, $value)  
 {  
 $this->properties[$property]="AutoSet {$property} as: ".$value;  
 }  


Usage: $st->roll=16;

3. __call()
overloads any undefined function in a class.Thus we can also call an undefined function and show custom error message.

 function __call($method, $arguments)  
 {  
 echo "You called a method named {$method} with the following  
 arguments <br/>";  
 print_r($arguments);  
 echo "<br/>";  
 }  

Usage: $ol->notAnyMethod("boo");

OOPS-What is the difference between Static and Final Keyword

Static
A static method remains common for all objects and can be called directly without the need of creation of any object.

For Example : classname::functionname();

A static property on the other end remains common for all the objects.It preserves its last changed state by any object.

Final
Final keyword on other end does not allows a class to be extended a method to be overridden in subclass or to change a property respective to its use in a class.

Saturday, September 14, 2013

OOPS-PHP-usefull functions

1. get_declared_classes();
Returns an array with the name of the defined classes.Useful when you have integrated a component or helper or vender class and what to know whether it's been included or not.

Wednesday, March 27, 2013

PHP Web Programming and Business Benefits of PHP Development

Inception of PHP is almost two decade old, when Danish programmer Rasmus Lerdorf created PHP in 1995. Inspired by that, in year 1997, two Israeli programmers Andi Gutmans and Zeev Suraski rewrote the parser, creating the base for PHP 3 and also built the Zend engine which is still followed as the interpreter for PHP.

Influence Of PHP Across Web

Today, almost two decades after countless colossal modifications to codebase, more than 35% of web traffic is handled by PHP. Facts on Wikipedia say 75% of websites use PHP, which includes some giant domains such as Facebook, Wikipedia, Yahoo, Photobucket and many others. Amazingly, list doesn’t end here; world’s best blogging platform “WordPress” and other popular CMSs like Drupal and Joomla are built in php.
Above mentioned facts are enough to claim the dominancy of PHP even in the presence of killer web development technologies. But, what are the reasons, why php hits the mainstream enterprise and why it is forecasted to maintain its momentum even in the coming years.
Success of php web programming totally bets on advantages which it offers to its users. Not only PHP developers find it convenient, but even end-users claim it to be friendly. Several studies have concluded some common advantages offered by php development, and they are as follow.

Free For All “Its Open Source”

Under GPL (General Public License) PHP is freely available for use, along with its associated software’s like MySQL, Text Editors and Apache Server to reduce your overall development cost. With the aim to serve you better, php community offers technical support and is constantly sweating hard to improve the core functionalities of PHP.

Cross-Platform Compatibility

It exhibits high compatibility with all the major OS and servers for easy deployment across vivid platforms. PHP scripts can run across OS like Linux, Windows, Solaris, OpenBSD, Mac OSX and others. It also provides support for all leading servers such as Apache, IIS, iPlanet and so on.

Powers Equally – Either Small or Big Websites

Either small or giant, whatever are your business needs a php based business website can be easily developed in not time and in limited budget. Business and organizational websites, informative forums, CRM solutions, e-commerce websites, community websites, e-business and gigantic database driven sites can be easily developed using php.

Extensions to Expand Functionalities

Plethora of extensions and libraries are available across the web using which you can extend core functionalities of your website. Even custom created extensions can be included into source code of PHP.

Top Security – For Hacker Proof Website

It offers top level security that helps prevent malicious attacks. These security stages can be easily attuned in the .ini file.

Veteran Developers to Execute Your Plans

You can hire PHP programmers/developers from reputed web development company more easily than any other language programmers. Just follow simple tips to hire veteran developers and stay away from worries.
In the end, if you are in the mood to add dynamic content to your project, then use of PHP is highly recommended. It free, easy to understand and integrates almost all the functionalities as per your needs. There are tons of php developers available on the net. Please don’t hesitate to add anything if I have missed some other great PHP benefits. Feel free to share your thoughts with other readers.