Skip to content

Commit

Permalink
doc update.
Browse files Browse the repository at this point in the history
  • Loading branch information
qiang.xue committed May 13, 2011
1 parent b7c4c63 commit bb57584
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 41 deletions.
32 changes: 16 additions & 16 deletions docs/guide/quickstart.first-app.txt
@@ -1,8 +1,8 @@
Creating First Yii Application
==============================
Creating Your First Yii Application
===================================

To get an initial experience with Yii, we describe in this section how to
create our first Yii application. We will use `yiic` (command line tool)
To give you an initial experience with Yii, in this section we describe how to
create your first Yii application. We will use `yiic` (command line tool)
to create a new Yii application and `Gii` (powerful web based code generator)
to automate code creation for certain tasks. For convenience,
we assume that `YiiRoot` is the directory where Yii is installed, and `WebRoot`
Expand Down Expand Up @@ -46,14 +46,14 @@ contents. See the following screenshots for more details.

![Contact page with input errors](first-app3.png)

![Contact page with success](first-app4.png)
![Contact page with success message](first-app4.png)

![Login page](first-app5.png)


The following diagram shows the directory structure of our application.
Please see [Conventions](/doc/guide/basics.convention#directory) for detailed
explanation about this structure.
Please see [Conventions](/doc/guide/basics.convention#directory) for a detailed
explanation.

~~~
testdrive/
Expand Down Expand Up @@ -143,20 +143,20 @@ CREATE TABLE tbl_user (
If you want to try a MySQL database instead, you may use the included MySQL
schema file `WebRoot/testdrive/protected/data/schema.mysql.sql` to create the database.

> Note: To use Yii's database feature, we need to enable PHP PDO extension
> Note: To use Yii's database feature, we need to enable the PHP PDO extension
and the driver-specific PDO extension. For the test-drive application, we
need to turn on both the `php_pdo` and `php_pdo_sqlite` extensions.


Implementing CRUD Operations
----------------------------

Now is the fun part. We would like to implement the CRUD (create, read,
Now comes the fun part. We would like to implement CRUD (create, read,
update and delete) operations for the `tbl_user` table we just created. This is
also commonly needed in practical applications. Instead of taking the trouble
to write the actual code, we will use `Gii` -- a powerful Web-based code generator.

> Info: Gii has been available since version 1.1.2. Before that, we can use the aforementioned `yiic` tool to accomplish the same goal. For more details, please refer to [Implementing CRUD Operations with yiic shell](/doc/guide/quickstart.first-app-yiic).
> Info: Gii has been available since version 1.1.2. Before that, we could use the aforementioned `yiic` tool to accomplish the same goal. For more details, please refer to [Implementing CRUD Operations with yiic shell](/doc/guide/quickstart.first-app-yiic).


### Configuring Gii
Expand All @@ -183,7 +183,7 @@ return array(

Then, visit the URL `http://hostname/testdrive/index.php?r=gii`. We will be prompted for a password, which should be the one that we just entered in the above application configuration.

### Generating User Model
### Generating the User Model

After login, click on the link `Model Generator`. This will bring us to the following model generation page,

Expand All @@ -210,13 +210,13 @@ http://hostname/testdrive/index.php?r=user
This will display a list of user entries in the `tbl_user` table.

Click the `Create User` button on the page. We will be brought to the login
page if we have not logged in before. After logged in, we see
page if we have not logged in before. After logging in, we see
an input form that allows us to add a new user entry. Complete the form and
click on the `Create` button. If there is any input error, a nice error
prompt will show up which prevents us from saving the input. Back to the
click the `Create` button. If there is any input error, a nice error
prompt will show up which prevents us from saving the input. Back on the
user list page, we should see the newly added user appearing in the list.

Repeat the above steps to add more users. Notice that user list page
Repeat the above steps to add more users. Notice that the user list page
will automatically paginate the user entries if there are too many to be
displayed in one page.

Expand All @@ -242,4 +242,4 @@ of code!



<div class="revision">$Id$</div>
<div class="revision">$Id$</div>
19 changes: 9 additions & 10 deletions docs/guide/quickstart.installation.txt
Expand Up @@ -9,24 +9,23 @@ Installation of Yii mainly involves the following two steps:
> Tip: Yii does not need to be installed under a Web-accessible directory.
A Yii application has one entry script which is usually the only file that
needs to be exposed to Web users. Other PHP scripts, including those from
Yii, should be protected from Web access since they may be exploited for
hacking.
Yii, should be protected from Web access; otherwise they might be exploited
by hackers.

Requirements
------------

After installing Yii, you may want to verify that your server satisfies
all the requirements of using Yii. You can do so by accessing the
requirement checker script at the following URL in a Web browser:
Yii's requirements. You can do so by accessing the requirement checker
script via the following URL in a Web browser:

~~~
http://hostname/path/to/yii/requirements/index.php
~~~

The minimum requirement by Yii is that your Web server supports PHP 5.1.0
or above. Yii has been tested with [Apache HTTP
server](http://httpd.apache.org/) on Windows and Linux operating systems.
It may also run on other Web servers and platforms, provided PHP 5 is
supported.
Yii requires PHP 5.1, so the server must have PHP 5.1 or above installed and
available to the web server. Yii has been tested with [Apache HTTP server](http://httpd.apache.org/)
on Windows and Linux. It may also run on other Web servers and platforms,
provided PHP 5.1 is supported.

<div class="revision">$Id$</div>
<div class="revision">$Id$</div>
29 changes: 14 additions & 15 deletions docs/guide/quickstart.what-is-yii.txt
@@ -1,17 +1,17 @@
What is Yii
===========

Yii is a high-performance component-based PHP framework for developing
Yii is a high-performance, component-based PHP framework for developing
large-scale Web applications rapidly. It enables maximum reusability in Web
programming and can significantly accelerate your Web application development process. The
name Yii (pronounced as `Yee` or `[ji:]`) stands for *easy*,
programming and can significantly accelerate your Web application development
process. The name Yii (pronounced `Yee` or `[ji:]`) stands for *easy*,
*efficient* and *extensible*.

Requirements
------------

To run a Yii-powered Web application, you need a Web server supporting
PHP 5.1.0 or higher.
To run a Yii-powered Web application, you need a Web server that supports
PHP 5.1.0.

For developers who want to use Yii, understanding object-oriented
programming (OOP) is very helpful, because Yii is a pure OOP framework.
Expand All @@ -20,22 +20,21 @@ What is Yii Best for?
---------------------

Yii is a generic Web programming framework that can be used for developing
virtually all sorts of Web applications. Because it is light-weighted and
equipped with sophisticated caching solutions, it is especially suitable
for developing high-traffic applications, such as portals, forums, content
virtually any type of Web application. Because it is light-weight and
equipped with sophisticated caching mechanisms, it is especially suited
to high-traffic applications, such as portals, forums, content
management systems (CMS), e-commerce systems, etc.

How is Yii Compared with Other Frameworks?
How does Yii Compare with Other Frameworks?
------------------------------------------

Like most PHP frameworks, Yii is an MVC framework.

Yii excels over other PHP frameworks in that it is efficient, feature-rich
and clearly-documented. Yii is carefully designed from the beginning to fit
Yii excels other PHP frameworks at being efficient, feature-rich and
clearly-documented. Yii is carefully designed from the ground up to be fit
for serious Web application development. It is neither a byproduct of some
project nor a conglomerate of third-party work. It is the result of the
authors' rich experience of Web application development and the
investigation and reflection of the most popular Web programming frameworks
and applications.
authors' rich experience with Web application development and their investigation
of the most popular Web programming frameworks and applications.

<div class="revision">$Id$</div>
<div class="revision">$Id$</div>

0 comments on commit bb57584

Please sign in to comment.