An Oracle blog about NetBeans for PHP

  • News
    August 26, 2008

Prado Currency Converter Tutorial in NetBeans

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

Join the discussion

Comments ( 13 )
  • JDavidZ Wednesday, August 27, 2008

    Excelent!. Netbeans is getting stronger!!...

    Is there some way to autocomplete Prado tags in \*.page, \*.tpl or \*.skin files? I mean, if there is some way to add these autocomplete rules to Netbeans...

    That's just a question.


  • Adam Jorgensen Thursday, August 28, 2008

    Hey guys, a quick question...

    Will you be able to support the @property PHPDoc tag at some point in thie future?

    Support for this would be great, as it would allow for the compltion of variables managed by the __get and __set magic methods.

  • Petr Thursday, August 28, 2008

    Hi JDavidZ,

    unfortunately not. But there is based project, which will create support for Prado in NetBeans. I hope that first alpha version will be available soon.



  • Petr Thursday, August 28, 2008

    Hi Adam,

    in the current build we don't support it. Bu I have entered two issues for this:



    You can add your comment there. It would be good to know, if you expect more, than I have describe in the second issue.

    Hopefully it will be fixed in NB 6.5.



  • Petr Thursday, August 28, 2008
  • Joaquin Fernandez Campo Friday, August 29, 2008


    Do you have any plans to support CakePHP in the future? Right now, I can develop application but it is not a very clean way to do so, I create an application from sources and it works but i don't get any kind of code completion from the cake libraries. Is there a solution for these problems?

    Thanks, Joaquín

  • Petr Friday, August 29, 2008

    Hi Joaquin,

    put the cake libraries to the project include path. Go to the Project Properties dialog and there you can specify the include path.



  • Joaquín Fernández Campo Friday, August 29, 2008

    Thanks Petr! It more or less worked. Let me explain:

    When I'm working with controllers it works just fine but when I'm working with views it doesn't work. I believe it is because the controllers inherit from AppController but the view are .ctp files (I already told netbeans to treat them as php files) that don't inherit from anywhere for example:


    <h1>Edit Post</h1>


    echo $form->create('Post', array('action' => 'edit'));

    echo $form->input('title');

    echo $form->input('body', array('rows' => '3'));

    echo $form->input('id', array('type'=>'hidden'));

    echo $form->end('Save Post');



    Any ideas?

  • Petr Friday, August 29, 2008

    Hi Joaquín,

    I'm afraid that without specific support for Cake PHP, we will not able to provide a help in this situation. The problem, as you mentioned, is that the IDE can not know, how the $form is defined.

    There is not such support yet for NetBeans 6.5. For the next release we want to make a support for a few frameworks. Which frameworks, it can be decide by community.



  • Joaqu&iacute;n Fern&aacute;ndez Campo Monday, September 1, 2008

    Well thanks for your answer.

    How are you going to decide which framework to support and which one not to? Are you going to poll the comunnity about it? Thanks

  • Petr Tuesday, September 2, 2008

    Hi Joaquín,

    basically you are right. The community can very significantly influence, which one will be done as first. I'm talking about official support.

    You can vote in our issuezilla. Find or base issue about the framework, which you want and vote for it.



  • currency converter Tuesday, February 24, 2009

    I tried it at forexrate.com.au and it worked first time. Thanks everyone!

  • Acasanva Friday, September 2, 2011


    Your posts are very helpful, thx.

    By the way, the like at the end, to prado tutorial page (http://planet.pradosoft.com/demos/quickstart/?page=Tutorial.CurrencyConverter), use to work.

    I found this tutorial on this PDF : http://www.pradosoft.com/docs/quickstart.pdf. After your posts, we can follow this from § 3.4.

    Best regards.

    PS: sorry for my bad english...

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.