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

Any examples of awesome open source php examples? (real question, not a snide remark)


Drupal. Recently rumored to platform 1% of all websites. The codebase is clean (even cleaner in Drupal 7), and naysayers be damned the hook system baked in makes modular coding a breeze. Of course, code quality varies once you start looking at community contributed modules, but that's to be expected.

Downvote? Really? Pfft.


Drupal's core architecture is extremely dated. You might like the hook system, but it is in no way a replacement for dependency injection a la Symfony2.


Dated? By who's standards? Yours? The UN, NATO, Amnesty International and Sony all disagree with your assessment.


Yes, by mine. I've spent quite a lot of time elbow-deep in Drupal. It is better code than Wordpress--though that is damning with faint praise--but does not really reach the bar of a Lithium or a Symfony2.

Now, it's certainly more normal-friendly than Symfony2 or the like by way of allowing non-developers to implement (a subset of) features, but I wouldn't call it programmer-friendly and I wouldn't use its internals as an example of good code.


Twitter's new developer site, too.


I love Drupal, but turning on devel.module and seeing 300+ queries on many pages was a bit of a fright.


Urm, no. There's lots to like about Drupal, but clean code isn't one of theme. I mean, it's not PHPNuke, but clear and logical it ain't. I'm saying that as lead dev on a drupal site that pushes pretty heavy traffic and has thousands of man hours in it.


Code quality of the Kohana Framework is top notch, imo.


^this. I actually grow as a programmer when I read through the Kohana source


I really like the Yii framework - very clean if you ask me


Another developer introduced me to Yii when he got me on board for a PHP contract he needed help with. I was hesitant to take PHP work at first, because my previous experiences were harrowing at best. However, I found the framework was almost pleasant. It had a lot of the features I had grown used to in frameworks like Rails, and though I still have to wrestle with some frustrations of PHP, it is a minor annoyance as I go about writing good OOP MVC code.

I would personally pick another language if I were doing something from scratch, but the benefit is that it is a language others are already familiar with and so adding a framework like Yii isn't too hard.


Kohana is pretty nice IMHO


If only they could get the docs back up to par! Things were sort of OK for 2.x, even if you needed some background in CodeIgniter to really understand everything, but half of the wiki for 3.x is empty pages with TODO's.

I still recommend that people new to Kohana start with 2.x because a framework is worth a lot less without quality documentation, when you have to go read the code all the time. Not that you shouldn't do that eventually, there's a lot of good code in there to learn from!


Kohana is wonderful because it's simple: I never had any problem reading the code if I wanted to know what something did.


That's good but it also makes it annoying to work with it. I prefer having good docs which takes me 30 seconds to scan and find what I am looking for than having the better code in the world so I go with CodeIgniter instead (the new version is pretty good).


Because of the lack of documentation (v3), i begin to read source code to understand... At the and i found myself while writing my own framework :)

Really, Kohana needs more documentation....


Flow3




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

Search: