All posts by Administrator

How to install Zend Framework 2 with Doctrine?

Composer makes ZF2 and Doctrine installation easy.

git clone git://github.com/zendframework/ZendSkeletonApplication.git
php composer.phar self-update
php composer.phar require doctrine/doctrine-orm-module:0.7.*
php composer.phar require zendframework/zend-developer-tools:dev-master
cp vendor/zendframework/zend-developer-tools/config/zenddevelopertools.local.php.dist config/autoload/zdt.local.php

chmod 777 data/cache/
./vendor/bin/doctrine-module orm:validate-schema
./vendor/bin/doctrine-module orm:schema-tool:create

php 5.5 new and deprecated features

Since php 5.5 is out now, There are some cool features and deprecated features I like to mentioned here.

PHP 5.5 New features

“Generators” support added
Support for generators has been added via the yield keyword. Generators provide an easy way to implement simple iterators without the overhead or complexity of implementing a class that implements the Iterator interface.

“Finally” keyword support added
try-catch blocks now support a finally block for code that should be run regardless of whether an exception has been thrown or not.

foreach now supports list()
The foreach control structure now supports unpacking nested arrays into separate variables via the list() construct.

empty() supports arbitrary expressions
Passing an arbitrary expression instead of a variable to empty() is now supported.

array and string literal dereferencing
Array and string literals can now be dereferenced directly to access individual elements and characters:

New password hashing API
A new password hashing API that makes it easier to securely hash and manage passwords using the same underlying library as crypt() in PHP has been added.

Apache 2.4 handler supported on Windows
The Apache 2.4 handler SAPI is now supported on Windows.

Improvements to GD
Various improvements have been made to the GD extension

php 5.5 deprecated features

ext/mysql deprecation
The original MySQL extension is now deprecated, and will generate E_DEPRECATED errors when connecting to a database. Instead, use the MySQLi or PDO_MySQL extensions.

preg_replace() /e modifier
The preg_replace() /e modifier is now deprecated. Instead, use the preg_replace_callback() function.

intl deprecations
IntlDateFormatter::setTimeZoneID() and datefmt_set_timezone_id() are now deprecated. Instead, use the IntlDateFormatter::setTimeZone() method and datefmt_set_timezone() function, respectively.

mcrypt deprecations
The following functions have been deprecated:
mcrypt_cbc()
mcrypt_cfb()
mcrypt_ecb()
mcrypt_ofb()

Ref1. http://www.php.net/manual/en/migration55.new-features.php
Ref2. http://www.php.net/manual/en/migration55.deprecated.php

fstab vs mtab

fstab

The fstab (/etc/fstab) (or file systems table) file is a system configuration file commonly found on Unix systems. It is part of the util-linux package. The fstab file typically lists all available disks and disk partitions, and indicates how they are to be initialized or otherwise integrated into the overall system’s file system. fstab is still used for basic system configuration, notably of a system’s main hard drive and startup file system, but for other uses has been superseded in recent years by automatic mounting.

The fstab file is most commonly used by the mount command, which reads the fstab file to determine which options should be used when mounting the specified device. It is the duty of the system administrator to properly create and maintain this file.

The file has other names on some versions of Unix; for instance, it is /etc/vfstab on Solaris. Continue reading

What is Software Architecture?

What is Software Architecture?

Software application architecture is the process of defining a structured solution that meets all of the technical and operational requirements, while optimizing common quality attributes such as performance, security, and manageability. It involves a series of decisions based on a wide range of factors, and each of these decisions can have considerable impact on the quality, performance, maintainability, and overall success of the application.

Philippe Kruchten, Grady Booch, Kurt Bittner, and Rich Reitman derived and refined a definition of architecture based on work by Mary Shaw and David Garlan (Shaw and Garlan 1996). Their definition is:

Continue reading