Marc-André Lanciault entrepreneur numérique illuxi amplio
Rechercher

Very interesting : 7 reasons I switched back to PHP after 2 years on Rails

Partagez ce billet

Very interesting article by Derek Sivers : 7 reasons I switched back to PHP after 2 years on Rails.

Interesting… The guy invested 2 years to redevelop his PHP site in Rails, and after these 2 years, he decided to rewrite everything in PHP again.

Citation:

I didn’t abandon the rewrite IDEA, though. I just asked myself one important question:

“Is there anything Rails can do, that PHP CAN’T do?”

The answer is no.

I threw away 2 years of Rails code, and opened a new empty Subversion repository.

He took the best ideas of Rails, and applied it to PHP !

Citation:

It’s the most beautiful PHP I’ve ever written, all wonderfully MVC and DRY, and and I owe it all to Rails.

Inspired by Rails:

*- all logic is coming from the models, one per database table, like Martin Fowler’s Active Record pattern.

*- no requires or includes needed, thanks to [url;=http://www.php.net/autoload]__autoload[/url].

*- real MVC separation: controllers have no HTML or business-logic, and only use REST-approved HTTP. (GET is only get. Any destructive actions require POST.)

*- all HTML coming from a cute and powerful templating system I whipped up in 80 lines, all multi-lingual and caching and everything

*- … and much more. In only 12,000 lines of code, including HTML templates. (Down from 90,000, before.)

Again, interesting because this very similar to what we are doing with our SmartObject Framework

Commentaires

Laisser un commentaire

D'autres billets qui pourraient vous intéresser

Une formation gratuite pour souligner la Journée internationale des droits des femmes

He he! Je suis vraiment fier de notre gang chez illuxi qui a eu l’idée de souligner de façon exceptionnelle ...

La fa(r)ce de l’entrepreneurship

Je crois que ça fait 4-5 ans que je ne lis que très rarement sur l’entrepreneurship. Dans ma trentaine, je ...

Ça n’aura pris que 20 ans

Mine de rien, ça fait 20 ans que j’ai le « plaisir » d’être entrepreneur. « Plaisir » entre guillemets, car, un jour sur ...

600 000 $ pour utiliser l’intelligence artificielle dans notre LMS illuxiLearn

Ça faisait 2 ans qu’on travaillait sur ce projet. L’objectif était clair: utiliser l’intelligence artificielle afin de permettre à nos utilisateurs ...

La simplicité

Durant une ride de vélo récemment, j’écoutais Simple Man, de Lynyrd Skynyrd. Peut-être que c’est la quarantaine, peut-être que c’est ...
illuxi Team

2 ans après

Une collègue de travail nous partageait une publication de Marco Bérubé aujourd’hui. Et ça m’a rappelé qu’il y a 2 ...