ASP programmer thinking about learning PHP
What's the best way to go about learning PHP when I've been doing A开发者_C百科SP/ASP.NET? I'm not sure it's worth the time, but there seem to be so many projects doing it..
What do you think? Anyone crossed the worlds? How did you do it?
I suspect it can't hurt to learn it, if only because of the increasing popularity of solutions such as WordPress, etc. in the commercial space.
That said, PHP's online manual is pretty reasonable, so I'd have thought you'd be fine with that and your existing knowledge of the common web site paradigms. You could also grab some source code (something like the aformentioned WordPress or the Zend Framework if you're feeling adventureous) and see how they're structured.
Beyond that, the best way to learn is of course to get stuck in. :-)
If you are familiar with how classic ASP works, PHP will be instantly familiar (including many of the pain points), apart from syntax.
As an ASP.NET programmer, I find PHP difficult to work with. The tooling isn't as good as VS, you can easily end up with code soup (mixing markup with server side code) etc... etc... etc...
The best way to go about learning PHP? Pick it up and play with it. Follows some tutorials; maybe pick up a simple project you've done in the past and re-implement it in PHP; start a new project in PHP and see how it goes.
Don't worry about the fact that you're used to ASP. Just forget all the language-specific stuff and remember that you already know how to write good code. Those skills are (largely) language-independent.
There will be some things that are easier to do in PHP and some things that are harder. Don't be discouraged by the harder bits.
It is certainly worth the time to learn. It will broaden your knowledge and make you a better developer. And it never hurts to know a tool or two that work cross-platform.
精彩评论