| Item | Value |
|---|---|
| Latest version | 3.1.1 |
| PHP4 | - |
| PHP5 | |
| MVC | |
| Multiple DB | |
| ORM | |
| DB Objects | |
| Templates | |
| Caching | |
| Validation | |
| Ajax | |
| Auth Module | |
| Modules | |
| EDP | |
| Cost | Free |
| Official website | http://www.pradosoft.com/ |
| Download URL | http://www.pradosoft.com/download/ |
| Manual URL | http://www.pradosoft.com/documentation/ |
| Installation | We start by setting up the directories and the files that are required by most PRADO applications. We use the PRADO command line tool to achieve this goal. Assume blog is the name of the directory to hold the whole blog system, and the URL to access this folder is http://hostname/blog/ (replace hostname with the actual host name). Under the blog directory, we run the PRADO command line tool with the following command (replace path/to with the actual path to the PRADO framework installation): php path/to/prado-cli.php -c . Running the above command creates the following directories and files:
We now have a skeleton PRADO application accessible via the URL http://hostname/blog/index.php which brings up a Web page showing "Welcome to PRADO". It is beneficial to learn more details about the directories and files we just created. Initial FilesThe Entry ScriptEvery PRADO application has an entry script, often named as index.php. In most cases, it is the only PHP script that is directly accessible by Web users. This reduces the risk of allowing Web users to execute unwanted scripts on the server. The main purpose of the entry script is to initialize the PRADO application and have it handle user requests. The entry script usually contains the following PHP statements, // include prado.php which contains basic PRADO classes require_once('path/to/prado.php'); // create a PRADO application instance $application = new TApplication; // run the application and handle user requests $application->run(); Info:
The name of the entry script does not need to be index.php. It can be any name as long as the Web server can tell that the script is a PHP 5 script. For example, on some shared hosting environments, one may need to name the script as index.php5 so that it can be properly handled by the Web server.
Application ConfigurationThe optional XML file application.xml contains the application configuration. Its main purpose is to customize in a configurable fashion the application instance created in the entry script. For example, we may enable the logging feature for our blog system with the help of application configuration. The file application.xml we have now is nearly empty. In fact, we may safely remove it because the application at the moment uses only default settings of PRADO. As we move forward, we will refer back constantly and show how to configure our application in application.xml. HomepageThe homepage (also called default page) Home.page is the only page created by the PRADO command line tool. It is the content in this file that shows up in the browser when visiting the URL http://hostname/blog/index.php. Content in the file Home.page uses the PRADO template format, which is mostly like HTML enhanced with a few PRADO-specific tags. For example, in Home.page we see the following pure HTML content: <html> <head> <title>Welcome to PRADO</title> </head> <body> <h1>Welcome to PRADO!</h1> </body> </html> Initial DirectoriesThe protected DirectoryThe protected directory, also known as the application base path, is the root directory holding pages, templates, configurations, data, etc. The name protected indicates this directory should be hidden from Web users, because files under this directory often contain sensitive data. Different Web servers have different ways of "protecting" a directory. For Apache httpd server, the easiest way is to place under the directory a file named .htaccess with the content deny from all. The protected/runtime and assets DirectoriesThe protected/runtime and assets directories are the two directories that must be set writable by the Web server process. The runtime directory stores sensitive data (e.g. parsed application configuration) generated when running a PRADO application, while the assets directory stores published resources (e.g. image files, javascript files). Info:
It is safe to remove files and directories under protected/runtime and assets. In fact, developers are recommended to do this cleanup work when they upgrade their PRADO installation.
The pages DirectoryThe pages directory is the root page directory holding all pages in a PRADO application. It bears an analogy to the htdocs directory for the Apache httpd Web server. We already see how to access the homepage. To access an arbitrary page located under pages, use the URL http://hostname/blog/index.php?page=path.to.PageName. According to this URL, PRADO will look for a page named PageName under the directory pages/path/to. The URL we used to access the homepage previously is equivalent to http://hostname/blog/index.php?page=Home. CustomizationIt is possible to customize the name and location of the files and directories described above. For example, to improve security, one may want to move the whole protected directory to somewhere else that is not a Web folder. To do so, use the following PHP statement to create the application instance in the entry script: $application = new TApplication( 'path/to/protected' ); To change the location of the root page directory and change the name of homepage, one can specify it in the application configuration application.xml as follows: <?xml version="1.0" encoding="utf-8"?> <application id="blog" mode="Debug"> <services> <service id="page" class="TPageService" BasePath="path.to.pages" DefaultPage="NewHome" /> </services> </application> As you learn more about PRADO, you will see that PRADO is such a flexible framework that it allows you to customize nearly every aspect. We will describe more customization techniques as we continue with our tutorial. |
| System Requirements | This page lists the requirements for the blog system that we are going to develop in this tutorial using PRADO. We are not including some popular blog features here (e.g. commenting, posts organizing, calendar, etc.), because we want to keep our tutorial short enough and we believe these features are easy to be added after you finish reading this tutorial. In general, the blog system should allow users to read blogs and authenticated users to publish blogs. It should separate presentation and logic, and it should support changing themes. User Management
Post Management
System Maintenance
|
Comments:
1 dRvoHcxyQJF
posted by:Your Name he or she think Prado is a 

framework,because:
Even though members can be academic experts and researchers, Yahoo! ,
2 Comment Title
posted by:martin he or she think Prado is a 



framework,because:
Best Framework i have ever seen.
@Others: Prado very well supports MVC, but it is not so advertised like the other frameworks do. Take a deeper look into the quickstart tutorial and you'll see some big advantages! ;)
3 Comment Title
posted by:andyknownasabu he or she think Prado is a 



framework,because:
Coming from Apache Tapestry i.e. from the Java world I found PRADO to be the only PHP framework which is completely based on event driven programming (EDP). It also supports most if not all the other features available in other MVC frameworks but IMHO EDP is what pushed PHP web development to another level.
4 Comment Title
posted by:Gerard he or she think Prado is a 
framework,because:
Some nice features, some beautiful pieces of code but lack a lot of basic useful features in a web development context
5 Comment Title
posted by:Kiel he or she think Prado is a 
framework,because:
Interesting but lacks of MVC layer
6 Comment Title
posted by:rojaro he or she think Prado is a 



framework,because:
The chart is inaccurate. Prado has ORM, DB Objects and Modules.
7 Comment Title
posted by:Bandung he or she think Prado is a 



framework,because:
Even a simple web application created using Prado took no less than 5 minutes.
8 Comment Title
posted by:Ade ZM he or she think Prado is a 



framework,because:
This is a stable PHP5 Framework even for large scale web applications.
9 Comment Title
posted by:Serg he or she think Prado is a 

framework,because:
Good for small and highly interactive projects, but MVC architecture used in ZF and Symfony is more powerful and suitable for big projects as good as for small ones.
10 Comment Title
posted by:Laura he or she think Prado is a 



framework,because:
PRADO is the most advance PHP Framework.
Good Comments(0) |
Bad Comments(0) |