summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/GettingStarted
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/GettingStarted')
-rwxr-xr-xdemos/quickstart/protected/pages/GettingStarted/AboutPrado.page10
-rwxr-xr-xdemos/quickstart/protected/pages/GettingStarted/CommandLine.page48
-rwxr-xr-xdemos/quickstart/protected/pages/GettingStarted/HelloWorld.page2
-rwxr-xr-xdemos/quickstart/protected/pages/GettingStarted/Installation.page41
-rwxr-xr-xdemos/quickstart/protected/pages/GettingStarted/NewFeatures.page7
-rw-r--r--demos/quickstart/protected/pages/GettingStarted/Wsat.page64
-rw-r--r--demos/quickstart/protected/pages/GettingStarted/wsat_generate_ar.pngbin0 -> 75503 bytes
-rw-r--r--demos/quickstart/protected/pages/GettingStarted/wsat_login.pngbin0 -> 47951 bytes
8 files changed, 159 insertions, 13 deletions
diff --git a/demos/quickstart/protected/pages/GettingStarted/AboutPrado.page b/demos/quickstart/protected/pages/GettingStarted/AboutPrado.page
index 22437158..1a416a32 100755
--- a/demos/quickstart/protected/pages/GettingStarted/AboutPrado.page
+++ b/demos/quickstart/protected/pages/GettingStarted/AboutPrado.page
@@ -51,12 +51,12 @@ Most PHP frameworks mainly focuses on separating presentation and logic and prom
<h2 id="4004">Is PRADO Stable Enough?</h2>
<p id="20004" class="block-content">
-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.
+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 GitHub and we have a great user community and development team to ensure all questions are answered in a timely fashion.
</p>
<h2 id="205">History of PRADO</h2>
<p id="20014" class="block-content">
-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.
+The very original inspiration of PRADO came from Apache Tapestry. During the design and implementation, Qiang Xue 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, Qiang 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.
</p>
<p id="20015" class="block-content">
In August 2004, PRADO started to be hosted on SourceForge as an open source project. Soon after, the project site <a href="http://www.xisc.com/">xisc.com</a> 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.
@@ -64,6 +64,12 @@ In August 2004, PRADO started to be hosted on SourceForge as an open source proj
<p id="20016" class="block-content">
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.
</p>
+<p class="block-content">
+In October 2008, the original development team released a new framework called <a href="http://www.yiiframework.com/">Yii</a>. Inheriting most of the PRADO code, Yii left the pages/events concept, focusing on a pure MVC design pattern. Since 2009 a lot of people contributed to PRADO fixing issues, developing new features or backporting them from Yii.
+</p>
+<p class="block-content">
+To promote a model of community-driven development, the project repositories were moved first on <a href="http://code.google.com/p/prado3/">Google Code</a> and then, in September 2013, on <a href="http://github.com/pradosoft/prado">GitHub</a>.
+</p>
<p id="20017" class="block-content">
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.
</p>
diff --git a/demos/quickstart/protected/pages/GettingStarted/CommandLine.page b/demos/quickstart/protected/pages/GettingStarted/CommandLine.page
index 5f5dacb9..e3626bcc 100755
--- a/demos/quickstart/protected/pages/GettingStarted/CommandLine.page
+++ b/demos/quickstart/protected/pages/GettingStarted/CommandLine.page
@@ -1,6 +1,12 @@
<com:TContent ID="body" >
<h1 id="501">Command Line Tool</h1>
-<p id="70046" class="block-content">The optional <tt>prado-cli.php</tt> PHP script file in the <tt>framework</tt>
+
+<div class="Note">
+<b class="tip">Note:</b> With Prado version 3.2.3 prado-cli.php location changed from framework
+to bin directory. If you're using Prado 3.2.2 or earlier, replace bin with framework in examples below.
+</div>
+
+<p id="70046" class="block-content">The optional <tt>prado-cli.php</tt> PHP script file in the <tt>bin</tt>
directory provides command line tools to perform various tedious takes in Prado.
The <tt>prado-cli.php</tt> can be used to create Prado project skeletons, create
initial test fixtures, and access to an interactive PHP shell.
@@ -14,7 +20,7 @@ the command line.
<h2 id="503">Usage</h2>
<p id="70048" class="block-content">
-If you type <tt>php path/to/framework/prado-cli.php</tt>, you should see
+If you type <tt>php path/to/bin/prado-cli.php</tt>, you should see
the following information. Alternatively, if you are not on Windows,
you may try to change the <tt>prado-cli.php</tt> into an executable
and execute it as a script</p>
@@ -43,9 +49,9 @@ are optional parameters. </p>
<p id="70050" class="block-content">To create a Prado project skeleton, do the following:</p>
<ol>
<li>Change to the directory where you want to create the project skeleton.</li>
- <li>Type, <tt>php ../prado/framework/prado-cli.php -c helloworld</tt>, where
+ <li>Type, <tt>php ../prado/bin/prado-cli.php -c helloworld</tt>, where
<tt>helloworld</tt> is the directory name that you want to create the project skeleton files.</li>
- <li>Type, <tt>php ../prado/framework/prado-cli.php <b>-t</b> helloworld</tt> to create
+ <li>Type, <tt>php ../prado/bin/prado-cli.php <b>-t</b> helloworld</tt> to create
the test fixtures for the <tt>helloworld</tt> project.</li>
</ol>
@@ -58,7 +64,7 @@ command line is in the <tt>prado</tt> distribution directory and you type.
</p>
<p id="70052" class="block-content">
<com:TTextHighlighter Language="cli" CssClass="source block-content cli" id="code_70007">
-$: php framework/prado-cli.php shell demos/blog
+$: php bin/prado-cli.php shell demos/blog
</com:TTextHighlighter>
The output should be
<com:TTextHighlighter Language="cli" CssClass="source block-content cli" id="code_70008">
@@ -85,7 +91,7 @@ we <b>leave out the semicolon</b> to show the results.
<com:TTextHighlighter Language="cli" CssClass="source block-content cli" id="code_70010">
>> $db->queryPostByID(1)
</com:TTextHighlighter>
-There should not be any errors and you should see the following.
+There should not be any errors and you should see the following.
<com:TTextHighlighter Language="cli" CssClass="source block-content cli" id="code_70011">
PostRecord#1
(
@@ -103,4 +109,34 @@ PostRecord#1
)
</com:TTextHighlighter>
</p>
+
+<h2 id="14007">Creating Active Record Classes</h2>
+<p id="70001" class="block-content">
+In the blog demo project, we need to create two <a href="?page=Database.ActiveRecord">Active Record</a> classes, <tt>UserRecord</tt> and <tt>PostRecord</tt>, to represent data records in the <tt>users</tt> and <tt>posts</tt> tables, respectively. Active Record classes must extend from the base class <tt>ActiveRecord</tt>, and must define property names that matches with the field names of the corresponding table.
+</p>
+
+<p id="70002" class="block-content">
+To better organize our directories, we create a new directory <tt>protected/database</tt> to hold the class files. We also modify our application configuration by inserting the following lines. It is equivalent to adding the directory <tt>protected/database</tt> to PHP include_path, which allows us to use the classes without explicitly including them.
+</p>
+
+<com:TTextHighlighter CssClass="source block-content" id="code-70014" Language="xml">
+<paths>
+ <using namespace="Application.database.*" />
+</paths>
+</com:TTextHighlighter>
+
+<p id="70003" class="block-content">
+At the prompt, enter the following two commands to create <tt>UserRecord</tt> and <tt>PostRecord</tt> classes:
+</p>
+
+<com:TTextHighlighter CssClass="source cli" Language="text">
+>> generate users Application.database.UserRecord
+
+>> generate posts Application.database.PostRecord
+</com:TTextHighlighter>
+
+<p id="70004" class="block-content">
+Here we used the <a href="?page=Fundamentals.Components1">namespace format</a> again to specify the classes to be created. The path <tt>Application.database.UserRecord</tt> indicates that we want the <tt>UserRecord</tt> class file to be <tt>protected/database/UserRecord.php</tt>.
+</p>
+
</com:TContent>
diff --git a/demos/quickstart/protected/pages/GettingStarted/HelloWorld.page b/demos/quickstart/protected/pages/GettingStarted/HelloWorld.page
index 557aa46d..d65cf7f8 100755
--- a/demos/quickstart/protected/pages/GettingStarted/HelloWorld.page
+++ b/demos/quickstart/protected/pages/GettingStarted/HelloWorld.page
@@ -29,7 +29,7 @@ where each directory is explained as follows. Note, the above directory structur
</ul>
<div class="tip">
-<b class="tip">Tip:</b>You may also use the <tt>framework/prado-cli.php</tt>
+<b class="tip">Tip:</b>You may also use the <tt>bin/prado-cli.php (framework/prado-cli.php for Prado < 3.2.3)</tt>
<a href="?page=GettingStarted.CommandLine">command line script</a>
to create the Prado project directory structure. For example, type the command
<tt>php path/to/prado-cli.php -c helloworld</tt> in the directory
diff --git a/demos/quickstart/protected/pages/GettingStarted/Installation.page b/demos/quickstart/protected/pages/GettingStarted/Installation.page
index 7919e733..f59eed70 100755
--- a/demos/quickstart/protected/pages/GettingStarted/Installation.page
+++ b/demos/quickstart/protected/pages/GettingStarted/Installation.page
@@ -5,16 +5,17 @@
If you are viewing this page from your own Web server, you are already done with the installation.
</p>
<p id="30019">
-The minimum requirement by PRADO is that the Web server support PHP 5.2. 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.2 is supported.
+The minimum requirement by PRADO is that the Web server support PHP 5.3.3. PRADO has been tested with Apache Web server on Windows, MacOSX and various Linux distro. Highly possibly it may also run on other platforms with other Web servers, as long as PHP 5.3.3 is supported.
</p>
</div>
-<div id="install-steps" class="block-content">
<p id="30020">
-Installation of PRADO mainly involves downloading and unpacking.
+PRADO can be installed as a standalone package or using <a href="http://getcomposer.org/">composer</a>
</p>
+<div id="install-steps" class="block-content">
+<h3 id="6001">Standalone package</h3>
<ol>
-<li>Go to <a href="http://www.pradosoft.com/">pradosoft.com</a> to grab the latest version of PRADO.</li>
+<li>Go to <a href="http://www.pradosoft.com/download/">pradosoft.com</a> to grab the latest version of PRADO.</li>
<li>Unpack the PRADO release file to a Web-accessible directory.
</ol>
</div>
@@ -25,5 +26,37 @@ Your installation of PRADO is done and you can start to play with the demo appli
<p id="30022">
If you encounter any problems with the demo applications, please use the PRADO requirement checker script, accessible via <tt>http://web-server-address/prado/requirements/index.php</tt>, to check first if your server configuration fulfills the conditions required by PRADO.
</p>
+
+<div id="install-steps" class="block-content">
+<h3 id="6002">Composer install</h3>
+<ol>
+<li>If you don't have installed composer already, install it globally:
+<com:TTextHighlighter CssClass="source block-content">
+$ curl -s http://getcomposer.org/installer | php
+$ php composer.phar install
+</com:TTextHighlighter>
+</li>
+<li>Create a composer.json file for your project:
+<com:TTextHighlighter CssClass="source block-content">
+{
+ "require": {
+ "pradosoft/prado": "~3.2"
+ }
+}
+</com:TTextHighlighter>
+</li>
+<li>Now run the actual installation:
+<com:TTextHighlighter CssClass="source block-content">
+$ composer install
+</com:TTextHighlighter>
+</li>
+<li>In your project include the autoloader, and you will have access to the library classes:
+<com:TTextHighlighter CssClass="source block-content">
+<?php
+require_once('vendor/autoload.php');
+</com:TTextHighlighter>
+</li>
+</ol>
</div>
+
</com:TContent>
diff --git a/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page b/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page
index 95bcc57f..4b2ba083 100755
--- a/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page
+++ b/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page
@@ -6,6 +6,13 @@
This page summarizes the main new features that are introduced in each PRADO release.
</p>
+<h2 id="8001">Version 3.2.4</h2>
+<ul>
+<li>Added Adding toArray() and toJSON() to TActiveRecord</li>
+<li>Dropped Markdown for Parsedown, supporting GitHub Flavored Markdown's extension</li>
+<li>Web site administration tool (<a href="?page=GettingStarted.Wsat">WSAT</a>)</li>
+</ul>
+
<h2 id="8001">Version 3.2.3</h2>
<ul>
<li>Added <a href="?page=Controls.HtmlArea4">THtmlArea4 control</a> based on TinyMCE4</li>
diff --git a/demos/quickstart/protected/pages/GettingStarted/Wsat.page b/demos/quickstart/protected/pages/GettingStarted/Wsat.page
new file mode 100644
index 00000000..6d7ddb37
--- /dev/null
+++ b/demos/quickstart/protected/pages/GettingStarted/Wsat.page
@@ -0,0 +1,64 @@
+<com:TContent ID="body">
+ <h1 id="12003">Web Site Administration Tool</h1>
+ <p class="block-content">
+ Web Site Administration Tool (WSAT) is a development tool which allows you to perform several
+ tedious tasks of a PRADO project in a GUI fashion. Its inspired in both Asp.Net - Web Site Administration Tool and Yii's Gii.
+ WSAT will continue gaining new features along the time, at the moment it bring you the followings:
+
+ <ul>
+ <li>Generate one or all <a href="?page=Database.ActiveRecord">Active Record Classes.</a></li>
+ <li>Optionally generate all relationships in Active Record Classes.</li>
+ <li>Generate the magic __toString() method in all AR Classes.</li>
+ </ul>
+ </p>
+
+ <h2 id="12004">Requirements</h2>
+ <p class="block-content">
+ To use WSAT, you need to add in your project configuration file: <tt>application.xml</tt>,
+ in the services section the wsat service like follows:
+
+<com:TTextHighlighter CssClass="source block-content" id="code-60007" Language="xml">
+<services>
+ ...
+ <service id="wsat" class="System.Wsat.TWsatService" Password="my_secret_password" />
+</services>
+</com:TTextHighlighter>
+ </p>
+
+ <h2 id="12005">Usage</h2>
+ <p class="block-content">
+ Then you are ready to go to: http://localhost/yoursite/index.php?wsat=TWsatLogin and doing so you should see
+ the following page:
+ </p>
+ <img src="<%~wsat_login.png%>" style="width: 700px;" />
+ <p class="block-content">
+ Where in the text field you need to type the password previosly specified in the service inclusion. This
+ is part of a basic security system to avoid undesirable persons to use this tool.
+ </p>
+
+ <h2 id="12006">Active Record classes generation</h2>
+ <p class="block-content">
+ In order to generate AR classes you need to go to: http://localhost/yoursite/index.php?wsat=TWsatGenerateAR
+ by clicking the proper links in the welcome page. Then you should see the following page:
+ </p>
+ <img src="<%~wsat_generate_ar.png%>" style="width: 700px;" />
+ <p class="block-content">
+ In which you can find a basic usage documentation in a light green panel
+ and then some proper fields in order to generate active record classes. These fields are:
+ </p>
+
+ <ul>
+ <li><b>Table Name: </b> refers to the table name in your database for which you want to generate an AR class.
+ Let it as come by default with an * to generate them all.</li>
+ <li><b>Output Folder: </b> refers to the folder where you want to save your generated classes.
+ It only accepts namespace format which means that you need to specify your path separated with points in between.
+ It default value is: "Application.App_Data.AR_Classes" which references the protected/App_Data/AR_Classes
+ file of your project, if you haven't created them yet and you want to, don't bother, WSAT will do it for you.</li>
+ <li><b>Class Prefix: </b> refers to the prefix that you whish to specify in front of every class name.
+ Clear the field to specify no prefix.</li>
+ <li><b>Class Suffix: </b> refers to the suffix that you whish to specify at the end of every class name.
+ Clear the field to specify no suffix.</li>
+ <li><b>Build Relations: </b> whether or not you want to add relationships to AR classes generation.</li>
+ </ul>
+
+</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/GettingStarted/wsat_generate_ar.png b/demos/quickstart/protected/pages/GettingStarted/wsat_generate_ar.png
new file mode 100644
index 00000000..8f0f59e7
--- /dev/null
+++ b/demos/quickstart/protected/pages/GettingStarted/wsat_generate_ar.png
Binary files differ
diff --git a/demos/quickstart/protected/pages/GettingStarted/wsat_login.png b/demos/quickstart/protected/pages/GettingStarted/wsat_login.png
new file mode 100644
index 00000000..dbe1ad8b
--- /dev/null
+++ b/demos/quickstart/protected/pages/GettingStarted/wsat_login.png
Binary files differ