views:

128

answers:

5

Good morning, all.

I've been doing websites now for about seven years (most of which have been in ASP.NET, but some just HTML) and I'm getting ready to make the move to PHP for my next project. Can anyone suggest some resources and/or tutorials that are more than the usual Hello World kind of thing?

Specifically, any guidelines on code re-use like the ASP.NET equivalent of MasterPages, UserControls, etc.

Thanks in advance, Matt

A: 

This previous SO question may prove helpful: http://stackoverflow.com/questions/1010295/asp-net-developer-looking-to-learn-php

Chris
Thanks. I wasn't able to find this one in the search.
Sonny Boy
+1  A: 

Matt,

Reference:

http://php.net

Environment:

XAMPP

WAMP

Tutorials:

One PHP.net

On w3schools

Web Frameworks:

Symphony

CodeIgniter

CakePHP

Also consider checking out Python and Ruby as alternatives for web development. They are more powerful than PHP since you can utilize them also for desktop apps and maintainance scripts, where is while it is possible to do in PHP, it's highly undesirable.

Ruby

Python

Nick Gorbikoff
+1  A: 

As a 5 year PHP coder that has yearned for the liberation of a "better" platform such as ASP.NET, I bid thee good luck.

By itself, you have nothing like MasterPages, UserControls, page execution cycles, handlers, etc. PHP is much more like ASP classic in that the script starts at the top and ends at the bottom. Everything in the middle can be anything you like, and if you want the kind of structure that ASP.NET offered you, then you'll have to implement it yourself.

As soon as you figure your way around the basics, get over the massive lack of organization of the standard library, accept that the bolt-on OOP is a bit clunky, learn to accept PHP for the monster that it is, and still at this point actually want to use it for something serious, you should look into a pre-made framework such as Zend or Codeigniter (among others) that try to get most of the plumbing out of your way.

Ilia Jerebtsov
+1 for encouraging to use a framework. PHP is a mess. PHP used through a framework is an *organized mess*, which is quite better.
MainMa
A: 

For your "specifically" part, you want to step away from raw PHP and spend some time playing with one of the numerous frameworks that spawned to overcome PHP's lack of RAD features.

http://cakephp.org - http://www.symfony-project.org - http://framework.zend.com

They all have their own slants on templating (all frameworks do) but none (and this extends outside of PHP) follow the same ideas as Microsoft. Server and User controls are fairly unique techniques.

As I said in my comments, they're nowhere near as clean as "proper" web frameworks (django, rails, even webpy etc) but they do work a lot better than just hacking away on your own.

Oli
A: 

As Oli mentions in the comments, PHP by itself is missing a lot of the structure you may be used to. There are a number of PHP frameworks that help solve this problem.

Symfony (http://www.symfony-project.org/) is somewhat similar to Rails / Django if that's what you're used to.

Zend Framework (http://framework.zend.com/) is a much more open form solution, but better for certain projects.

That said, if you're diving into PHP by itself, the manual on http://www.php.net is fantastic. I downloaded it and keep a link to it in my quicklaunch.

Travis