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
-rw-r--r--demos/quickstart/protected/pages/GettingStarted/CommandLine.page6
-rwxr-xr-xdemos/quickstart/protected/pages/GettingStarted/Installation.page41
-rw-r--r--demos/quickstart/protected/pages/GettingStarted/Upgrading32.page234
4 files changed, 282 insertions, 9 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 bc8f2f55..07609da5 100644
--- a/demos/quickstart/protected/pages/GettingStarted/CommandLine.page
+++ b/demos/quickstart/protected/pages/GettingStarted/CommandLine.page
@@ -15,7 +15,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
-the following information. Alternatively, if you are not on Windows,
+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>
<com:TTextHighlighter Language="cli" CssClass="source block-content cli" id="code_70006">
@@ -85,7 +85,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
(
@@ -130,7 +130,7 @@ At the prompt, enter the following two commands to create <tt>UserRecord</tt> an
</com:TTextHighlighter>
<p>
-Here we used the <a href="?page=Fundamentals.Components">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>.
+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/Installation.page b/demos/quickstart/protected/pages/GettingStarted/Installation.page
index 7919e733..956f53c2 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>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>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/Upgrading32.page b/demos/quickstart/protected/pages/GettingStarted/Upgrading32.page
new file mode 100644
index 00000000..e6e2b1cf
--- /dev/null
+++ b/demos/quickstart/protected/pages/GettingStarted/Upgrading32.page
@@ -0,0 +1,234 @@
+<com:TContent ID="body" >
+
+<h1>Upgrading from v3.2</h1>
+
+<div class="block-content">
+<p class="block-content">
+Since version 3.3, PRADO uses <a href="http://jquery.com/">jQuery</a> as its default javascript framework.
+Previously, up to version 3.2, PRADO used <a href="http://prototypejs.org/">Prototype</a> and <a href="http://script.aculo.us/">Scriptaculous</a> as its default javascript framework.
+</p>
+<p class="block-content">
+PRADO relies a lot on clientside javascript code to implement its <a href="?page=Controls.Standard">standard controls</a>, to handle clientside <a href="?page=Controls.Validation">validators</a>, and to create a seamless <a href="?page=ActiveControls.Introduction">ajax</a> experience using <a href="?page=ActiveControls.Home">active controls</a>.
+All this javascript code, originally developed on Prototype, has been rewritten in order to use jQuery instead. The choice was mainly driven by the lack of development and decline of the Prototype community, while jQuery has become the de-facto standard library for javascript.
+</p>
+<p class="block-content">
+While the PRADO javascript code is ready to work with jQuery, legacy javascript code in existing applications can require some porting to make it work properly.
+We summarize in the following the most significant changes in v3.3 to help developers upgrade their v3.2 PRADO applications more easily, if needed.
+</p>
+</div>
+
+<h2>Basic Prototype to jQuery javascript porting</h2>
+<p class="block-content">
+The number one rule on writing jQuery javascript code is to read the <a href="http://api.jquery.com/">jQuery documentation</a>. Porting code from Prototype to jQuery needs some effort: here's a basic lookup table to port existing code:
+</p>
+<table class="tabular">
+ <tr>
+ <th></th>
+ <th>Prototype (OLD)</th>
+ <th>jQuery (NEW)</th>
+ </tr>
+ <tr>
+ <td>Get element by id</td>
+ <td>$('element_id')</td>
+ <td>// get the base DOM element
+ <br/>$('#element_id').get(0)
+ <br/>// get the the extended element
+ <br/>$('#element_id').eq(0)
+ </td>
+ </tr>
+ <tr>
+ <td>Get element by css selector</td>
+ <td>$$('.class')</td>
+ <td>$('.class')</td>
+ </tr>
+ <tr>
+ <td>Apply a function to multiple elements</td>
+ <td>$$('.class').each(Element.remove)</td>
+ <td>$('.class').remove()</td>
+ </tr>
+ <tr>
+ <td>Create or extend a class</td>
+ <td>Class.create(Prado.WebUI.Control, { ... })
+ <br/>Class.extend(Prado.WebUI.Control, { ... })
+ </td>
+ <td>jQuery.klass(Prado.WebUI.Control, { ... })</td>
+ </tr>
+ <tr>
+ <td>Extend an object</td>
+ <td>Object.extend(...)</td>
+ <td>jQuery.extend(...)</td>
+ </tr>
+ <tr>
+ <td>Bind an event to a callback event handler</td>
+ <td>Event.observe(element, 'click', callback)</td>
+ <td>$(element).on('click', callback)</td>
+ </tr>
+ <tr>
+ <td>Unbind an event from a callback event handler</td>
+ <td>Event.stopObserving(element, 'click', callback)</td>
+ <td>$(element).off('click', callback)</td>
+ </tr>
+ <tr>
+ <td>Stop event propagation</td>
+ <td>Event.stop(event)</td>
+ <td>// stop event bubbling chain
+ <br/>event.stopPropagation()
+ <br/>// prevent form submit
+ <br/>event.preventDefault()
+ </td>
+ </tr>
+ <tr>
+ <td>Detect keypress event</td>
+ <td>if(kc == Event.KEY_RETURN ||
+ <br/>kc == Event.KEY_SPACEBAR ||
+ <br/>kc == Event.KEY_TAB)</td>
+ <td>// use the numeric codes
+ <br/>if(kc == 13 ||
+ <br/>kc == 32 ||
+ <br/>kc == 9)
+ </td>
+ </tr>
+ <tr>
+ <td>Execute a function when the page has finished loading</td>
+ <td>document.observe("dom:loaded", function(event) { ... })</td>
+ <td>$( document ).ready(function() { ... })</td>
+ </tr>
+ <tr>
+ <td>Create an animation effect with a "finish" callback</td>
+ <td>new Effect.Fade(element, {
+ <br/>duration: 400,
+ <br/>afterFinish: function() {
+ <br/>// Animation complete.
+ <br/>});</td>
+ <td>$(element).fadeOut( 400, function() {
+ <br/>// Animation complete.
+ <br/>});</td>
+ </tr>
+ <tr>
+ <td>Declare a function to be used as event handler binding its "this" property</td>
+ <td>this.functionName.bindAsEventListener(this)</td>
+ <td>this.functionName.bind(this)</td>
+ </tr>
+ <tr>
+ <td>Css class functions (add, remove, test for css class)</td>
+ <td>addClassName()
+ <br/>removeClassName()
+ <br/>hasClassName()
+ </td>
+ <td>addClass()
+ <br/>removeClass()
+ <br/>hasClass()
+ </td>
+ </tr>
+ <tr>
+ <td>Get event target inside an event handler</td>
+ <td>Event.element(event)</td>
+ <td>event.target</td>
+ </tr>
+ <tr>
+ <td>Get event mouse position</td>
+ <td>Event.pointerX(event)
+ <br/>Event.pointerY(event)
+ </td>
+ <td>event.pageX
+ <br/>event.pageY
+ </td>
+ </tr>
+ <tr>
+ <td>Fire events</td>
+ <td>Event.fireEvent(this.control, "change")</td>
+ <td>$(element).trigger("change")</td>
+ </tr>
+ <tr>
+ <td>Get element size</td>
+ <td>element.getWidth()
+ <br/>element.getHeight()
+ </td>
+ <td>element.width
+ <br/>element.height
+ </td>
+ </tr>
+ <tr>
+ <td>Hook on ajax events</td>
+ <td>Ajax.Responders.register({
+ <br/>"onLoading" : my_function
+ <br/>});
+ <br/>Ajax.Responders.register({
+ <br/>"onSuccess" : my_function
+ <br/>});
+ </td>
+ <td>$( document ).ajaxSend(my_function);
+ <br/>$( document ).ajaxSuccess(my_function);
+ </td>
+ </tr>
+</table>
+
+<h2>PRADO specific code changes</h2>
+<p class="block-content">
+PRADO
+Porting prado to jQuery some method signatures has changed, or have been adapted:
+</p>
+<table class="tabular">
+ <tr>
+ <th></th>
+ <th>Prototype (OLD)</th>
+ <th>jQuery (NEW)</th>
+ </tr>
+ <tr>
+ <td>Implementing the postback handler for a PostBackControl;
+ <br/>the function signature has changed (parameters are inverted):</td>
+ <td>onPostBack : function(event, options)</td>
+ <td>onPostBack : function(options, event)</td>
+ </tr>
+ <tr>
+ <td>Execute a postback</td>
+ <td>Prado.PostBack(options, event);</td>
+ <td>// Create a new object
+ <br/>new Prado.PostBack(options, event);
+ </td>
+ </tr>
+ <tr>
+ <td>Test browser software method has been removed</td>
+ <td>Prado.Browser().ie</td>
+ <td>// Test for browser support for specific capabilities instead
+ <br/>jQuery.support
+ <br/>// or, better, use <a href="http://modernizr.com/">Modernizr</a>
+ </td>
+ </tr>
+ <tr>
+ <td>Focus an element</td>
+ <td>Prado.Element.focus(element)</td>
+ <td>$(element).focus()</td>
+ </tr>
+</table>
+
+<h2>Specific controls changes</h2>
+<p class="block-content">
+Some Prado controls were based on specific extensions of the Prototype + Scriptaculous javascript framework, and they have been deprecated now that jQuery has become the primary js framework in PRADO.
+PRADO 3.3 introduces jQuery-based counterpart for these controls and encourage everyone to port their code to the new controls, but the old controls are still supposed to work with some minor annoyance:
+<ul>
+ <li>Prototype and Scriptaculous will be loaded along jQuery</li>
+ <li>jQuery will execute in "no conflict" mode, so the $() helper won't call anymore jQuery but Prototype.</li>
+</ul>
+Following is the list of deprecated controls:
+</p>
+
+<h4>TAutoComplete</h4>
+<p class="block-content">
+<tt>TAutoComplete</tt> is deprecated, use <tt>TJuiAutoComplete</tt> instead. Main changes in porting existing code using TAutoComplete to TJuiAutoComplete:
+<ul>
+ <li>the <tt>Frequency</tt> property doesn't exists anymore</li>
+ <li>the <tt>minChars</tt> property is called <tt>minLength</tt></li>
+ <li>only the <tt>ItemTemplate</tt> is supported for the <tt>Suggestions</tt> repeater (no HeaderTemplate, FooterTemplate, etc..)</li>
+ <li><tt>ItemTemplate</tt> doesn't need to render the &lt;li&gt; tag anymore, but only the content itself</li>
+ <li>multiple selections are not supported</li>
+</ul>
+</p>
+
+<h4>TDraggable and TDropContainer</h4>
+<p class="block-content">
+<tt>TDraggable</tt> and <tt>TDropContainer</tt> have been deprecated and replaced respectively by <tt>TJuiDraggable</tt> and <tt>TJuiDroppable</tt>.
+The options for the new controls are available at <a href="http://api.jqueryui.com/">jQueryUI's API documentation</a>.
+</p>
+
+</com:TContent>