summaryrefslogtreecommitdiff
path: root/demos/quickstart
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart')
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Architecture.page13
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Components.page23
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Modules.page17
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/classtree.gifbin0 -> 14164 bytes
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/classtree.vsdbin0 -> 63488 bytes
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/objectdiagram.gifbin0 -> 6139 bytes
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/objectdiagram.vsdbin0 -> 148992 bytes
-rw-r--r--demos/quickstart/protected/pages/Samples/HelloWorld.page2
8 files changed, 52 insertions, 3 deletions
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 @@
+<com:TContent ID="body" >
+<h1>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 the skeleton classes provided by PRADO,
+</p>
+<img src="<%~classtree.gif%>" />
+
+<p>
+When a PRADO application is processing a page request, its static object diagram can be shown as follows,
+</p>
+<img src="<%~objectdiagram.gif%>" />
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Fundamentals/Components.page b/demos/quickstart/protected/pages/Fundamentals/Components.page
index ec6dbd48..b49c16e5 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Components.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Components.page
@@ -46,4 +46,27 @@ $button-&gt;attachEventHandler('Click',$callback);
where <code>$callback</code> refers to a valid PHP callback (e.g. a function name, a class method <code>array($object,'method')</code>, etc.)
</p>
+<h2>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>
+<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,
+<pre class="source">
+$component = new ComponentClassName;
+$component = Prado::createComponent('ComponentType');
+</pre>
+where <code>ComponentType</code> refers to a class name or a dot-connected type name (e.g. <code>System.Web.UI.TControl</code>). The second approach is introduced to compensate for the lack of namespace support in PHP.
+</p>
+
+<h3>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 <code>TButton</code> component on the page,
+<pre class="source">
+&lt;com:TButton Text="Register" /&gt;
+</pre>
+</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 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 <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. 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>.
+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 <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.
+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. <a href="#custom">Custom modules</a> may be configured or developed to override or supplement these core modules.
</p>
<a name="request" />
@@ -34,4 +34,17 @@ Session module encapsulates the functionalities related with user session handli
<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>
+
+<a name="custom" />
+<h2>Custom Modules</h2>
+<p>
+PRADO is released with a few more modules besides the core ones. They include caching modules (<code>TSqliteCache</code> and <code>TMemCache</code>), user management module (<code>TUserManager</code>), authentication and authorization module (<code>TAuthManager</code>), etc.
+</p>
+<p>
+When <code>TPageService</code> is requested, it also loads modules specific for page service, including asset manager (<code>TAssetManager</code>), template manager (<code>TTemplateManager</code>), theme/skin manager (<code>TThemeManager</code>), and page state persister (<code>TPageStatePersister</code>).
+</p>
+<p>
+Custom modules and core modules are all configurable via <a href="?page=Configurations.Overview">configurations</a>.
+</p>
+
</com:TContent> \ 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
--- /dev/null
+++ b/demos/quickstart/protected/pages/Fundamentals/classtree.gif
Binary files 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
--- /dev/null
+++ b/demos/quickstart/protected/pages/Fundamentals/classtree.vsd
Binary files 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
--- /dev/null
+++ b/demos/quickstart/protected/pages/Fundamentals/objectdiagram.gif
Binary files 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
--- /dev/null
+++ b/demos/quickstart/protected/pages/Fundamentals/objectdiagram.vsd
Binary files 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 @@
<com:TContent ID="body" >
<h1>Sample: Hello World</h1>
<p>
-"Hello World" is the simplest <i>interactive</i> PRADO application that you can build. It displays to end-users a page with a submit button whose caption is <i>Click Me</i>. When the user clicks on the button, the button changes the caption to <i>Hello World</i>.
+"Hello World" perhaps is the simplest <i>interactive</i> PRADO application that you can build. It displays to end-users a page with a submit button whose caption is <i>Click Me</i>. When the user clicks on the button, the button changes the caption to <i>Hello World</i>.
</p>
<p>
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 <i>onclick</i> event.