Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Given that I already stated a wide range of skills beyond PHP (and I use more languages than I even listed there) I hardly think my closed minded attitude is the problem.

There are a lot of complaints about PHP from people who've never even used it. They have bullet-point list of features lacking or strangeness and think they can make an informed comment. But I have built several large scale projects in PHP and at the time I started them most everyone's pet language here was too immature in the web space to consider. Look at Ruby, the tools of choice for deploying it and serving it up are constantly changing. I don't have time for that fire and motion. Maybe for the next project I will choose something else. But I think developers here would rather fawn over the pet language of the week than hear from someone using PHP effectively.



Let me say that I have used PHP extensively, and found it to be incredibly painful. It basically allows the expressiveness of C with classes. It is possible to write working applications like this, but that's about all I can say. Given the choice, I would pick absolutely any other language. Even a tiny bit more expressiveness makes me happier and more productive.

The only reason I can see for picking PHP for one's own internal applications is ignorance. Any language is better.


When I started my last big project it was several years ago and PHP5 had just been released. I had been doing PHP for many years before that (since PHP3 -- moved from Perl to ASP to PHP). At the same time I've been doing desktop and mobile development in C++, VB, and C#. I also keep up with Python and other tools to see how things are progressing.

So I needed to start up a new project those years ago and it really wasn't the best time to learn another language. Ruby and Python were still a bit lame in the web space at that time. I'm not even sure Rails was out at the time; and if it was it was really new. I definitely didn't need to start a massive project on something that was very much untested. Performance and stability are also factors.

You are entitled to your opinion, but I don't find PHP to be all that painful. I've built up a large body of code and, more specifically, a coding style that makes PHP as productive to me as most other languages. For example, all my objects inherit from a root Object class that provides automatic properties: declare a method as setFoo and you use $object->foo = 'hello' to call it. My framework library is very modular and uses the autoload facility. I have a template library that is like smarty only less weird (and much less code). I have a few different database abstractions for different needs. Entity objects that can be loaded and saved. Classes for quick inline queries (similar to what you've used in other examples). An an abstraction for larger more complex SQL queries. In addition to basic templating for the UI, I also have something akin to ASP.NET user controls so I can built up complex forms just by adding tags to the template. The UI is connected end-to-end with the database so load, save, and validation is automatically generated (including client-side javascript) from a description of the data. I can push about a CRUD page in minutes.

So really, I have lots of reasons besides ignorance to stick with PHP at this point. Now, if I had to start the project again now, I'd have re-evaluate all my options but it would have to weighted against the body of code and knowledge I already have. I won't claim that PHP is better than any other language -- but it's really not as bad as you make it out to be. Just look at all the things that are possible in it!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: