logo sudovi.com
- X /home/ryan/PHP and Respect -- Apr 19, 2008 8:00am

In my development career thus far, Java (and more recently Grails) is what pays my bills. Thats the work I do from 8 to 5. Within those the circles, (not just the people I work with, but conferences, meeting groups, etc) there seems to be a very real, very biased lack of respect for PHP developers and PHP as whole.

On one hand, I can understand the disrespect for PHP "the language" in that the majority of the people I know that have experienced PHP and left were those that have seen some pretty nasty script. Hell, I've written some nasty scripts in my time as well. As "old timer" PHP folks, we ALL have I'm sure.

Times however, have changed thought attitudes haven't. PHP 5 is heads and tails better than its predecessors and PHP 6 will be yet another step up. That being said, there's nothing bad/wrong or "un-cultured" about using PHP but yet many of my fellow Java brethren shudder at the mention. (Don't even get me started on my Ruby or Python friends...*ugh*).

I will say this, I've been using PHP in my "after hours" gigs for quite some time and now in the past two years (roughly), I've been using a framework called Code Igniter that completely greases PHP wheels and overall has improved my design process, my problem solving, and has taught me so much. When I couple that with the igntion code generation script, I get out of the Box CRUD operations, etc. Matter of fact, sudovi.com is written in Code Igniter, using the Ignition code generator and is basically a CMS that I'm calling "Combustion." (I don't expect anyone else to use it but me, but it is what it is). The point being PHP is more than adequate and a more-than-viable solution for application needs.

As far as communities go, sure PHP has some "less-than-stellar" programmers, but most of these are folks with no real development background and have found PHP easy to learn, easy to use, and readily available and have therefore picked up a book and started programming. (There's something to be said for that! -- Note to self: Do I want these people writing code for me, probably not, but perhaps their drive to get something done is impressive?!?) These communities are helpful and rarely off-putting. But try going to a Ruby or Python forum...man, those cats can hiss!

Finally, as stated previously, I can somewhat understand the disrespect for the language due to some mis-information, but what I don't like is the feeling I get when I tell someone else that I am a PHP programmer or when I suggest PHP as a solution. Its almost as if you can feel it in the air...this sort of "staring down the nose at you" feeling. Like you just said something in another language entirely and you get that "Are you friggin' SERIOUS?!?" look.

I'm here to say, yes we're serious, MANY of us have actual development background and we DO know our stuff. Occassionally some of us get pissed (not me) when Google App Engine says that they only support Python. (That's been driving alot of the PHP folks crazy, but it shouldn't. Google states that Python is just the first of many supported languages, and truly, there are some kick-ass things in Python. Its a _great_ language.) It can't hurt to learn a new language, so what are you waiting for, PHP is everywhere, learn it and go do some moonlighting. Don't get hung up on its history, thats in the past and PHP apps look nothing like they used to. Open your mind a bit and give it a run. For the Java folks, I think you'll find a satisfying lack of layers to configure. Many of you know how I feel about layers...onions have layers, and as Donkey says: "Not everybody like onions!"


~
:wq!


- X /home/Phil -- 2008-04-15 05:45:35
Ruby/Rails founder DHH agrees with you. cut pasted from his blog [mylink]http://www.loudthinking.com[/mylink]:

"I've been writing a little bit of PHP again today. That platform has really received an unfair reputation. For the small things I've been used it for lately, it's absolutely perfect.

I love the fact that it's all just self-contained. That the language includes so many helpful functions in the box. And that it managed to get distributed with just about every instance of Apache out there.

For the small chores, being quick and effective matters far more than long-term maintenance concerns. Or how pretty the code is. PHP scales down like no other package for the web and it deserves more credit for tackling that scope."
----------

I will look at CodeIgniter. Symfony was overwhelming. CakePHP was underwhelming.
~
:wq!


- X /home/ncloud -- 2008-04-15 08:34:44
I use symfony now for a lot of my projects and really like it. It is a little overwhelming at first -- especially the configuration files -- but it's a solid MVC approach to web applications that has a lot of helpful functionality. I've been developing with PHP for several years now, and even got my Zend cert. The language has matured immensely since I started using it.

I actually started learning design patterns with PHP and found it was a tad easier because I could focus on the substance of the pattern without having to understand a complicated type system. When I moved to C#, I was able to take the core of what I had learned and augment it with C#'s strong typing. Many of the .NET developers I worked with who scoffed at PHP ended up knowing less about software patterns and design than I did.

Any language can be a springboard for learning. Just pursue best practices and don't be satisfied with just hacking up crap to get it to "work". Understand what you're doing and *why* it works -- that's the key to success.
~
:wq!


- X /home/ryan -- 2008-04-15 09:43:31
@Phil: If you found CakePHP underwhelming, you might like Code Igniter even less. CI is very useful and more or less guides you towards MVC but really gets out of your way. To me thats the way a framework should be: smooth out the rough edges of the code, give you some help with the database, and let you get moving with your code.
~
:wq!


- X /home/alexica -- 2008-04-15 10:14:26
I was using CodeIgniter at ryan's suggestion and found it very liberating to use. It improved my code an order of magnitude (or two.) I've recently switched to KohanaPHP which is a fork of CodeIgniter.

Basically, some folks at EllisLabs (makers of CI) liked the framework, but wanted it to be more community-driven. So they split and created Kohana.

I prefer Kohana because I support community-driven software, but Kohana has a few syntactical advantages over CI. First, it adopts PHP5, giving it an improved object model and syntax. It also does away with the loader object in favor of more 'ordinary' object instantiaion.

CodeIgniter: $red_hat $this->load->model('hat');
KohanaPHP: $red_hat = new Hat_Model();

btw, love the new site.
~
:wq!


- X /home/Michael -- 2008-04-15 10:28:56
I couldn't have said it better myself. I'm just like you. A full time Java programmer from 9-5 and doing PHP stuff after hours. I find it revujenating working on PHP related stuff. Be it customizing CMSes like Drupal/Joomla or working with some other projects. CI and Cake really does help alot. Will be looking at CI to implement an application. Hope it'll be better than Cake :P
~
:wq!


- X /home/ryan -- 2008-04-15 11:08:13
@Michael: I was using CakePHP when I first starting looking at frameworks for PHP. I even had a good portion of an application written in it. My familiarity with Rails I think helped, but when a colleague pointed me towards CI, I was hooked. I'm pretty confident that you'll like it better. There's no code-gen out of the box, but I've written one and there are several others out there as well that are much more thorough than mine. Good luck!
~
:wq!


- X /home/Harel -- 2008-04-15 11:15:54
The future must be a great place to visit. How did the world developed in April 19th 2008? I'm writing this from April 15th 2008, about 4 days back in the past.
~
:wq!


- X /home/ryan -- 2008-04-15 11:49:38
@Harel: *Erhm* we'll call that a feature ;) That was a fat finger on my part when migrating that post over. (I had originally been messing with it in my dev environment and I don't have the automatic date stuff in there so I manually typed it. Good catch!
~
:wq!


- X /home/Michael -- 2008-04-16 05:09:19
@Ryan: Thanks dude. Hopefully CI is friendlier when dealing with authentication and authorization :)
~
:wq!


- X /home/ryan -- 2008-04-16 09:50:17
@Michael: Thats just it, it lets you do you own thing where that it concerned. There's nothing built-in etc, but I've done numerous apps with Code Igniter where I've rolled my own security layer in with no real issues. Also, the CI community has a number of plugins/libraries that have been created to ease the pain of rolling security into your app. Check out the forums at: http://www.codeigniter.com and search for security or authorization. There's one in particular that gets ALOT of mention: FreakAuth...I haven't used it, but it seems alot of people have.
~
:wq!


- X /home/ironalda0779 -- 2009-01-08 09:08:02
Thanks for all you ideas! I sure will be back to visit your site again so i can learn more.
~
:wq!


- X /home/nataly -- 2009-06-22 20:15:43
PEUm4D ghUnxCczpf72ndOqi20g
~
:wq!


- X /home/margaret -- 2009-06-22 20:46:27
YPnsDC ega7Kl0dnDduqp6s2bnp1o
~
:wq!


- X Add Comments
All Fields Req'd (I won't display your email)
Do not use "http" or "href" in your comment.
You will be blocked.

Bold: [b]your bold text[/b]
Italics: [i]your italic text[/i]
Underline: [u]your underlined text[/u]
Link: [mylink]http://wherever[/mylink]

Copyright 2008 -- all rights reserved