This time I will try to create a famous application “hello world”, using prado framework. For the first time you must create the prado project skeleton below your webserver root . If you don’t know how to create it, you can read my article before.
This is my HelloWorld Project skeleton :
I’ve added framework’s folder inside my HelloWorld project. You can find it from original Prado source.
Open the index.php file and change the value of $frameworkPath variable. And direct it to prado.php file inside the framework folder.
This main purpose for this index.php file is load the prado.php file to our project. And this is the first gate for running our application.
Next, go to protected folder and open the application.xml
This application.xml file used for setting your web application, you can add module, setting path, service configuration or add parameter to your application here. But for this example, you can leave for changing the code for this file. The service tag with id=”page” and DefaultPage=”Home”, it show that your application will be open the Home.page file inside the pages folder for the first time.
Now go inside the pages folder and create Home.page file. And create one button by using the TButton class component. Important in every prado .page , there must be have one TForm class component before using other component. This is the code for Home.page :
We have created the view part represented by Home.page file, then for control part we must create the class named Home.php. Because in the Home.page file we are using the TButton component and already have OnClick event named btHelloClicked, in this file we must handle that event by create a function btHelloClicked with $sender and $param as parameter.
*remember prado is a event driven framework, like ASP.Net
Now try to acces your HelloWorld application using your browser :
Creating Hello World Application
Posted by NanoTutor | Thursday, February 19, 2009 | Prado | 1 comments »
Subscribe to:
Post Comments (Atom)
ебут в школе онлайн http://free-3x.com/ любителькое фото подростков free-3x.com/ студенчиские секс вечеринки [url=http://free-3x.com/]free-3x.com[/url]