We are God’s candle…

One evening a man took a small candle from a box and began to climb a long winding stairway. “Where are we going?” asked the candle. “We’re going up higher than a house to show the ships the way to the harbor.” “But no ship in the harbor could ever see my light,” the candle said. “It is so very small.” “If your light is small,” the man said “just keep on burning brightly and leave the rest to me.” When they reached the top of the long stairs, they came to a large lamp. Then he took the little candle and lit the lamp. Soon the large polished mirrors behind the lamp sent beams of fight out across the miles of sea.

Continue reading

ZendFramework 1 vs ZendFramework 2

What is major difference between ZendFramework1 and ZendFramework2

  1. ZF1 Support MVC Architecture while ZF2 support MVC and MOVE both
  2. ZF2 brought new concept Dependency Injection
  3. ZF2 is based on PHP 5.3 and support namespaces, so class name naming convention has changed from classname  Zend_Db_Table (ZF1) for class in Zend/Db/Table.php whereas in ZF2, it is class MyAuthAdapter.
  4. ZF2 is little bit slow as compared to ZF1. But it has evovled a lot from ZF1 to ZF2.
  5. ZF2’s modules really are modular. You can drop in someone else’s module, and with a simple line added to your application config file, you can be up and running in seconds
  6. ZF2 There is no application level Bootstraping, each module is responsible for its own bootstraping in module.php file located in each module.
  7. ZF2 routing is fundamentally changed. There is no application level routing, instead, routing is added on a per-module basis.
  8. ZF2 Zend_Registry doesn’t exist in ZF2, it has been indirectly been replaced by ZendServiceManager
  9. ZF2 Introduce Event Manager. Event Manager (EM) allows you to attach code to discrete events that may (or may not) happen in your application.

 

Sources:

  • http://php.net/releases/5_3_0.php
  • http://framework.zend.com/manual/2.0/en/tutorials/quickstart.di.html
  • http://blog.hock.in/zf2-for-zf1-users-part-1
  • http://blog.hock.in/zf2-for-zf1-users-part-2

 

 

Does Zendframework based on Move Architecture?

ZendFramework is Just another Framework library which support building applications using MVC architecture. But ZendFramework 2 can be used building application using MOVE (Model Operations Views Events) architecture also along with conventional MVC.

ZendFramework 2 follow SOLID object oriented design principle.

 

Sources:

http://framework.zend.com/about

PHP 5.4

The key features of PHP 5.4.0 include:

  • New language syntax including Traits, shortened array syntax and more
  • Improved performance and reduced memory consumption
  • Support for multibyte languages now available in all builds of PHP at the flip of a runtime switch
  • Built-in webserver in CLI mode to simplify development workflows and testing
  • Cleaner code base thanks to the removal of multiple deprecated language features
  • Many more improvements and fixes

Changes that affect compatibility:

Extensions moved to PECL:

For users upgrading from PHP 5.3 there is a migration guide available here, detailing the changes between PHP 5.3 and PHP 5.4.0.

Change Ubuntu Server from DHCP to a Static IP

sometime Ubuntu Server installer is set to use DHCP, and later You want to change it Static IP, so that people can access it and it would not dynamically assigned ip.

Server usually don’t have GUI interface so we need to do it using bash commands.

Let’s open up the /etc/network/interfaces file. I’m going to use my favourite editor vi, but you can choose your own.

sudo vi /etc/network/interfaces

Continue reading