|
|
@@ -1,21 +1,22 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!-- Reviewed: no -->
|
|
|
<sect1 id="learning.quickstart.intro">
|
|
|
- <title>ZF & MVC Introduction</title>
|
|
|
+ <title>Zend Framework & MVC Introduction</title>
|
|
|
|
|
|
<sect2 id="learning.quickstart.intro.zf">
|
|
|
<title>Zend Framework</title>
|
|
|
|
|
|
<para>
|
|
|
- Zend Framework is an open source, object oriented web application framework for PHP 5.
|
|
|
- ZF is often called a 'component library', because it has many loosely coupled components
|
|
|
- that you can use more or less independently. But Zend Framework also provides an
|
|
|
- advanced Model-View-Controller (MVC) implementation that can be used to establish a
|
|
|
- basic structure for your ZF applications. A full list of Zend Framework components along
|
|
|
- with short descriptions may be found in the <ulink
|
|
|
+ Zend Framework is an open source, object oriented web application framework for
|
|
|
+ <acronym>PHP</acronym> 5. Zend Framework is often called a 'component library', because
|
|
|
+ it has many loosely coupled components that you can use more or less independently. But
|
|
|
+ Zend Framework also provides an advanced Model-View-Controller (<acronym>MVC</acronym>)
|
|
|
+ implementation that can be used to establish a basic structure for your Zend Framework
|
|
|
+ applications. A full list of Zend Framework components along with short descriptions may
|
|
|
+ be found in the <ulink
|
|
|
url="http://framework.zend.com/about/components">components overview</ulink>. This
|
|
|
- QuickStart will introduce you to some of ZF's most commonly used components, including
|
|
|
- <classname>Zend_Controller</classname>, <classname>Zend_Layout</classname>,
|
|
|
+ QuickStart will introduce you to some of Zend Framework's most commonly used components,
|
|
|
+ including <classname>Zend_Controller</classname>, <classname>Zend_Layout</classname>,
|
|
|
<classname>Zend_Config</classname>, <classname>Zend_Db</classname>,
|
|
|
<classname>Zend_Db_Table</classname>, <classname>Zend_Registry</classname>, along
|
|
|
with a few view helpers.
|
|
|
@@ -48,12 +49,13 @@
|
|
|
<title>Model-View-Controller</title>
|
|
|
|
|
|
<para>
|
|
|
- So what exactly is this MVC pattern everyone keeps talking about, and why should you
|
|
|
- care? MVC is much more than just a three-letter acronym (TLA) that you can whip out
|
|
|
- anytime you want to sound smart; it has become something of a standard in the design of
|
|
|
- modern web applications. And for good reason. Most web application code falls under one
|
|
|
- of the following three categories: presentation, business logic, and data access. The
|
|
|
- MVC pattern models this separation of concerns well. The end result is that your
|
|
|
+ So what exactly is this <acronym>MVC</acronym> pattern everyone keeps talking about, and
|
|
|
+ why should you care? <acronym>MVC</acronym> is much more than just a three-letter
|
|
|
+ acronym (<acronym>TLA</acronym>) that you can whip out anytime you want to sound smart;
|
|
|
+ it has become something of a standard in the design of modern web applications. And for
|
|
|
+ good reason. Most web application code falls under one of the following three
|
|
|
+ categories: presentation, business logic, and data access. The <acronym>MVC</acronym>
|
|
|
+ pattern models this separation of concerns well. The end result is that your
|
|
|
presentation code can be consolidated in one part of your application with your business
|
|
|
logic in another and your data access code in yet another. Many developers have found
|
|
|
this well-defined separation indispensable for keeping their code organized, especially
|
|
|
@@ -87,7 +89,8 @@
|
|
|
<emphasis role="strong">View</emphasis> - Views define exactly what is
|
|
|
presented to the user. Usually controllers pass data to each view to render
|
|
|
in some format. Views will often collect data from the user, as well. This
|
|
|
- is where you're likely to find HTML markup in your MVC applications.
|
|
|
+ is where you're likely to find <acronym>HTML</acronym> markup in your
|
|
|
+ <acronym>MVC</acronym> applications.
|
|
|
</para>
|
|
|
</listitem>
|
|
|
|
|
|
@@ -96,8 +99,8 @@
|
|
|
<emphasis role="strong">Controller</emphasis> - Controllers bind the whole
|
|
|
pattern together. They manipulate models, decide which view to display based
|
|
|
on the user's request and other factors, pass along the data that each view
|
|
|
- will need, or hand off control to another controller entirely. Most MVC
|
|
|
- experts recommend <ulink
|
|
|
+ will need, or hand off control to another controller entirely. Most
|
|
|
+ <acronym>MVC</acronym> experts recommend <ulink
|
|
|
url="http://weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model">keeping
|
|
|
controllers as skinny as possible</ulink>.
|
|
|
</para>
|