An Oracle blog about NetBeans for PHP

  • News
    August 7, 2008

Building AIR Applications with the NetBeans PHP IDE

A user of the NetBeans PHP IDE published a tutorial on how to setup a project for developing rich AJAX/HTML Desktop Applications using NetBeans and Adobe AIR SDK.

Join the discussion

Comments ( 7 )
  • Kiran Friday, August 8, 2008

    Thanx a lot.

    Please write a tutorial on using netbeans-php for developing projects based on cakephp or zend framework. It will be of immense help.

    Is it possible for NB to offer code completion for cakephp in built classes and functions?

  • Azrael Valedhel Friday, August 8, 2008

    I've got another question, if I compile my own php module written in C - can I somehow use header file to get code completion for my custom functions in NetBeans? It would be a great feature...


  • Petr Friday, August 8, 2008

    Hi Kiran,

    I haven't time to look at cake php in deep. I have tried only small tutorials so far. I expect that there will be tutorial how to set up NB in such case soon.

    Regarding code completion for cakephp in built classes and functions. These are defined in PHP files (not in binary libraries) what I saw. So if I'm right and you don't have these files in your sources, then you can add the folder with these files into project Iclude path (Project Properties -> Include Path). Then cc will work.

    Let me know, whether it helps you.



  • Petr Friday, August 8, 2008

    Hi Azrael,

    we don't support code completion from c header files. Can you send me example of such header file?

    The solution it would be to have a php signature file for your module and this signature file you can put on the project or global Include (in the IDE) path as I mentioned in my comment above. You can write this signature file by hand, or generate though a script.

    We have a php script which finds out all php registered modules and generate signature files for these modules. This script is bigger, because it also put PHP doc into signature files.

    I think writing php file, which will translate a header file to the php signature file should be simple. Probably it can be a part of NB as well.

    Let me know, what you think or whether I can help you.



  • Azrael Valedhel Friday, August 8, 2008

    I just thought about adding /\*\* \*/ phpdoc-style blocks that would be parsed to add parameters and other info (since the "prototypes" are not exactly what we see normally).

    This is an example header file for building php module:


    Now, to add some info besides cc of function name:


    ...OR we could parse .C file, and that would be even better:


    We could get the args, the exact types, the return type and if there are optional parameters - we would know it.

    These files are based on basic "hello world" module:


    Given some time I would probably do something like it myself, but I'm kind of out of time lately... And it would be a nice feature I think - for module developers at least, but not only.

  • Petr Friday, August 8, 2008

    So the signature file for the mentioned example should look like:



    \* Funkcja zwracaj&#261;ca opis modu&#322;u

    \* @return true


    function astro_About () {}


    \* astro_Resonance - oblicza rezonans dwoch planet

    \* @param double $x

    \* @param double $orb

    \* @return double 0..1


    function astro_Resonance ($x, $orb) {}


    Is this OK? I have written this by hand. Writing a java file or php file, which will do it, shouldn't be hard.

    How do you generate the PHP documentation for your library?



  • Azrael Valedhel Friday, August 8, 2008

    Yes Petr, it's "@return true" there, I just copied it from my files and that would be the old ver. with returning void (null), and I'm still at the very beginning of making this. I think I changed returning value from null to true while writing that comment ;)

    I generally use phpdoc for php and will use phpdoc for php modules, as it is supported by NB and can be nicely exported.

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