From c9fa3e509a139cbbf1dce9d008a2923fa081f333 Mon Sep 17 00:00:00 2001 From: aztech <> Date: Fri, 16 Feb 2007 20:53:51 +0000 Subject: added basic files for QS Polish translation --- .../pages/GettingStarted/pl/AboutPrado.page | 70 ++++++++++++++ .../pages/GettingStarted/pl/CommandLine.page | 106 +++++++++++++++++++++ .../pages/GettingStarted/pl/HelloWorld.page | 83 ++++++++++++++++ .../pages/GettingStarted/pl/Installation.page | 29 ++++++ .../pages/GettingStarted/pl/Introduction.page | 19 ++++ .../pages/GettingStarted/pl/NewFeatures.page | 25 +++++ .../pages/GettingStarted/pl/Upgrading.page | 64 +++++++++++++ 7 files changed, 396 insertions(+) create mode 100644 demos/quickstart/protected/pages/GettingStarted/pl/AboutPrado.page create mode 100644 demos/quickstart/protected/pages/GettingStarted/pl/CommandLine.page create mode 100644 demos/quickstart/protected/pages/GettingStarted/pl/HelloWorld.page create mode 100644 demos/quickstart/protected/pages/GettingStarted/pl/Installation.page create mode 100644 demos/quickstart/protected/pages/GettingStarted/pl/Introduction.page create mode 100644 demos/quickstart/protected/pages/GettingStarted/pl/NewFeatures.page create mode 100644 demos/quickstart/protected/pages/GettingStarted/pl/Upgrading.page (limited to 'demos/quickstart/protected/pages/GettingStarted') diff --git a/demos/quickstart/protected/pages/GettingStarted/pl/AboutPrado.page b/demos/quickstart/protected/pages/GettingStarted/pl/AboutPrado.page new file mode 100644 index 00000000..017c76d5 --- /dev/null +++ b/demos/quickstart/protected/pages/GettingStarted/pl/AboutPrado.page @@ -0,0 +1,70 @@ + +

What is PRADO?

+

+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. +

+

+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. +

+

+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?

+

+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 applications that are highly user-interactive. It can be used to develop systems as simple as a blog system to those as complex as a content management system (CMS) or a complete e-commerce solution. Because PRADO promotes object-oriented programming through its component-based methodology, it fits extremely well for team work and enterprise development. +

+

+PRADO comes with a complete set of caching techniques which help accelerate PRADO Web applications to accommodate high traffic requirement. Its modular architecture allows developers to use or plug in different cache modules for different needs. The output caching enables one to selectively choose to cache part of a rendered Web page. +

+ +

How Is PRADO Compared with Other Frameworks?

+

+PRADO is often quoted 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. +

+

+Most PHP frameworks mainly focuses on separating presentation and logic and promotes the MVC (model-view-controller) design pattern. PRADO achieves the same goal naturally by requiring logic be stored in classes and presentation in templates. PRADO does much more on aspects other than MVC. It fills lot of blank area in PHP Web programming with its component-based programming paradigm, its rich set of Web controls, its powerful database support, its flexible error handling and logging feature, and many others. +

+ +

Is PRADO Stable Enough?

+

+Yes. PRADO was initially released in August 2004. Many test suites have been written and conducted frequently to ensure its quality. It has been used by thousands of developers and many Web applications have been developed based on it. Bugs and feature requests are managed through TRAC system and we have a great user community and development team to ensure all questions are answered in a timely fashion. +

+ +

History of PRADO

+

+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 the highest votes from both the public and the judges' panel. +

+

+In August 2004, PRADO started to be 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 I18N 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. +

+

+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 has grown up to a project that is suitable for serious business application development. +

+
$Id: AboutPrado.page 1698 2007-02-13 17:30:23Z xue $
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/GettingStarted/pl/CommandLine.page b/demos/quickstart/protected/pages/GettingStarted/pl/CommandLine.page new file mode 100644 index 00000000..281cef10 --- /dev/null +++ b/demos/quickstart/protected/pages/GettingStarted/pl/CommandLine.page @@ -0,0 +1,106 @@ + +

Command Line Tool

+

The optional prado-cli.php PHP script file in the framework +directory provides command line tools to perform various tedious takes in Prado. +The prado-cli.php can be used to create Prado project skeletons, create +initial test fixtures, and access to an interactive PHP shell. +

+

Requirements

+

+To use the command line tool, you need to use your command prompt, command console +or terminal. In addition, PHP must be able to execute PHP scripts from +the command line. +

+ +

Usage

+

+If you type php path/to/framework/prado-cli.php, you should see +the following information. Alternatively, if you are not on Windows, +you may try to change the prado-cli.php into an executable +and execute it as a script

+ +Command line tools for Prado 3.0.5. +usage: php prado-cli.php action [optional] +example: php prado-cli.php -c mysite + +actions: + -c + Creates a Prado project skeleton for the given . + + -t + Create test fixtures in the given . + + shell [directory] + Runs a PHP interactive interpreter. Initializes the Prado + application in the given [directory]. + + +

The <parameter> are required parameters and [optional] +are optional parameters.

+ +

Creating a new Prado project skeleton

+ +

To create a Prado project skeleton, do the following:

+
    +
  1. Change to the directory where you want to create the project skeleton.
  2. +
  3. Type, php ../prado/framework/prado-cli.php -c helloworld, where + helloworld is the directory name that you want to create the project skeleton files.
  4. +
  5. Type, php ../prado/framework/prado-cli.php -t helloworld to create + the test fixtures for the helloworld project.
  6. +
+ +

Interactive Shell

+

+The interactive shell allows you to evaluate PHP statements from the command line. +The prado-cli.php script can be used to start the shell and load an existing +Prado project. For example, let us load the blog demo project. Assume that your +command line is in the prado distribution directory and you type. +

+

+ +$: php framework/prado-cli.php shell demos/blog + +The output should be + +Command line tools for Prado 3.0.5. +** Loaded Prado application in directory "demos\blog\protected". +PHP-Shell - Version 0.3.1 +(c) 2006, Jan Kneschke + +>> use '?' to open the inline help + +>> + +Then we will get an instance of the Prado blog application, and from +that instance we want an instance of the 'data' module. Notice that +a semicolon at the end of the line suppresses the output. + + +>> $app = Prado::getApplication(); + +>> $db = $app->getModule('data'); + +Lastly, we want to use the data module to query for a post with ID=1. Notice that +we leave out the semicolon to show the results. + +>> $db->queryPostByID(1) + +There should not be any errors and you should see the following. + +PostRecord#1 +( + [ID] => 1 + [AuthorID] => 1 + [AuthorName] => 'Prado User' + [CreateTime] => 1148819691 + [ModifyTime] => 0 + [Title] => 'Welcome to Prado Weblog' + [Content] => 'Congratulations! You have successfully installed Prado Blog -- + a PRADO-driven weblog system. A default administrator account has been created. + Please login with admin/prado and update your password as soon as possible.' + [Status] => 0 + [CommentCount] => 0 +) + +

+
$Id: CommandLine.page 1650 2007-01-24 06:55:32Z wei $
diff --git a/demos/quickstart/protected/pages/GettingStarted/pl/HelloWorld.page b/demos/quickstart/protected/pages/GettingStarted/pl/HelloWorld.page new file mode 100644 index 00000000..8ee8a8f1 --- /dev/null +++ b/demos/quickstart/protected/pages/GettingStarted/pl/HelloWorld.page @@ -0,0 +1,83 @@ + +

My First PRADO Application

+
+

+In this section, we guide you through creating your first PRADO application, the famous "Hello World" application. +

+

+"Hello World" perhaps is the simplest interactive PRADO application that you can create. It displays to end-users a page with a submit button whose caption is Click Me. After the user clicks on the button, its caption is changed 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 client event. +

+
+

+PRADO promotes component-based and event-driven Web programming. The button is represented by a TButton object. It encapsulates the button caption as the Text property and associates the user button click action with a server-side OnClick event. To respond to the user clicking on the button, one simply needs to attach a function to the button's OnClick event. Within the function, the button's Text property is modified as "Hello World". The following diagram shows the above sequence, + +

+

+Our PRADO application consists of three files, index.php, Home.page and Home.php, which are organized as follows, + + +where each directory is explained as follows. Note, the above directory structure can be customized. For example, one can move the protected directory out of Web directories. You will know how to do this after you go through this tutorial. +

+ + +
+Tip:You may also use the framework/prado-cli.php +command line script +to create the Prado project directory structure. For example, type the command +php path/to/prado-cli.php -c helloworld in the directory +where you want to create the helloworld project. +
+ +

+The three files that we need are explained as follows. +

+ +
+

+The application is now ready and can be accessed via: http://Web-server-address/helloworld/index.php, assuming helloworld is directly under the Web DocumentRoot. Try to change TButton in Home.page to TLinkButton and see what happens. +

+

+Complete source code of this demo can be found in the PRADO release. You can also try the online demo. +

+
+ +
$Id: HelloWorld.page 1650 2007-01-24 06:55:32Z wei $
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/GettingStarted/pl/Installation.page b/demos/quickstart/protected/pages/GettingStarted/pl/Installation.page new file mode 100644 index 00000000..6b20bf8f --- /dev/null +++ b/demos/quickstart/protected/pages/GettingStarted/pl/Installation.page @@ -0,0 +1,29 @@ + +

Installing PRADO

+
+

+If you are viewing this page from your own Web server, you are already done with the installation. +

+

+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 the latest version of PRADO.
  2. +
  3. Unpack the PRADO release file to a Web-accessible directory. +
+
+
+

+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. +

+

+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. +

+
+
$Id: Installation.page 1650 2007-01-24 06:55:32Z wei $
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/GettingStarted/pl/Introduction.page b/demos/quickstart/protected/pages/GettingStarted/pl/Introduction.page new file mode 100644 index 00000000..5ceecf44 --- /dev/null +++ b/demos/quickstart/protected/pages/GettingStarted/pl/Introduction.page @@ -0,0 +1,19 @@ + +

Welcome to the PRADO Quickstart Tutorial

+
+

+This Quickstart tutorial is provided to help you quickly start building your own Web applications based on PRADO version 3.x. +

+

+You may refer to the following resources if you find this tutorial does not fulfill all your needs. +

+
+ + +
$Id: Introduction.page 1650 2007-01-24 06:55:32Z wei $
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/GettingStarted/pl/NewFeatures.page b/demos/quickstart/protected/pages/GettingStarted/pl/NewFeatures.page new file mode 100644 index 00000000..65fa22cb --- /dev/null +++ b/demos/quickstart/protected/pages/GettingStarted/pl/NewFeatures.page @@ -0,0 +1,25 @@ + + +

New Features

+ +

+This page summarizes the main new features that are introduced in each PRADO release. +

+ +

Version 3.1.0

+ + +
$Id: NewFeatures.page 1695 2007-02-13 14:16:09Z xue $
+
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/GettingStarted/pl/Upgrading.page b/demos/quickstart/protected/pages/GettingStarted/pl/Upgrading.page new file mode 100644 index 00000000..6a44ce08 --- /dev/null +++ b/demos/quickstart/protected/pages/GettingStarted/pl/Upgrading.page @@ -0,0 +1,64 @@ + + +

Upgrading from v2.x and v1.x

+ +
+

+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, if needed. +

+
+ +

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. 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 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 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

+

+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

+
+

+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, +

+ +<com:MyComponent PropertyName=<%# PHP expression %> .../> + +

+Expression and statement tags are also changed similarly. For more details, see the template definition section. +

+
+

Theme Syntax

+

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

+ +
$Id: Upgrading.page 1650 2007-01-24 06:55:32Z wei $
\ No newline at end of file -- cgit v1.2.3