From e62f17f80a7cfd6f89f74fe6f2062850f54d1477 Mon Sep 17 00:00:00 2001
From: xue <>
Date: Tue, 27 Dec 2005 03:46:55 +0000
Subject:
---
.../protected/pages/Fundamentals/Applications.page | 25 ++++++++++++++++++++++
.../protected/pages/Fundamentals/Modules.page | 18 ++++++++--------
.../protected/pages/Fundamentals/Services.page | 16 +++++++++++++-
3 files changed, 49 insertions(+), 10 deletions(-)
create mode 100644 demos/quickstart/protected/pages/Fundamentals/Applications.page
(limited to 'demos')
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 @@
+
+An application is an instance of
+The application instance is the only object that is accessible globally via
+An application instance is usually created in an entry script in a PRADO application, as shown in the following,
+Applications
+TApplication
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.
+Prado::getApplication()
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 application configurations.
+
+require_once('/path/to/prado.php');
+$application = new TApplication;
+$application->run();
+
+where the method run()
starts the application to handle user requests.
+
+TBD +
+ + \ 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 theIModule
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.
-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 configurations. +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 configurations.
There are three core modules that are loaded by default whenever an application runs. They are request module, response module, and error handler module. In addition, session module is loaded when it is used in the application. PRADO provides default implementation for all these 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. -
+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 THttpRequest
as request module. The request module can be accessed via the Request
property of application and controls.
-
- - -
+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 THttpResponse
as response module. The response module can be accessed via the Response
property of application and controls.
+Session module encapsulates the functionalities related with user session handling. Session module is automatically loaded when an application uses session. By default, PRADO uses THttpSession
as session module, which is a simple wrapper of the session functions provided by PHP. The session module can be accessed via the Session
property of application and controls.
+Error handler module is used to capture and process all error conditions in an application. PRADO uses TErrorHandler
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 ErrorHandler
property of the application instance.
+
-A service is ... TBD.
+A service is an instance of a class implementing the IService
interface. Each kind of service processes a specific type of user requests. For example, the page service responds to users' requests for PRADO pages.
+
+A service is uniquely identified by its ID
property. By default when THttpRequest
is used as the request module, GET variable names are used to identify which service a user is requesting. If a GET variable name is equal to some service ID
, 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 page
. For example, the following URL requests for the Fundamentals.Services
page,
+
+http://hostname/index.php?page=Fundamentals.Services ++ +
+Developers may implement additional services for their applications. To make a service available, configure it in application configurations. +
+ ++TBD
\ No newline at end of file -- cgit v1.2.3