Posts Tagged ‘mvc Yii’

Installing Yii in wamp on Windows XP

February 3, 2010

I was successful in installing Yii  in wamp on Windows XP .

The versions are as follows:

Operating System : Windows XP Professional Version 2002 , Service Pack 2

Apache : 2.2.8

PHP : 5.2.6

MYSQL : 5.0.51b

Yii : 1.1.0 (January 10 2010)

Follow the following steps for installation:

1) Click on “Start”

2) goto “My Computer”

3) Right Click and select Properties

4) You will see “System Properties” window

5)  Select “Advanced”tab

6) In “Advanced” tab, click on “Environment Variables”

7) Select “Path” in “System Variables” section

8) Click on “Edit” on selevtion “Path” in “System Variables” section

9) “Edit System Varibale” window will appear with “Variable name” and “Variable value” fields

10)  Enter “C:\wamp\bin\php\php5.2.6” at the end without double quotes.

11)  Click on OK, OK and OK.

13) Click on Start > Run > cmd

14) It will take you to the command prompt

15) C:\>cd wamp\www

16) C:\wamp\www>mkdir myYii  (myYii is the name of the application you want)

17) C:\wamp\www>cd yii\framework

18) C:\wamp\www\yii\framework> yiic webapp c:\wamp\www\myYii
Create a Web application under ‘C:\wamp\www\myYii’? [Yes|No] y
mkdir C:/wamp/www/myYii/assets
mkdir C:/wamp/www/myYii/css
generate css/bg.gif
generate css/form.css
generate css/ie.css
generate css/main.css
generate css/print.css
generate css/screen.css
mkdir C:/wamp/www/myYii/images
generate index-test.php
generate index.php
mkdir C:/wamp/www/myYii/protected
generate protected/.htaccess
mkdir C:/wamp/www/myYii/protected/commands
mkdir C:/wamp/www/myYii/protected/commands/shell
mkdir C:/wamp/www/myYii/protected/components
generate protected/components/Controller.php
generate protected/components/UserIdentity.php
mkdir C:/wamp/www/myYii/protected/config
generate protected/config/console.php
generate protected/config/main.php
generate protected/config/test.php
mkdir C:/wamp/www/myYii/protected/controllers
generate protected/controllers/SiteController.php
mkdir C:/wamp/www/myYii/protected/data
generate protected/data/schema.mysql.sql
generate protected/data/schema.sqlite.sql
generate protected/data/testdrive.db
mkdir C:/wamp/www/myYii/protected/extensions
mkdir C:/wamp/www/myYii/protected/messages
mkdir C:/wamp/www/myYii/protected/models
generate protected/models/ContactForm.php
generate protected/models/LoginForm.php
mkdir C:/wamp/www/myYii/protected/runtime
mkdir C:/wamp/www/myYii/protected/tests
generate protected/tests/bootstrap.php
mkdir C:/wamp/www/myYii/protected/tests/fixtures
mkdir C:/wamp/www/myYii/protected/tests/functional
generate protected/tests/functional/SiteTest.php
generate protected/tests/phpunit.xml
mkdir C:/wamp/www/myYii/protected/tests/report
mkdir C:/wamp/www/myYii/protected/tests/unit
generate protected/tests/WebTestCase.php
mkdir C:/wamp/www/myYii/protected/views
mkdir C:/wamp/www/myYii/protected/views/layouts
generate protected/views/layouts/main.php
mkdir C:/wamp/www/myYii/protected/views/site
generate protected/views/site/contact.php
generate protected/views/site/error.php
generate protected/views/site/index.php
generate protected/views/site/login.php
mkdir C:/wamp/www/myYii/protected/views/site/pages
generate protected/views/site/pages/about.php
generate protected/yiic
generate protected/yiic.bat
generate protected/yiic.php
mkdir C:/wamp/www/myYii/themes
mkdir C:/wamp/www/myYii/themes/classic
mkdir C:/wamp/www/myYii/themes/classic/views
generate themes/classic/views/.htaccess
mkdir C:/wamp/www/myYii/themes/classic/views/layouts
mkdir C:/wamp/www/myYii/themes/classic/views/site
mkdir C:/wamp/www/myYii/themes/classic/views/system

Your application has been created successfully under C:\wamp\www\myYii.

Thats all. You are ready to use your application by accessing the URL : http://localhost/myYii/


Yii PHP MVC framework

February 1, 2010

Yii(Yes it is) is a php mvc framework  in competition with the existing frameworks such as CakePHP, Zend Symfony etc.

Soon it will gain popularity as it has many features such as :

  • MVC design pattern
  • DAO and Active Record
  • jQuery-based JavaScript support
  • I18N and L10N
  • Page, fragment and data caching
  • Error handling and logging
  • Theming
  • Web services
  • Console applications
  • Authentication and authorization
  • Web 2.0 widgets
  • Form input and validation

Following are the Performance comparison :

  • Yii: 673 requests/second
  • CodeIgniter: 206 requests/second
  • Zend: 83 requests/second
  • CakePHP: 79 requests/second
  • Prado: 75 requests/second
  • Symfony: 50 requests/second

People who are interested in using the frameworks should definitely try this 🙂

To know more about this framework, follow the given link: