View Full Version : PHP Coding: Do you use a framework?
stugster
21st January 2009, 13:51
I've never ever touched any framework software for my PHP development. I'm a fan of Eclipse for Java, but for PHP, I've always relied on good old notepad++
It's getting to the stage where a lot of the work I do contains the good old repetitiveness of programming; login scripts, input verification, validation, sql server connecting...
What frameworks (if any) do you guys use, or what libraries do you call upon each time?
HC-Martin
21st January 2009, 14:06
I'm like you - don't use a framework but do use a series of 'mini-scripts' that are just saved as PHP files and copied/pasted as when I need them.
Would also be interested to hear about what others use.
NetConneXions
21st January 2009, 14:23
When i do program, i program in ASP and use notepad. However what i do is like the guy above, i make include files to make the work a bit faster.
stugster
21st January 2009, 14:29
Away with you :p This thread isn't for those 'orrible ASP persons! Off with yer heid!
FireFleur
21st January 2009, 14:34
Pear is probably your best bet, frameworks are ok, but really you want a templating system :)
You could use Perl Template Toolkit with PHP, I use TT for nearly all projects be it GUI, Web, Python applications etc. Separating content and code is a good idea.
NetConneXions
21st January 2009, 14:41
Away with you :p This thread isn't for those 'orrible ASP persons! Off with yer heid!
we are a dying breed :(
C.Pearse
21st January 2009, 15:00
I had a bit of a search-around a while ago and decided CodeIgniter (http://www.codeigniter.com/) was for me, even though I haven't used it yet!
silklink
21st January 2009, 15:14
Hi slugster
I use HAPEdit as an editing tool, which enables me to work in a development project. The project may comprise php scripts, include scripts, javascrips, plain html or plain text. HAPEdit is a free resource.
From a framework point of view, I try to carve up my code into re-usable include modules, which may or may not be classes. So if I need logon capabilities, I include my logon class. If I need a ‘contact me’ form, I include several php scripts: one for each step of the process.
If I want MySQL database access, I have a DAO class for that. If I want some other database access, I have a DAO class for that. This enables me to use the same SQL language in my scripts, which is interpreted by the DAO class I am using. For example, the connection to MySQL is different to the flat file database I am currently working with, but only the DAO class changes. Does that make sense?
For a more defined framework, you might look to Smarty. I did some research some time ago on many options and Smarty was a bit complicated and somehow restrictive for my needs. I googled a great deal and saw some great ideas, which was what led me to where I am now. It works for me, but may not for others.
edmondscommerce
21st January 2009, 15:14
I'm a big fan of Zend Framework
I use Geany for coding which is a fast lightweight IDE with some basic features (code completion etc) but not bloated or slow.
ozbon
21st January 2009, 15:36
I've got a framework site that I use, which has got all the basics - even runs a standard DB setup script - and I reckon that saves me a lot of time.
As yet I haven't found a decent use for the full-on frameworks like CakePHP or Symfony, and I guess maybe I'm just not organised in that way, but I can always find some reason for not using it, some use-case that doesn't fit with how the frameworks want them to be.
But a basic set of files (index, css, images, admin, login/logout, etc.) is, I would say, a huge benefit.
The other thing I do is have one file (usually called 1.php or somesuch) that's like a config file, and gets called at the start of every page. It means I don't need to worry about changing things in loads of files every time I set up a site, I just change the settings and defaults in 1.php, and can see a basic working site very quickly.
ozbon
21st January 2009, 15:39
Oh, and for coding it's either Crimson Editor (http://www.crimsoneditor.com) (free), TextPad (http://www.textpad.com/) (free), or PHP Editor (http://www.mpsoftware.dk/phpdesigner.php) (about £60 for the full-on commercial license). Depends on my mood. Sometimes I even use Dreamweaver...
dare
29th January 2009, 09:45
I'm running a small scale Web Development Company. We're mostly using CodeIgniter Framework for our projects.
It's easy to learn and have a good community around.
Cheers
Dare
TotallySport
29th January 2009, 10:39
Not the correct answer but you can build extenstions in dreamweaver that you do most of it for you, you can also build bits into dreamweaver to add scripts quickly, so when you see the php or asp tab you can set additional tabs or change that one and put in your own scripts etc, so if you used the same login script in all sites it could be done in one click.
I don't think notepad has this function and wouldn't suit everyone:D
oMIKEo
29th January 2009, 10:40
I have been recently looking at frameworks such as codeigniter but can't see a real advantage for me to use it for the projects we work on, plus my understanding of oop/mvc isnt great at the moment.
I use coda when on the mac or dreamweaver code view on the pc. I also have a series of scripts i regularly use to speed up coding.
openmind
29th January 2009, 10:52
I just wish someone would write a smarty equivalent for ColdFusion or just give me the time to do it myself :)
You can make use of custom tags and CFCs in ColdFusion to speed up development though...