WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-29-2006, 04:38 AM
WebProWorld Pro
 

Join Date: Sep 2005
Location: Manchester, UK
Posts: 257
mikesmith76 RepRank 0
Default Linux PHP Development Tools

Hi all,

Installed Kubuntu 6.06 a few days ago and very impressed by it, so much so that i'm thinking of doing a good chunk of my projects using it. Need to get the tools sorted out first tho, which is where you guys come in.

My question is what PHP development packages are available for Linux? I know I could use a simple text editor like Kate but i'm after something that's a little more PHP aware, maybe code highlighting and such like. What do all you Linux gurus use?

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 06-29-2006, 02:05 PM
Easywebdev's Avatar
WebProWorld Veteran
 

Join Date: Apr 2004
Location: Donegal, Ireland.
Posts: 322
Easywebdev RepRank 1
Default

You can go for a commercial package such as Zend ide with full profiling and debugging support I have used it and hated it. Komodo is another I have looked at but not been overly impressed, its syntax highlighting colors are a mess and could not be changed in the version I tried.

I would recommend eclipse, it is an open source ide (integrated development environment) that supports many languages via plugins. I use it for php and C, C++ development.

You will need the following
Eclipse
Php eclipse plugin
QuantumDB plugin multiple database support

Some screenshots of my environment
Syntax highlighting
More syntax look on the right for the outline of the document, public variables in green, private in red, functions used etc.
Quantum DB in use

Install eclipse, then phpeclipse plugin, then quantumdb, if you install quantum before phpeclipse theres bugs but they may have been ironed out by now.

For debugging you can integrate dbg but I never use it as I dont write applications large enough for it to be of use. You are better learning to write php test driven design code with something like phpunit

Download and install, I think you will be pleasantly surprised by its power.

Hope that helps.
Reply With Quote
  #3 (permalink)  
Old 06-29-2006, 06:09 PM
WebProWorld Pro
 

Join Date: Sep 2005
Location: Manchester, UK
Posts: 257
mikesmith76 RepRank 0
Default

Easywebdev as always a great answer! That looks just like what I need, will have to give it some serious looking at

Just on a side note i noticed on one of your windows you're using a singleton pattern for all your "system" type objects (db, teplate etc). I'm curious as to why you are using this approach?

Thanks again
Reply With Quote
  #4 (permalink)  
Old 06-29-2006, 07:50 PM
Easywebdev's Avatar
WebProWorld Veteran
 

Join Date: Apr 2004
Location: Donegal, Ireland.
Posts: 322
Easywebdev RepRank 1
Default

I use a singleton for a registry of global objects, arrays and variables. There should only ever be one instance of the registry so its a prime candidate for using a singleton pattern.
Instead of passing global objects like the error handler, template, database connection etc around classes as instantiation parameters or worse yet using "global $object" etc I just pull what I need from the registry if and when I need it.

Anywhere in any class I need to use the database connection I just use $db = Registry::instance()->fetch_object('Database');

The only singleton is the registry, I can have multiple db connections using the db class and place them in the registry and call forth whichever one I need. The db stuff, error handler, template etc are all standard classes, the error handler and template could be singletons but theres no need for a pattern on those as I only instantiate them when placing them in the registry.

You could still use "global $db" but I like to keep all global stuff in the registry as I know what's in it and what I can call from it. I pass code on to others to work on and I dont need to go wading through their stuff to make sure they have not unset or overwritten something and are not peppering the code with globals that I have to go look up where they were instantiated.
Reply With Quote
  #5 (permalink)  
Old 06-30-2006, 04:42 AM
WebProWorld Pro
 

Join Date: Sep 2005
Location: Manchester, UK
Posts: 257
mikesmith76 RepRank 0
Default

Thanks for the quick response, that helped to clear up a few points. Still working on a few PHP5 classes for DB and session handling so may have to look at making a registry type class of my own.

As for eclipse, installed it last night and must say i am impressed so far. Will have to work through a few projects with it and see how it holds up.

Once again thanks for your help
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0