Monday 26 May 2014

Yii Framework- the Future of the ecommerce development

There is no way that we are going to stick to the old commerce technique in this electronic era. For this computer obsessed generation, commerce has turned into eCommerce. With so many complications, we find ourselves recommending one platform and using it again and again Yii ecommerce development . Yii development describes itself as the “Fast, Secure and Professional PHP Framework”, as well as calling itself a “high-performance PHP framework best for eCommerce web application development”. Let us see this from the developer’s point of view. They find Yii development quiet easy and innovative.
Web development techniques are prone to changes. As a result of this developers rely on YII ecommerce development platform for achieving perfection. Web designing techniques are evolving from the basics to the advance level. Now the focus is not merely on development, it is on sublime development. So to be the torch bearer we must switch to YII development.
In a crude language we can say that YII is a extension of PHP development which is now gaining credence among the developers.

What makes YII hog the lime light:
Due to its advance features and tools Yii has eventually hogged the limelight in the market.
Moreover, its user friendly features make it the best PHP framework to develop our eCommerce websites.

Some of the features of Yii ecommerce development are listed below:

  • Mutable appearance
In order to refresh the look and feel of the websites, website owners should definitely go for Yii development as it offers this feature. This feature empowers them to design themes and skins of the website. For this the do not need to rely on any professional. This feature also allows to make other noteworthy changes in the websites.
  • jQuery Integration:
Another important feature which we have in Yii ecommerce development is its integration to jQuery. Due to this the incorporating properties like date-time picker and auto-complete input boxes need one line of code. With the help of this the lengthy code involving JavaScript, CSS and HTML code are eliminated.
  • Auto Code Generation:
Gii model is also supported by Yii, which enhances the development as creating template model, controllers, views are easy. Inclusion of the CRUD has ameliorated the performance. For creating a desired model with all attributes one need to just give the name of the table.
  • Features worth noting:
With all the incredible features described above Yii also have a cherry on its cake with features called I18N and L10N. These features instill an ease of access to your website. This enhances the credibility of the website as it no longer depends on the browser.

From the above discussion we have figured out that, Yii ecommerce development is like a modified extension of PHP. This makes it more approachable to the PHP developers as it saves the extra training efforts. This comforts them and also cuts the extra cost of the development.

With all these feature Yii ecommerce development gets an edge over its competitors.

Thursday 3 April 2014

How to develop CRUD apps using YII PHP Framework

YII has taken the PHP web development market like a storm. As we are into YII framework development from quite some time, we get a lot of queries from people about how can we develop CRUD apps using YII.  Today, we have tried to show how to do it in just few minutes. In order to development CRUD applications with YII, you should have Apache, PHP (5.1 or upper) and MySQL installed on your system. In case you don’t have these, we would recommend installing it. Now, log on to the official website of YII and download the latest version available there. The latest version of YII as of now is 1.1.13.

Now, you will have to extract the ZIP file to get the folder yii-1.1.13.e9e4a0 (this version identifier may differ depending upon the version you have downloaded) and rename it to yii, then move it to your web-accessible root directory. Here, it is C:\wamp\www so the location to the framework files will be C:\wamp\www\yii. Let’s call it <YiiRoot> throughout the write-up for better understanding.

Moving on, you should check which YII features will be supported by your system. You can go to http://localhost/yii/requirements/ in your browser and you can see the requirement details of the new framework. As we will be working with a MySQL database, please enable the MYSQL PDO extension.

Now, what I want you to understand here is every web app have a predefined directory structure. So YII web apps also need to maintain a hierarchical structure inside the web root. Now, to create a skeleton app with a suitable directory structure, we should use YII’d command line tool yii. Go to the web root and type the following:
<YiiRoot>frameworkyiic webapp yiitest

This will create a skeleton app called yii test with the minimum files required. Here, you will find index.php which will serve as an entry script; all it does is it accepts user requests and decides which controller should handle the request.

Here, we will develop a simple app where one can perform CRUD operations (create, retrieve, update and delete) on a blog post.

Step 1
First of all, create a MySQL database named with yiitest(Database name) and inside that database, create a table named posts. Majorly, the table will have just 3columns: id, title and content.
CREATE TABLE posts (
    id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
    title VARCHAR(100),
    content TEXT
)

Now, open up your application’s config file (protected/config/main.php) and uncomment the following:
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=testdrive,
'emulatePrepare' => true,
'username' => 'root',                        //username of your database
'password' => '',
'charset' => 'utf8',
)

Step 2
Every database table in YII should have a corresponding model class of type CActiveRecord. In this way, we don’t have to deal with the database tables directly. So, we can keep on working with model objects that correspond to different rows of a table.

Now, in order to generate the model quickly, you can use YII’s web-based tool gii. You can use this tool to generate models, controllers, and forms for CRUD operations. To make a use of gii in your project, you will have to find the following in your application’s config file and uncomment it and then can add a password.
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>your password to access gii,
'ipFilters'=>array('127.0.0.1','::1'),
)

Now, you can access gii with the following URL: http://localhost/yiitest/index.php?r=gii. In case you’re using user friendly URLs, the URL is: http://localhost/yiitest/gii.

Step 3
Now click on CRUD Generator. Enter the model name as “Post”. The controller ID will be auto populated as “post”. This means a new controller will be generated under the name of PostController.php.
Now click on the CRUD Generator and enter the model name as “Post”. Here, the ID of the controller will be auto populated as “post”. This means that a new controller will be generated with the name of PostController.php.
Now, click on “Generate”. Hence, the controller necessary for the CRUD operations will be generated.

As you can see here, it is really very easy to develop CRUD apps by using YII framework. YII is very powerful and make a lot of things quite easier for you. With skilled YII developers, YiiPro is leading the world of Yii php framework development. If you have any queries or ideas, please feel free to discuss it.