Prado Currency Converter Tutorial in NetBeans
By Petr on Aug 26, 2008
In my last entry I described how to create a simple web PHP application based on the Prado Framework. It was a simple Hello World example and the whole project was created in NetBeans. In this entry I show you how to start a Currency Converter Prado tutorial. It does not make sense to duplicate the whole tutorial from the Prado web, so I show you how to start the project, because the steps in starting the project are the most specific to NetBeans.
The Prado framework contains the prado-cli.php script, which you can use to generate the structure of a new web php application based on Prado. Open a command line and change the directory to your document root. If you tried to create the Prado Hello World tutorial, you should already have the prado folder in your document root. If you don't have it, please read this entry. In the command line invoke the following command.
php prado/framework/prado-cli.php -c currency-converter
If the command was executed successfully, the currency-converter folder appears in your document root.
In the next step we import this project into NetBeans. Start NetBeans and invoke the New Project Wizard. Select PHP category and PHP Application with Existing sources.
Click on the Next > button. The Name and Location pane opens. For the source folder, select the created currency-converter folder. You don't have to change anything else.
You don't have to change anything in the last step either. Just click the Finish button.
The project now is created and open. It would be good if NetBeans knew about the Prado framework files, so put these files into the Include path. Select the Include Path node in the Project Explorer and invoke the Properties item from the context menu. It opens the Project Properties dialog. In the dialog, add the prado/framework folder into the Include Path from your document root.
Now you can run the project. After invoking the Run action you should see the message "Welcome to Prado!" in your browser.
This is everything that is NetBeans-specific. From here you can continue with the tutorial according to the Prado web site.