From deba7a5f81931dbe20aceebd506f44d5fdc1f7ca Mon Sep 17 00:00:00 2001
From: xue <>
Date: Wed, 28 Dec 2005 02:39:52 +0000
Subject:
---
.../protected/pages/Fundamentals/Architecture.page | 13 ++++++++++++
.../protected/pages/Fundamentals/Components.page | 23 +++++++++++++++++++++
.../protected/pages/Fundamentals/Modules.page | 17 +++++++++++++--
.../protected/pages/Fundamentals/classtree.gif | Bin 0 -> 14164 bytes
.../protected/pages/Fundamentals/classtree.vsd | Bin 0 -> 63488 bytes
.../protected/pages/Fundamentals/objectdiagram.gif | Bin 0 -> 6139 bytes
.../protected/pages/Fundamentals/objectdiagram.vsd | Bin 0 -> 148992 bytes
.../protected/pages/Samples/HelloWorld.page | 2 +-
8 files changed, 52 insertions(+), 3 deletions(-)
create mode 100644 demos/quickstart/protected/pages/Fundamentals/Architecture.page
create mode 100644 demos/quickstart/protected/pages/Fundamentals/classtree.gif
create mode 100644 demos/quickstart/protected/pages/Fundamentals/classtree.vsd
create mode 100644 demos/quickstart/protected/pages/Fundamentals/objectdiagram.gif
create mode 100644 demos/quickstart/protected/pages/Fundamentals/objectdiagram.vsd
(limited to 'demos/quickstart/protected/pages')
diff --git a/demos/quickstart/protected/pages/Fundamentals/Architecture.page b/demos/quickstart/protected/pages/Fundamentals/Architecture.page
new file mode 100644
index 00000000..8ccb20a0
--- /dev/null
+++ b/demos/quickstart/protected/pages/Fundamentals/Architecture.page
@@ -0,0 +1,13 @@
+
+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 the skeleton classes provided by PRADO,
+
+When a PRADO application is processing a page request, its static object diagram can be shown as follows,
+Architecture
+
+$callback
refers to a valid PHP callback (e.g. a function name, a class method array($object,'method')
, etc.)
+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. +
+ ++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, +
+$component = new ComponentClassName; +$component = Prado::createComponent('ComponentType'); ++where
ComponentType
refers to a class name or a dot-connected type name (e.g. System.Web.UI.TControl
). The second approach is introduced to compensate for the lack of namespace support in PHP.
+
+
+
+Static component instantiation is about creating components via configurations. The actual creation work is done by the PRADO framework. For example, in an application configuration, 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 templates. 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 TButton
component on the page,
+
+<com:TButton Text="Register" /> ++ + \ 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 0f5c47fd..b8472e90 100644 --- a/demos/quickstart/protected/pages/Fundamentals/Modules.page +++ b/demos/quickstart/protected/pages/Fundamentals/Modules.page @@ -5,10 +5,10 @@ A module is an instance of a class implementing the
IModule
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. 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. +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 provide additional functionalities. 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. +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. Custom modules may be configured or developed to override or supplement these core modules.
@@ -34,4 +34,17 @@ Session module encapsulates the functionalities related with user session handli
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.
+PRADO is released with a few more modules besides the core ones. They include caching modules (TSqliteCache
and TMemCache
), user management module (TUserManager
), authentication and authorization module (TAuthManager
), etc.
+
+When TPageService
is requested, it also loads modules specific for page service, including asset manager (TAssetManager
), template manager (TTemplateManager
), theme/skin manager (TThemeManager
), and page state persister (TPageStatePersister
).
+
+Custom modules and core modules are all configurable via configurations. +
+ \ No newline at end of file diff --git a/demos/quickstart/protected/pages/Fundamentals/classtree.gif b/demos/quickstart/protected/pages/Fundamentals/classtree.gif new file mode 100644 index 00000000..318ed278 Binary files /dev/null and b/demos/quickstart/protected/pages/Fundamentals/classtree.gif differ diff --git a/demos/quickstart/protected/pages/Fundamentals/classtree.vsd b/demos/quickstart/protected/pages/Fundamentals/classtree.vsd new file mode 100644 index 00000000..fefab3f3 Binary files /dev/null and b/demos/quickstart/protected/pages/Fundamentals/classtree.vsd differ diff --git a/demos/quickstart/protected/pages/Fundamentals/objectdiagram.gif b/demos/quickstart/protected/pages/Fundamentals/objectdiagram.gif new file mode 100644 index 00000000..2a6e25c1 Binary files /dev/null and b/demos/quickstart/protected/pages/Fundamentals/objectdiagram.gif differ diff --git a/demos/quickstart/protected/pages/Fundamentals/objectdiagram.vsd b/demos/quickstart/protected/pages/Fundamentals/objectdiagram.vsd new file mode 100644 index 00000000..2d5e8205 Binary files /dev/null and b/demos/quickstart/protected/pages/Fundamentals/objectdiagram.vsd differ diff --git a/demos/quickstart/protected/pages/Samples/HelloWorld.page b/demos/quickstart/protected/pages/Samples/HelloWorld.page index 98d29265..87169697 100644 --- a/demos/quickstart/protected/pages/Samples/HelloWorld.page +++ b/demos/quickstart/protected/pages/Samples/HelloWorld.page @@ -1,7 +1,7 @@-"Hello World" is the simplest interactive PRADO application that you can build. It displays to end-users a page with a submit button whose caption is Click Me. When the user clicks on the button, the button changes the caption to Hello World. +"Hello World" perhaps is the simplest interactive PRADO application that you can build. It displays to end-users a page with a submit button whose caption is Click Me. When the user clicks on the button, the button changes the caption to Hello World.
There are many approaches that can achieve the above goal. One can submit the page to the server, examine the POST variable, and generate a new page with the button caption updated. Or one can simply use JavaScript to update the button caption upon its onclick event. -- cgit v1.2.3