From 2d8bce4d650b1c6d7144e65dbb68088515cf989c Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 16 Apr 2006 02:15:16 +0000 Subject: Updated a few tutorial pages. --- .../protected/pages/GettingStarted/AboutPrado.page | 50 +++++++++++++++++----- .../pages/GettingStarted/Installation.page | 19 ++++---- .../protected/pages/GettingStarted/Upgrading.page | 31 +++++++++----- 3 files changed, 70 insertions(+), 30 deletions(-) (limited to 'demos/quickstart/protected') diff --git a/demos/quickstart/protected/pages/GettingStarted/AboutPrado.page b/demos/quickstart/protected/pages/GettingStarted/AboutPrado.page index 0d031f9f..5ea7a1cf 100644 --- a/demos/quickstart/protected/pages/GettingStarted/AboutPrado.page +++ b/demos/quickstart/protected/pages/GettingStarted/AboutPrado.page @@ -4,35 +4,65 @@ PRADO is a component-based and event-driven programming framework for developing Web applications in PHP 5. PRADO stands for PHP Rapid Application Development Object-oriented.

-PRADO stipulates a protocol of writing and using components to construct Web applications. A component is a software unit that is self-contained and can be reused with trivial customization. +A primary goal of PRADO is to enable maximum reusability in Web programming. By reusability, we mean not only reusing one's own code, but also reusing other people's code in an easy way. The latter is more important as it saves the effort of reinventing the wheels and may cut off development time dramatically. The introduction of the concept of component is for this purpose. +

+

+To achieve the above goal, PRADO stipulates a protocol of writing and using components to construct Web applications. A component is a software unit that is self-contained and can be reused with trivial customization. New components can be created by simple composition of existing components. +

+

+To facilitate interacting with components, PRADO implements an event-driven programming paradigm that allows delegation of extensible behavior to components. End-user activities, such as clicking on a submit button, are captured as server events. Methods or functions may be attached to these events so that when the events happen, they are invoked automatically to respond to the events. Compared with the traditional Web programming in which developers have to deal with the raw POST or GET variables, event-driven programming helps developers better focus on the necessary logic and reduces significantly the low-level repetitive coding.

-PRADO implements an event-driven programming paradigm that allows delegation of extensible behavior to components. End-user activities, such as clicking on a submit button, are captured as server events. Methods or functions may be attached to these events so that when the events happen, they are invoked automatically to respond to the events. Compared with the traditional Web programming in which developers have to deal with the raw POST or GET variables, event-driven programming helps developers better focus on the necessary logic and reduces significantly the low-level repetitive coding. +In summary, developing a PRADO Web application mainly involves instantiating prebuilt component types, configuring them by setting their properties, responding to their events by writing handler functions, and composing them into pages for the application. It is very similar to RAD toolkits, such as Borland Delphi and Microsoft Visual Basic, that are used to develop desktop GUI applications.

Why PRADO?

-A primary goal of PRADO is to enable maximum reusability in Web programming. By reusability, we mean not only reusing one's own code, but also reusing other people's code in an easy way. The latter is more important as it saves the effort of reinventing the wheels and may cut off development time dramatically. The introduction of the concept of component is for this purpose. +PRADO is mostly quoted as a unique framework. In fact, it is so unique that it may turn your boring PHP programming into a fun task. The following list is a short summary of the main features of PRADO, +

+ + +

What Is PRADO Best For?

+

+PRADO is best suitable for creating Web front-ends that are highly user-interactive and require small to medium traffic. It can be used to develop systems as simple as a blog system to systems as complex as a content management system (CMS) or a complete e-commerce solution. PRADO can help you cut your development time significantly.

-Reusing existing components is very easy. It merely involves getting and setting component properties, and sometimes responding to component events. PRADO provides a complete set of components that deal with common Web programming tasks, such as collecting and validating user inputs through generic HTML elements, manipulating tabular data, etc. These components can be rapidly glued together and form Web pages that are highly user interactive. For example, using the datagrid component, one only needs to write a few lines of PHP code (mainly to populate the data into the datagrid), and he can create a page presenting a data table which allows paging, sorting, editting, and deleting rows of data. +PRADO does not exclude other back-end solutions such as most DB abstraction layers. In fact, they can be used like what you usually do with traditional PHP programming.

-Developing new components can also be very easy. A new component class can be created by composing together several existing components in a template which specifies the layout of the constituent components. The page that you are reading now is such an example. It is the presentation of a component without a single line of PHP code. +Without caching techniques, PRADO may not be suitable for developing extremely high-traffic Web applications, such as popular portals, forums, etc. In these applications, every niche of potential performance gain must be exploited and server caching (e.g. Zend optimizer) is almost a must. PRADO implements a generic cache technique and enables selective caching of part of Web contents. +

+ +

How Is PRADO Compared with Other Frameworks?

+

+PRADO is described as a unique framework. Its uniqueness mainly lies in the component-based and event-driven programming paradigm that it tries to promote. Although this programming paradigm is not new in desktop application programming and not new in a few Web programming languages, PRADO is perhaps the first PHP framework enabling it.

-Developing a PRADO Web application mainly involves instantiating prebuilt component types, configuring them by setting their properties, responding to their events by writing handler functions, and composing them into pages for the application. It is very similar to RAD toolkits, such as Borland Delphi and Microsoft Visual Basic, that are used to develop desktop GUI applications. +Most PHP frameworks are trying to establish a loose standard of organizing PHP programming, most preferably the MVC (model-view-controller) model. It is difficult to compare PRADO with these frameworks because they have different focuses. What we can say is, PRADO is more like a high-level language built upon PHP while those MVC frameworks stand for the best programming practices. Both aim to help developers to rapidly complete Web application development. The advantage of PRADO is its rich set of prebuilt powerful components and extreme reusability of the PRADO code, while the advantage of the MVC frameworks is the complete separation of model, view and controller, which greatly facilitates team integration.

-

What Is PRADO Best For?

+

History of PRADO

-PRADO is best suitable for creating Web front-ends that are highly user-interactive and require small to medium traffic. It can be used to develop systems as simple as a blog system to systems as complex as a content management system (CMS) or a complete e-commerce solution. PRADO can help you cut your development time significantly. +The very original inspiration of PRADO came from Apache Tapestry. During the design and implementation, I borrowed many ideas from Borland Delphi and Microsoft ASP.NET. The first version of PRADO came out in June 2004 and was written in PHP 4. Driven by the Zend PHP 5 coding contest, I rewrote PRADO in PHP 5, which proved to be a wise move, thanks to the new object model provided by PHP 5. PRADO won the grand prize in the Zend contest, earning high votes both from the public and from the judges' panel.

-PRADO does not exclude other back-end solutions such as most DB abstraction layers. In fact, they can be used like what you usually do with traditional PHP programming. +In August 2004, PRADO was hosted on SourceForge as an open source project. Soon after, the project site xisc.com was announced to public. With the fantastic support of PRADO developer team and PRADO users, PRADO evolved to version 2.0 in mid 2005. In this version, Wei Zhuo contributed to PRADO with the excellent I18 and L10N support. +

+

+In May 2005, we decided to completely rewrite the PRADO framework to resolve a few fundamental issues found in version 2.0 and to catch up with some cool features available in Microsoft ASP.NET 2.0. After nearly a year's hard work with over 50,000 lines of new code, version 3.0 was finally made available in April 2006.

-Without server caching techniques, PRADO may not be suitable for developing extremely high-traffic Web applications, such as popular portals, forums, etc. In these applications, every niche of potential performance gain must be exploited and server caching (e.g. Zend optimizer) is almost a must. +Starting from version 3.0, significant efforts are allocated to ensure the quality and stability of PRADO. If we say PRADO v2.x and v1.x are proof-of-concept work, we can say PRADO 3.x grows up to a serious project that is suitable for business application development.

\ No newline at end of file diff --git a/demos/quickstart/protected/pages/GettingStarted/Installation.page b/demos/quickstart/protected/pages/GettingStarted/Installation.page index ca8d299c..ae3d18c3 100644 --- a/demos/quickstart/protected/pages/GettingStarted/Installation.page +++ b/demos/quickstart/protected/pages/GettingStarted/Installation.page @@ -1,21 +1,22 @@

Installing PRADO

-If you are viewing this page from your own Web server, you are already done with the installation. The instructions at the end of this page, however, may still be useful for you to troubleshoot issues happened during your development based on PRADO. +If you are viewing this page from your own Web server, you are already done with the installation.

-Installation of PRADO is very easy. Follow the following steps, +The minimum requirement by PRADO is that the Web server support PHP 5. PRADO has been tested with Apache Web server on Windows and Linux. Highly possibly it may also run on other platforms with other Web servers, as long as PHP 5 is supported. +

+

+Installation of PRADO mainly involves downloading and unpacking. +

    -
  1. Go to pradosoft.com to grab a latest version of PRADO.
  2. -
  3. Unpack the PRADO release file using unzip on Linux or winzip on Windows. A directory named prado will be created under the working directory.
  4. -
  5. Copy or upload everything under the prado directory to the DocumentRoot directory (or a subdirectory) of the Web server.
  6. -
  7. Your installation of PRADO is done and you can start to play with the demo applications included in the PRADO release via URL http://web-server-address/demos/. This QuickStart Tutorial is one of such applications.
  8. +
  9. Go to pradosoft.com to grab the latest version of PRADO.
  10. +
  11. Unpack the PRADO release file to a Web-accessible directory.
-

-If you encounter any problems with the demo applications, please use the PRADO requirement checker script to check first if your server configuration fullfils the conditions required by PRADO. +Your installation of PRADO is done and you can start to play with the demo applications included in the PRADO release via URL http://web-server-address/prado/demos/. Here we assume PRADO is unpacked to the prado subdirectory under the DocumentRoot of the Web server.

-The minimum requirement by PRADO is that the Web server support PHP 5. PRADO has been tested with Apache Web server on Windows and Linux. Highly possibly it may also run on other platforms with other Web servers, as long as PHP 5 is supported. +If you encounter any problems with the demo applications, please use the PRADO requirement checker script, accessible via http://web-server-address/prado/requirements/index.php, to check first if your server configuration fulfills the conditions required by PRADO.

\ No newline at end of file diff --git a/demos/quickstart/protected/pages/GettingStarted/Upgrading.page b/demos/quickstart/protected/pages/GettingStarted/Upgrading.page index cb89cb10..287d3f84 100644 --- a/demos/quickstart/protected/pages/GettingStarted/Upgrading.page +++ b/demos/quickstart/protected/pages/GettingStarted/Upgrading.page @@ -1,8 +1,7 @@ -

Upgrading from Earlier Versions

+

Upgrading from v2.x and v1.x

-

Upgrading from v2.x and v1.x

PRADO v3.0 is NOT backward compatible with earlier versions of PRADO.

@@ -10,30 +9,40 @@ PRADO v3.0 is NOT backward compatible with earlier versions of PRADO. A good news is, properties and events of most controls remain intact, and the syntax of control templates remains largely unchanged. Therefore, developers' knowledge of earlier versions of PRADO are still applicable in v3.0.

-We summarize in the following the most significant changes in v3.0 to help developers upgrade their v2.x and v1.x PRADO applications more easily. +We summarize in the following the most significant changes in v3.0 to help developers upgrade their v2.x and v1.x PRADO applications more easily, if needed.

-

Component Definition

+

Component Definition

-Version 3.0 has completely discarded the need of component specification files. It relies more on conventions for defining component properties and events. In particular, a property is defined by the existence of a getter method and/or a setter method, while an event is defined by the existence of an on-method. Property and event names in v3.0 are both case-insensitive. +Version 3.0 has completely discarded the need of component specification files. It relies more on conventions for defining component properties and events. In particular, a property is defined by the existence of a getter method and/or a setter method, while an event is defined by the existence of an on-method. Property and event names in v3.0 are both case-insensitive. As a consequence, developers are now required to take care of type conversions when a component property is being set. For example, the following code is used to define the setter method for the Enabled property of TControl, which is of boolean type, +

+ +public function setEnabled($value) +{ + $value=TPropertyValue::ensureBoolean($value); + $this->setViewState('Enabled',$value,true); +} + +

+where TPropertyValue::ensureBoolean() is used to ensure that the input value be a boolean. This is because when the property is configured in template, a string value is passed to the setter. In previous versions, PRADO knows the property type based on the component specification files and does the type conversion for you.

-

Application Controller

+

Application Controller

Application controller now implements a modular architecture. Modules can be plugged in and configured in application specifications. Each module assumes a particular functionality, and they are coordinated together by the application lifecycle. The concept of v2.x modules is replaced in v3.0 by page directories. As a result, the format of v3.0 application specification is also different from earlier versions.

-

Pages

+

Pages

-Pages in v3.0 are organized in directories which may be compared to the module concept in v2.x. Pages are requested using the path to them. For example, a URL index.php?page=Controls.Samples.Sample1 would request for a page named Sample1 stored under the [BasePath]/Controls/Samples directory, where [BasePath] refers to the root page path. The file name of a page template must be ended with .page, mainly to differentiate from templates of non-page controls whose file names must be ended with .tpl. +Pages in v3.0 are organized in directories which may be compared to the module concept in v2.x. Pages are requested using the path to them. For example, a URL index.php?page=Controls.Samples.Sample1 would be used to request for a page named Sample1 stored under the [BasePath]/Controls/Samples directory, where [BasePath] refers to the root page path. The file name of a page template must be ended with .page, mainly to differentiate page templates from non-page control templates whose file names must be ended with .tpl.

-

Control Relationship

+

Control Relationship

Version 3.0 redefines the relationships between controls. In particular, the parent-child relationship now refers to the enclosure relationship between controls' presentation. And a new naming-container relationship is introduced to help better manage control IDs. For more details, see the controls section.

-

Template Syntax

+

Template Syntax

The syntax of control templates in v3.0 remains similar to those in earlier versions, with many enhancements. A major change is about the databinding expression. In v3.0, this is done by the following,

@@ -44,7 +53,7 @@ The syntax of control templates in v3.0 remains similar to those in earlier vers Expression and statement tags are also changed similarly. For more details, see the template definition section.

-

Theme Syntax

+

Theme Syntax

Themes in v3.0 are defined like control templates with a few restrictions.

-- cgit v1.2.3