summaryrefslogtreecommitdiff
path: root/demos/quickstart
diff options
context:
space:
mode:
authorxue <>2005-12-27 03:46:55 +0000
committerxue <>2005-12-27 03:46:55 +0000
commite62f17f80a7cfd6f89f74fe6f2062850f54d1477 (patch)
treefc757968ccde20e14ca1f80a1ff6dc51f9e8d636 /demos/quickstart
parent08b59ff62c4dfc98674c263269807798b6a83463 (diff)
Diffstat (limited to 'demos/quickstart')
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Applications.page25
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Modules.page18
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Services.page16
3 files changed, 49 insertions, 10 deletions
diff --git a/demos/quickstart/protected/pages/Fundamentals/Applications.page b/demos/quickstart/protected/pages/Fundamentals/Applications.page
new file mode 100644
index 00000000..0a3028c5
--- /dev/null
+++ b/demos/quickstart/protected/pages/Fundamentals/Applications.page
@@ -0,0 +1,25 @@
+<com:TContent ID="body" >
+
+<h1>Applications</h1>
+<p>
+An application is an instance of <code>TApplication</code> or its derived class. Each PRADO application consists of a single application instance, one or several services, and some modules. For applications providing the page service (true for nearly all applications), they also contain one or several pages.
+</p>
+<p>
+The application instance is the only object that is accessible globally via <code>Prado::getApplication()</code> function call. It manages modules that provide different functionalities and are loaded when needed. It holds services that are available to end-users. An application instance may be configured via <a href="?page=Configurations.AppConfig">application configurations</a>.
+</p>
+<p>
+An application instance is usually created in an entry script in a PRADO application, as shown in the following,
+<pre class="source">
+require_once('/path/to/prado.php');
+$application = new TApplication;
+$application-&gt;run();
+</pre>
+where the method <code>run()</code> starts the application to handle user requests.
+</p>
+
+<h2>Application Lifecycles</h2>
+<p>
+TBD
+</p>
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Fundamentals/Modules.page b/demos/quickstart/protected/pages/Fundamentals/Modules.page
index 93573332..0f5c47fd 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Modules.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Modules.page
@@ -5,33 +5,33 @@
A module is an instance of a class implementing the <code>IModule</code> 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>
<p>
-PRADO uses configurations to specify whether to load a module, load what kind of modules, and how to initialize the loaded modules. For more details, please see the <a href="?page=Configurations.Overview">configurations</a>.
+PRADO uses configurations to specify whether to load a module, load what kind of modules, and how to initialize the loaded modules. Developers may replace the core modules with their own implementations via application configuration, or they may write new modules to handle other tasks. For example, a module may be developed to provide common database logic for one or several pages. For more details, please see the <a href="?page=Configurations.Overview">configurations</a>.
</p>
<p>
There are three core modules that are loaded by default whenever an application runs. They are <a href="#request">request module</a>, <a href="#response">response module</a>, and <a href="#error">error handler module</a>. In addition, <a href="#session">session module</a> is loaded when it is used in the application. PRADO provides default implementation for all these modules.
</p>
-<p>
-Developers may replace the core modules with their own implementations via application configuration, or they may write new modules to handle other tasks. For example, a module may be developed to provide common database logic for one or several pages.
-</p>
<a name="request" />
<h2>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 <code>THttpRequest</code> as request module. The request module can be accessed via the <code>Request</code> property of application and controls.
</p>
<a name="response" />
<h2>Response Module</h2>
<p>
-</p>
-
-<a name="error" />
-<h2>Error Handler 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 <code>THttpResponse</code> as response module. The response module can be accessed via the <code>Response</code> property of application and controls.
</p>
<a name="session" />
<h2>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 <code>THttpSession</code> as session module, which is a simple wrapper of the session functions provided by PHP. The session module can be accessed via the <code>Session</code> property of application and controls.
</p>
+<a name="error" />
+<h2>Error Handler Module</h2>
+<p>
+Error handler module is used to capture and process all error conditions in an application. PRADO uses <code>TErrorHandler</code> 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 <code>ErrorHandler</code> property of the application instance.
+</p>
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Fundamentals/Services.page b/demos/quickstart/protected/pages/Fundamentals/Services.page
index eabed42b..500929ba 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Services.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Services.page
@@ -2,7 +2,21 @@
<h1>Services</h1>
<p>
-A service is ... TBD.
+A service is an instance of a class implementing the <code>IService</code> 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>
+<p>
+A service is uniquely identified by its <code>ID</code> property. By default when <code>THttpRequest</code> is used as the <a href="?page=Fundamentals.Modules#request">request module</a>, GET variable names are used to identify which service a user is requesting. If a GET variable name is equal to some service <code>ID</code>, the request is considered for that service, and the value of the GET variable is passed as the service parameter. For page service, the name of the GET variable must be <code>page</code>. For example, the following URL requests for the <code>Fundamentals.Services</code> page,
+<pre class="source">
+http://hostname/index.php?page=Fundamentals.Services
+</pre>
+</p>
+<p>
+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>
+<p>
+TBD
</p>
</com:TContent> \ No newline at end of file