CodeIgniter auto complete with Netbeans

September 1st, 2009

I had been longing for code completion for CodeIgniter with NetBeans for a long time. Finally got a very simple solution which I tested with NetBeans 6.7. It works for

  • All CodeIgniter system libraries
  • Own model functions
  • Own library functions
  • Helper functions

Basic Autocomplete :
To get autocomplete feature for basic CodeIgniter(1.7) functions ONLY just download this file(ci_autocomplete.php) and copy it in your netbeans project directory nbproject.

Basic CI autocomplete

Basic CI autocomplete

Advanced autocomplete:
For more advanced autocomplete feature like getting the list of model functions, your own library functions, you need to add

@property Your_Model $model_object_name

in the file ci_autocomplete.php( that you copied in nbproject). For example :

* @property Buyer_Model $buyer_model

Then in any controller if you write $this -> buyer_model -> …. the functions list will automatically popup.

Advanced autocomplete

Advanced autocomplete

Finally, to make every thing simple I just have written a simple script(autocomplete_script.php), can download from here, that will automatically traverse all the system libraries, your application libraries and models directory and list all class names. What you need is to

  • Run the script
  • Copy whole output
  • Paste it in a file and keep it in nbproject



Limitations:

  • If you extend a library like MY_DB_mysql_driver it does not work
  • You have to run my script(autocomplete_script.php autocomplete function) from a codeigniter controller
  • In my script(autocomplete_script.php) I assumed that model file name and class name same and all has _model as suffix(user_model, buyer_model) etc

Edit:
To make everything available for Models just need to add some properties after the Controller class in same fashion. I have updated my ci_autocomplete.php file accordingly. To see how all things work together you can see my autocomplete_all.php in the zip file.

For Helpers autocomplete:
You should automatically get the hint for helper functions available in your project. If you don’t get the hint then try tools -> options -> php -> Global Include Path -> add Folder -> your_system_folder.
Thats all !

Happy Coding with NetBeans and CodeIgniter :)

HTML email with PHPmailer

March 31st, 2009

Here is a worth reading article on HTML email writing. http://www.sitepoint.com/article/code-html-email-newsletters/

Firefox Tips

March 28th, 2009

Here I found some good tips to speed up Firefox.

Web page Load Improvement

March 23rd, 2009

Here are some links that contain really very helpful tips for the improvement of the web page loading time.

And here is a video regarding web performance

jQuery Video

March 21st, 2009

jQuery Internals and Cool Stuffs

Firebug Tutorial

March 21st, 2009

I have been longing for a good firebug tutorial. Here I found some good tutorials that may help to understand basic functionality of firebug. Here is blog tutorial and video tutorial

Javascript Video

March 21st, 2009

Here are some collections of Javascript video presented by Douglas Crockford, creator of JSLint, JSMin, JSON. I was willing to get them in sigle place. So I have just compiled them in this sigle place.

The JavaScript Programming Language: Part-1

The JavaScript Programming Language: Part-2

The JavaScript Programming Language: Part-3

The JavaScript Programming Language: Part-4

Advanced JavaScript: Part-1

Advanced JavaScript: Part-2

Advanced JavaScript: Part-3

Javascript: Good Parts

Theory of the DOM: Part-1

Theory of the DOM: Part-2

Theory of the DOM: Part-2

Code Convention

March 17th, 2009

I always like to follow a good coding convention. Just searching around which one seems good coding convention. Here is the list of coding convention that I found for different language.

Javascript : http://javascript.crockford.com/code.html

PHP : ?? need to find out a good one

Welcome to my weblog

February 20th, 2009

Hi,

I have just started my site today. I am not a good blogger. Cannot give much time for blogging. But I have planned to publish at least some blog entries in my site. I am much happy to start with my new site.