What's new in php/mysql in the past 4 years?
November 11, 2010 10:15 AM

What's new in php/mySQL since four years ago?

I did my last programming job four years ago and moved on to other things. But now I have a can't-say-no opportunity to update a large project that I worked on way back when. Since this is going to be a from-the-ground-up rebuild, I'm curious to know what I've missed in those four years. Obviously I can look at the docs and see what, technically, has changed, so what I'm really asking is what have been the real game-changing advancements? What's got developers most excited? And what new software/online resources exist to facilitate programming? Or is php/mysql on its way out and I should rewrite in some other language?
posted by vraxoin to Computers & Internet (8 answers total) 13 users marked this as a favorite
There are some solid MVC frameworks out there.
posted by yerfatma at 10:42 AM on November 11, 2010


What yerfatma said. Plus Kohana. And Wordpress is now a viable CMS, thanks to custom post types and custom taxonomies.
posted by tsmo at 11:00 AM on November 11, 2010


nímwunnan: "Closures"

Those aren't closures, but are stlll a good thing.

posted by mkb at 11:03 AM on November 11, 2010


Four years ago, not using objects may have been an almost sorta viable option in php, especially if you were developing on a php4 platform. Today, though, any project beyond a one-off single-page pretty much has to be object oriented.

Mostly, though, the newer stuff is client-side. Check out HTML5 and find a javascript framework you like.
posted by Dano St at 11:22 AM on November 11, 2010


I would say the big differences server-side are the mature MVC frameworks (including Symfony, CodeIgniter, Kohana, CakePHP), the really powerful PHP-based CMSs/CMFs (especially MODx, Drupal), the establishment of an ORM layer (check out Doctrine), the new templating systems with inheritance (e.g. Twig), and the proliferaton of popular alternatives/complements to MySQL for data storage (e.g. PostgreSQL for relational, MongoDB for document storage, Reddis for data structures). Client-side the big difference is that mature, feature-rich JavaScript libraries such as jQuery and Sencha have made it much easier to move more of the app logic to the browser.

Python&Django/Pyramid, Scala&Lift/Play, Ruby&Rails, Groovy&Grails etc etc get a lot of buzz nowadays - and are definitely worth checking out if you're keen to learn something new - but there's never been a better time to be hacking PHP than now.
posted by runkelfinker at 1:58 PM on November 11, 2010


All the cool kids are hovering around Ruby on Rails and Python and Django. For you, if you know one language or the other I'd use that. If you know you're writing a webapp but don't know python or ruby I'd lean towards RoR over Python Django - I think Rails is the stronger framework (conversely I like Python better as a language). This is however my own opinion and will likely be contested.

Lots of cool frameworks out there now. I used to hate frameworks by other folks, they always felt wrong but some of the new ones feel right off the bat. Check a few out. For what you're doing the new language features likely won't help you as much as some of the new or evolved frameworks.
posted by bitdamaged at 2:08 PM on November 11, 2010


It all depends on your requirements and time-line. Learning a whole fancy new framework, new ORM and Javascript UI system can use up a ton of time even if it's fun.

PHP is kinda like the Ford Fiesta of web systems. It's not sexy or high-tech but it will get you from point A to B quite effectively. It's also the easiest to deploy on any hosting provider and cheap to maintain. You might find it's ok to go back to PHP and just pull in one or two cool new components where you can see a big improvement.

Personally, I like coding in Python, with CherryPy, using Cheetah templates and Elixir for ORM and I find jQuery is really nice on the client side. But I'm kind of a wierdo.
posted by mr.ersatz at 3:36 PM on November 11, 2010


It's been said above, but I'll say it again for emphasis: Doctrine.

It's a whole new way of thinking about data that means that you don't have to think about sql, unless you really want to, and your data is the way it should be: an object you can manipulate. All those other, sexy languages people are talking about these days? the ORM idea is alot of what makes them awesome.
posted by Freen at 3:41 PM on November 11, 2010


« Older London's little known Japanese gems   |   In search of the 10-minute psychic recharge Newer »
This thread is closed to new comments.