summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Fundamentals
diff options
context:
space:
mode:
authorxue <>2006-05-09 12:11:38 +0000
committerxue <>2006-05-09 12:11:38 +0000
commitf4de82bcdafba51e4eed9cae6b2d3e5375ffd115 (patch)
tree08f98e1763e87f0639961c6da33224082345c7c3 /demos/quickstart/protected/pages/Fundamentals
parent92dca3315f083f00dcff610ea207af52284d0616 (diff)
Diffstat (limited to 'demos/quickstart/protected/pages/Fundamentals')
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Applications.page8
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Architecture.page2
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Components.page16
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Controls.page10
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Hangman.page2
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Modules.page12
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Pages.page6
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Services.page4
8 files changed, 30 insertions, 30 deletions
diff --git a/demos/quickstart/protected/pages/Fundamentals/Applications.page b/demos/quickstart/protected/pages/Fundamentals/Applications.page
index b33b4f10..48db41e8 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Applications.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Applications.page
@@ -1,6 +1,6 @@
<com:TContent ID="body" >
-<h1>Applications</h1>
+<h1 id="1201">Applications</h1>
<p>
An application is an instance of <tt>TApplication</tt> or its derived class. It manages modules that provide different functionalities and are loaded when needed. It provides services to end-users. It is the central place to store various parameters used in an application. In a PRADO application, the application instance is the only object that is globally accessible via <tt>Prado::getApplication()</tt> function call.
</p>
@@ -14,7 +14,7 @@ $application->run();
where the method <tt>run()</tt> starts the application to handle user requests.
</p>
-<h2>Directory Organization</h2>
+<h2 id="1202">Directory Organization</h2>
<p>
A minimal PRADO application contains two files: an entry file and a page template file. They must be organized as follows,
</p>
@@ -33,7 +33,7 @@ A minimal PRADO application contains two files: an entry file and a page templat
A product PRADO application usually needs more files. It may include an application configuration file named <tt>application.xml</tt> under the application base path <tt>protected</tt>. The pages may be organized in directories, some of which may contain page configuration files named <tt>config.xml</tt>. Fore more details, please see <a href="?page=Configurations.Overview">configurations</a> section.
</p>
-<h2>Application Deployment</h2>
+<h2 id="1203">Application Deployment</h2>
<p>
Deploying a PRADO application mainly involves copying directories. For example, to deploy the above minimal application to another server, follow the following steps,
</p>
@@ -43,7 +43,7 @@ Deploying a PRADO application mainly involves copying directories. For example,
<li>Remove all content under <tt>assets</tt> and <tt>runtime</tt> directories and make sure both directories are writable by the Web server process.</li>
</ol>
-<h2>Application Lifecycles</h2>
+<h2 id="1204">Application Lifecycles</h2>
<p>
Like page lifecycles, an application also has lifecycles. Application modules can register for the lifecycle events. When the application reaches a particular lifecycle and raises the corresponding event, the registered module methods are invoked automatically. Modules included in the PRADO release, such as <tt>TAuthManager</tt>, are using this way to accomplish their goals.
</p>
diff --git a/demos/quickstart/protected/pages/Fundamentals/Architecture.page b/demos/quickstart/protected/pages/Fundamentals/Architecture.page
index d53b7ee1..5811da71 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Architecture.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Architecture.page
@@ -1,5 +1,5 @@
<com:TContent ID="body" >
-<h1>Architecture</h1>
+<h1 id="601">Architecture</h1>
<p>
PRADO is primarily a presentational framework, although it is not limited to be so. The framework focuses on making Web programming, which deals most of the time with user interactions, to be component-based and event-driven so that developers can be more productive. The following class tree depicts some of the major classes provided by PRADO,
diff --git a/demos/quickstart/protected/pages/Fundamentals/Components.page b/demos/quickstart/protected/pages/Fundamentals/Components.page
index c419a5fa..dc4da67c 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Components.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Components.page
@@ -1,10 +1,10 @@
<com:TContent ID="body" >
-<h1>Components</h1>
+<h1 id="701">Components</h1>
<p>
A component is an instance of <tt>TComponent</tt> or its child class. The base class <tt>TComponent</tt> implements the mechanism of component properties and events.
</p>
-<h2>Component Properties</h2>
+<h2 id="702">Component Properties</h2>
<p>
A component property can be viewed as a public variable describing a specific aspect of the component, such as the background color, the font size, etc. A property is defined by the existence of a getter and/or a setter method in the component class. For example, in <tt>TControl</tt>, we define its <tt>ID</tt> property using the following getter and setter methods,
<com:TTextHighlighter CssClass="source">
@@ -34,7 +34,7 @@ $component->setID( $id );
A property is read-only if it has a getter method but no setter method. Since PHP method names are case-insensitive, property names are also case-insensitive. A component class inherits all its ancestor classes' properties.
</p>
-<h3>Subproperties</h3>
+<h3 id="706">Subproperties</h3>
<p>
A subproperty is a property of some object-typed property. For example, <tt>TWebControl</tt> has a <tt>Font</tt> property which is of <tt>TFont</tt> type. Then the <tt>Name</tt> property of <tt>Font</tt> is referred to as a subproperty (with respect to <tt>TWebControl</tt>).
</p>
@@ -53,7 +53,7 @@ $component-&gt;getFont()-&gt;setName( $name );
</p>
-<h2>Component Events</h2>
+<h2 id="703">Component Events</h2>
<p>
Component events are special properties that take method names as their values. Attaching (setting) a method to an event will hook up the method to the places at which the event is raised. Therefore, the behavior of a component can be modified in a way that may not be foreseen during the development of the component.
</p>
@@ -76,7 +76,7 @@ $button->attachEventHandler( 'OnClick' , $callback );
where <tt>$callback</tt> refers to a valid PHP callback (e.g. a function name, a class method <tt>array($object,'method')</tt>, etc.)
</p>
-<h2>Namespaces</h2>
+<h2 id="704">Namespaces</h2>
<p>
A namespace refers to a logical grouping of some class names so that they can be differentiated from other class names even if their names are the same. Since PHP does not support namespace intrinsically, you cannot create instances of two classes who have the same name but with different definitions. To differentiate from user defined classes, all PRADO classes are prefixed with a letter 'T' (meaning 'Type'). Users are advised not to name their classes like this. Instead, they may prefix their class names with any other letter(s).
</p>
@@ -102,12 +102,12 @@ which will include the class file if <tt>MyClass</tt> is not defined.
For more details about defining path aliases, see <a href="?page=Configurations.AppConfig">application configuration</a> section.
</p>
-<h2>Component Instantiation</h2>
+<h2 id="705">Component Instantiation</h2>
<p>
Component instantiation means creating instances of component classes. There are two types of component instantation: static instantiation and dynamic instantiation. The created components are called static components and dynamic components, respectively.
</p>
-<h3>Dynamic Component Instantiation</h3>
+<h3 id="707">Dynamic Component Instantiation</h3>
<p>
Dynamic component instantiation means creating component instances in PHP code. It is the same as the commonly referred object creation in PHP. A component can be dynamically created using one of the following two methods in PHP,
<com:TTextHighlighter CssClass="source">
@@ -117,7 +117,7 @@ $component = Prado::createComponent('ComponentType');
where <tt>ComponentType</tt> refers to a class name or a type name in namespace format (e.g. <tt>System.Web.UI.TControl</tt>). The second approach is introduced to compensate for the lack of namespace support in PHP.
</p>
-<h3>Static Component Instantiation</h3>
+<h3 id="708">Static Component Instantiation</h3>
<p>
Static component instantiation is about creating components via <a href="?page=Configurations.Overview">configurations</a>. The actual creation work is done by the PRADO framework. For example, in an <a href="?page=Configurations.AppConfig">application configuration</a>, one can configure a module to be loaded when the application runs. The module is thus a static component created by the framework. Static component instantiation is more commonly used in <a href="?page=Configurations.Templates1">templates</a>. Every component tag in a template specifies a component that will be automatically created by the framework when the template is loaded. For example, in a page template, the following tag will lead to the creation of a <tt>TButton</tt> component on the page,
<com:TTextHighlighter Language="prado" CssClass="source">
diff --git a/demos/quickstart/protected/pages/Fundamentals/Controls.page b/demos/quickstart/protected/pages/Fundamentals/Controls.page
index a90dd604..d36bff7a 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Controls.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Controls.page
@@ -1,10 +1,10 @@
<com:TContent ID="body" >
-<h1>Controls</h1>
+<h1 id="801">Controls</h1>
<p>
A control is an instance of class <tt>TControl</tt> or its subclass. A control is a component defined in addition with user interface. The base class <tt>TControl</tt> defines the parent-child relationship among controls which reflects the containment relationship among user interface elements.
</p>
-<h2>Control Tree</h2>
+<h2 id="802">Control Tree</h2>
<p>
Controls are related to each other via parent-child relationship. Each parent control can have one or several child controls. A parent control is in charge of the state transition of its child controls. The rendering result of the child controls are usually used to compose the parent control's presentation. The parent-child relationship brings together controls into a control tree. A page is at the root of the tree, whose presentation is returned to the end-users.
</p>
@@ -17,12 +17,12 @@ $parent->Controls[]=$child;
where the property <tt>Controls</tt> refers to the child control collection of the parent.
</p>
-<h2>Control Identification</h2>
+<h2 id="803">Control Identification</h2>
<p>
Each control has an <tt>ID</tt> property that can be uniquely identify itself among its sibling controls. In addition, each control has a <tt>UniqueID</tt> and a <tt>ClientID</tt> which can be used to globally identify the control in the tree that the control resides in. <tt>UniqueID</tt> and <tt>ClientID</tt> are very similar. The former is used by the framework to determine the location of the corresponding control in the tree, while the latter is mainly used on the client side as HTML tag IDs. In general, you should not rely on the explicit format of <tt>UniqueID</tt> or <tt>ClientID</tt>.
</p>
-<h2>Naming Containers</h2>
+<h2 id="804">Naming Containers</h2>
<p>
Each control has a naming container which is a control creating a unique namespace for differentiating between controls with the same <tt>ID</tt>. For example, a <tt>TRepeater</tt> control creates multiple items each having child controls with the same <tt>ID</tt>s. To differentiate these child controls, each item serves as a naming container. Therefore, a child control may be uniquely identified using its naming container's <tt>ID</tt> together with its own <tt>ID</tt>. As you may already have understood, <tt>UniqueID</tt> and <tt>ClientID</tt> rely on the naming containers.
</p>
@@ -30,7 +30,7 @@ Each control has a naming container which is a control creating a unique namespa
A control can serve as a naming container if it implements the <tt>INamingContainer</tt> interface.
</p>
-<h2>ViewState and ControlState</h2>
+<h2 id="805">ViewState and ControlState</h2>
<p>
HTTP is a stateless protocol, meaning it does not provide functionality to support continuing interaction between a user and a server. Each request is considered as discrete and independent of each other. A Web application, however, often needs to know what a user has done in previous requests. People thus introduce sessions to help remember such state information.
</p>
diff --git a/demos/quickstart/protected/pages/Fundamentals/Hangman.page b/demos/quickstart/protected/pages/Fundamentals/Hangman.page
index d73868a0..56180b9e 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Hangman.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Hangman.page
@@ -1,6 +1,6 @@
<com:TContent ID="body" >
-<h1>Sample: Hangman Game</h1>
+<h1 id="1301">Sample: Hangman Game</h1>
<p>
Having seen the simple "Hello World" application, we now build a more complex application called "Hangman Game". In this game, the player is asked to guess a word, a letter at a time. If he guesses a letter right, the letter will be shown in the word. The player can continue to guess as long as the number of his misses is within a prespecified bound. The player wins the game if he finds out the word within the miss bound, or he loses.
</p>
diff --git a/demos/quickstart/protected/pages/Fundamentals/Modules.page b/demos/quickstart/protected/pages/Fundamentals/Modules.page
index 782ebb8c..df67f0f3 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Modules.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Modules.page
@@ -1,6 +1,6 @@
<com:TContent ID="body" >
-<h1>Modules</h1>
+<h1 id="1001">Modules</h1>
<p>
A module is an instance of a class implementing the <tt>IModule</tt> interface. A module is commonly designed to provide specific functionality that may be plugged into a PRADO application and shared by all components in the application.
</p>
@@ -12,31 +12,31 @@ There are three core modules that are loaded by default whenever an application
</p>
<a name="request"></a>
-<h2>Request Module</h2>
+<h2 id="1002">Request Module</h2>
<p>
Request module represents provides storage and access scheme for user request sent via HTTP. User request data comes from several sources, including URL, post data, session data, cookie data, etc. These data can all be accessed via the request module. By default, PRADO uses <tt>THttpRequest</tt> as request module. The request module can be accessed via the <tt>Request</tt> property of application and controls.
</p>
<a name="response"></a>
-<h2>Response Module</h2>
+<h2 id="1003">Response Module</h2>
<p>
Response module implements the mechanism for sending output to client users. Response module may be configured to control how output are cached on the client side. It may also be used to send cookies back to the client side. By default, PRADO uses <tt>THttpResponse</tt> as response module. The response module can be accessed via the <tt>Response</tt> property of application and controls.
</p>
<a name="session"></a>
-<h2>Session Module</h2>
+<h2 id="1004">Session Module</h2>
<p>
Session module encapsulates the functionalities related with user session handling. Session module is automatically loaded when an application uses session. By default, PRADO uses <tt>THttpSession</tt> as session module, which is a simple wrapper of the session functions provided by PHP. The session module can be accessed via the <tt>Session</tt> property of application and controls.
</p>
<a name="error"></a>
-<h2>Error Handler Module</h2>
+<h2 id="1005">Error Handler Module</h2>
<p>
Error handler module is used to capture and process all error conditions in an application. PRADO uses <tt>TErrorHandler</tt> as error handler module. It captures all PHP warnings, notices and exceptions, and displays in an appropriate form to end-users. The error handler module can be accessed via the <tt>ErrorHandler</tt> property of the application instance.
</p>
<a name="custom"></a>
-<h2>Custom Modules</h2>
+<h2 id="1006">Custom Modules</h2>
<p>
PRADO is released with a few more modules besides the core ones. They include caching modules (<tt>TSqliteCache</tt> and <tt>TMemCache</tt>), user management module (<tt>TUserManager</tt>), authentication and authorization module (<tt>TAuthManager</tt>), etc.
</p>
diff --git a/demos/quickstart/protected/pages/Fundamentals/Pages.page b/demos/quickstart/protected/pages/Fundamentals/Pages.page
index 8dfb5caa..1e91801c 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Pages.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Pages.page
@@ -1,6 +1,6 @@
<com:TContent ID="body" >
-<h1>Pages</h1>
+<h1 id="901">Pages</h1>
<p>
Pages are top-most controls that have no parent. The presentation of pages are directly displayed to end-users. Users access pages by sending page service requests.
</p>
@@ -8,13 +8,13 @@ Pages are top-most controls that have no parent. The presentation of pages are d
Each page must have a <a href="?page=Configurations.Templates1">template</a> file. The file name suffix must be <tt>.page</tt>. The file name (without suffix) is the page name. PRADO will try to locate a page class file under the directory containing the page template file. Such a page class file must have the same file name (suffixed with <tt>.php</tt>) as the template file. If the class file is not found, the page will take class <tt>TPage</tt>.
</p>
-<h2>PostBack</h2>
+<h2 id="902">PostBack</h2>
<p>
A form submission is called <i>postback</i> if the submission is made to the page containing the form. Postback can be considered an event happened on the client side, raised by the user. PRADO will try to identify which control on the server side is responsible for a postback event. If one is determined, for example, a <tt>TButton</tt>, we call it the postback event sender which will translate the postback event into some specific server-side event (e.g. <tt>Click</tt> and <tt>Command</tt> events for <tt>TButton</tt>).
</p>
-<h2>Page Lifecycles</h2>
+<h2 id="903">Page Lifecycles</h2>
<p>
Understanding the page lifecycles is crucial to grasp PRADO programming. Page lifecycles refer to the state transitions of a page when serving this page to end-users. They can be depicted in the following statechart,
<img src="<%~lifecycles.gif %>" />
diff --git a/demos/quickstart/protected/pages/Fundamentals/Services.page b/demos/quickstart/protected/pages/Fundamentals/Services.page
index 22c09c99..920c6bea 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Services.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Services.page
@@ -1,6 +1,6 @@
<com:TContent ID="body" >
-<h1>Services</h1>
+<h1 id="1101">Services</h1>
<p>
A service is an instance of a class implementing the <tt>IService</tt> interface. Each kind of service processes a specific type of user requests. For example, the page service responds to users' requests for PRADO pages.
</p>
@@ -14,7 +14,7 @@ http://hostname/index.php?page=Fundamentals.Services
Developers may implement additional services for their applications. To make a service available, configure it in <a href="?page=Configurations.AppConfig">application configurations</a>.
</p>
-<h2>Page Service</h2>
+<h2 id="1102">Page Service</h2>
<p>
PRADO implements <tt>TPageService</tt> to process users' page requests. Pages are stored under a directory specified by the <tt>BasePath</tt> property of the page service. The property defaults to <tt>pages</tt> directory under the application base path. You may change this default by configuring the service in the application configuration.
</p>