Tuesday, 27 September 2011

Yii Development - Under the roof guide



Yii Framework Development - Yii Development Company offers Yii Web Application development solution. After analyzing all the framework together we have also found that the Framework is super secure, fast, and less time consuming.

Let's Check out the things needs to be started in order to develop the Yii framework application development.

Learn About:
  1. Using getters and setters
  2. Using Yii events
  3. Using import and autoloading
  4. Using exceptions
  5. Configuring components
  6. Configuring widget defaults
  7. Using Yii core collections
  8. Working with request

All the topics related to Yii Framework development - they have not covered in http://www.yiiframework.com/doc/guide/ official website. Our experienced Yii developers usually use these. Yet, features described above are
relatively simple and using them makes development with Yii much more fun and productive.

Using getters and setters
Yii has many features that came from other languages, such as Java or C#. One of them is defining properties with getters and setters for any of the class extended from CComponent(that is, virtually any Yii class).

you will need to have an experience on how to define your own properties using getters and setters, how to make your code read-only, and how to hide custom processing behind native PHP.

Using Yii Events:
Most Yii classes are extended from CComponent which allows to achieve great web application flexibility by using events. An event is a message indicating that the application did something.

Yii framework also offers to register several event handlers that will react to certain event types. A handler can get parameters from an event it works with and react accordingly. Using events allows achieving great application flexibility.

Using import and autoloading
When programming with PHP, one of the most annoying things is loading additional code with include and require. Fortunately, you can do it automatically using the SPL class loader (http://php.net/manual/en/function.spl-autoload.php).

Autoloading is one of the features which Yii relies on. Still, there are many questions about it on the forums. Let's get it clear and show how we can use it.
When we are using a class, for example, CDbCriteria, we are not including it explicitly so PHP initially cannot find it and is trying to rely on the autoloading feature; SPL autoloader to be precise. In most cases, Yii default autoloader (YiiBase::autoload) will be used.

For the sake of speed and simplicity, almost all core framework classes are loaded when needed without including or importing them explicitly. It's done through YiiBase::$_coreClasses map, so loading core classes is very fast. Zii classes, such as CMenu, extension classes or your own classes are not loaded automatically, so we need to import them first.

To import classes, we will use Yii::import:
- Import does not include a class immediately by default
- It does not include a class if it is not used
- It will not load a class twice, so it is safe to import the same class multiple times

.... on above topics more will come soon... keep visiting our blog.

Hire Yii Framework Development Services @ Inheritx Solution