Looks like my claim of writing fast and furious didn’t come to pass, oh well. For the last few weeks I’ve been working on a hush hush project for work. It’s not done yet but we are nearing the end of the road for the MVP to be released soon. I wanted to write a quick update to discuss what it’s been like getting back on my developer feet after burning out.
First off I’m engaged in my work again. For months I had felt disconnected, on autopilot, just trying to get through the day and hit some milestones. Secondly, I enjoyed playing cowboy for a while but have cone to realize that not all the habits I picked up in Corporate America were bad. Thirdly, I’m back to getting serious amounts of work done and am solving interesting problems.
Enough touchy feely hippie bullshit, let’s get down to some business. I’ve been building a largish scale php application for the last couple of weeks and I wanted to reflect on the process.
I started off looking at various php frameworks a few weeks before starting this new project. I had kept an ear to the ground in the php framework area since forever so I knew the big players. I had also dabbled in some ruby on rails so I knew the bliss of when a framework gets it right, and the frustration of running up against something you would have done differently.
I looked into several frameworks CakePHP, Symfony, Zend Framework, Fat Free PHP, Yii, Noloh, and Recess! to name a few. They were all quite interesting but they all felt oddly foreign. Imagine if ruby on rails came out and it was a port of .Net web forms for ruby, blech. All the frameworks I looked at felt like they were trying to pave over PHP and make it into ruby lite or .Net lite. Each one was well put together on the whole and with some effort I’m sure I could have become proficient in any of them. Then I remembered an old friend I had played with before, Will Bond’s unframework Flourish.
If you haven’t taken a look before I urge you to do so now. Flourish is exactly what PHP needs, a strong core of classes geared toward common web tasks, with an eye towards simplicity, security, and consistency. After having used Flourish for a few weeks I can do nothing but sing its praises. Let me say that working with the combination of Flourish + PHP is a completely different experience than just writing PHP. Flourish gives you a sane construct around which you can build high quality applications. Here’s a list of things Flourish provides:
- Cross Database support for DB2, MSSQL, MySQL, Oracle, PostgreSQL, and SQLite
- An extremely good ActiveRecord implementation
- Filesystem with psuedo-transactions
- Safe consistent handling of Requests
- Session handling with special resources for Authentication
- Classes for creating HTML including a quality Templating mechanism
- Great Utility classes (think ActiveRecord rails people)
- Amazing Email support
- Classes for handling Dates, Numbers, and Money
- High quality Exceptions and Handling Facilities
The thing that you will notice with Flourish is that it’s a library that’s seen real world use. It provides a high quality core but understands that it shouldn’t try to be everything to everyone. The components interoperate nicely but you also function in isolation quite capably. It truly hits all the high points you would want from a library, but there is even more.
DOCUMENTATION: The Flourish documentation is some of the best I’ve ever seen. There is full PHPDoc for every class, which is nice, but more importantly there is “Class Documentation” that explains how the class is intended to be used, with code examples to get you started. The documentation is written very well and is incredibly in-depth. You could sit down and read it like a book, it’s that good.
COMMUNITY: The Flourish discussion boards are active and I have never seen a posting go unanswered. Will Bond himself usually answers within a few hours of your posting, I know he has more than once helped me fix some tricky bug or better explained how something worked to me. The ability to reach out and communicate with the author is amazing, it also makes you want to provide support for the project.
CONSISTENCY: The Flourish API is amazingly consistent. I keep finding myself saying, “That’s how I would have written it” while using it. If you learn how fCookie works, you know how fSession works, and you even know how fRequest works. Flourish simplifies things to the point that it’s worth it to go the extra mile to add a bit of security to your code, because it makes it dead simple. Then you look back and realize that it also has helped you write self-documenting code, and jesus, did it just fucking cut my lawn too, what the hell?
SECURITY: As I alluded to earlier, Flourish encourages writing secure code. Flourish takes security seriously enough to have an entire compendium on just that topic and how it relates to PHP. My code is definitely more secure now that I use Flourish, from better security in parsing Request variables, to easily preventing Cross Site Request Forgeries, Flourish has you covered.
Ok, so I didn’t really expect this to turn into a huge love fest about how much I love Flourish but that’s where we are at. I want to over the course of a few blog posts really explore Flourish. I haven’t fully figured out what format these are going to take, but if you are a PHP developer who wants to take their code to the next level, stay tuned.