views:

168

answers:

7

I'm going to teach PHP (plus HTML, plus MySQL) to a complete beginner. What tools do you recommend for Windows in term of editor, web server and general set up?

+1  A: 

Get a prepackaged distribution. There are quite a few of these around. Personally I use XAMPP but others are fine too. This gives you Apache, PHP and MySQL with an easy-to-use installer.

Other than that you don't really need much. Just an editor of some kind (which could be anything from Notepad to a full-blown IDE) and something to connect to MySQL. Possibly phpMyAdmin but I personally prefer a desktop app for this. DBVisualizer is pretty decent. There are others.

As far as editors go, of course don't use Windows Notepad. :) Notepad++ is a better free alternative. As far as IDE goes, I kinda like phped but it's commercial. Netbeans is OK. Eclipse can be used too.

cletus
A: 

XAMPP give you an out-of-the-box installation with PHP, MySQL, Perl and Apache, so you can focus on learning HTML and PHP:

http://www.apachefriends.org/en/xampp.html

Scharrels
+7  A: 

I'd suggest XAMPP, which is PHP, MySQL, Apache and Perl packed together with very easy installation and almost no configuration needed.

For development, I suggest using NetBeans as IDE, it has very nice PHP support.

Darth
A: 

Apache-based local web-server, and a comfortable IDE. You may use whatever IDE you like, but it should:
- highlight PHP
- have embedded FTP client (for working with non-local files)

Andrejs Cainikovs
A: 

I recommend XAMPPLite with PHP 5.3.0 if possible.

Regarding databases, I suggest SQLite - it's a great database engine embedded in a single file that supports standard SQL and IMHO it's easier to set up and maintain, otherwise MySQL with InnoDB.

Editors, I would go with Notepad++ or Intype for TextMate-like bundles.

If you're looking for IDEs, pick either Komodo or Aptana.

Alix Axel
+1  A: 

I'd second the notepad++ requirement. I'd also seriously advise installing xdebug on the webserver as it'll give a full stack trace if something goes wrong. Without this debugging can be really difficult.

I'd also advise developing with notices on (rather than just warnings). It's a bit more work to code but it's caught stupid errors for me countless times and is invaluable.

Wamp server is good, and contains MySQL, which is probably what you want to target if you ever plan on putting anything live on the web as other databases may not be as well supported.

Meep3D
`xdebug` is a great suggestion.
Nate
+1  A: 

Make sure you have a real, step-by-step, debugger, and teach them how to use it. “var_dump debugging” is okay in a pinch, but not a good habit to get into. As suggested above, Xdebug is a good choice, especially when paired with a nice front-end. The Komodo IDE as well as NetBeans work with Xdebug.

Beginners often are concerned about “optimizing” their code to make it faster. You can show them—using profiling—that optimizing for speed is pointless unless (1) it really is slow and (2) what you’re optimizing really is the bottleneck. You can configure Xdebug so that simply adding ?XDEBUG_PROFILE to the end of a URL generates profiling statistics. You can then analyze those statistics with the beautiful and easy-to-use webgrind.

Choosing an editor or IDE is a personal decision. Let them use whatever they are comfortable with. If they’ve never programmed before, teach them about your favorite editor or IDE.

Nate