Hacker News new | ask | show | jobs
by jamestnz 4163 days ago
I've developed for the web (ranging from small one-script hacks, up to large commercial applications) for about 15 years. Much of this work has been in PHP, often using the CodeIgniter framework [1]. As far as PHP goes, I do like CI; it provides some semblance of an MVC environment, a predictable URL/parameter routing scheme, view templates, and so on. I have a CI custom controller I inherit from to publish my REST endpoints. Generally CI projects will tend toward a somewhat common/predictable structure, enhancing maintainability and team development.

But over the years I've also inherited some absolutely abhorrent PHP nightmare projects, whose design/coding decisions truly boggle the imagination. Often based on no framework at all, and apparently motivated largely by the developer's desire to use as many PHP and SQL features as possible in the same project.

Latterly I've been using python for some web projects. I played briefly with django, but I've found myself settling on Flask [2], a very nice "microframework" which is super easy to get running with, and which gives a great balance between power and stay-out-of-my-way-ness. It has a simple URL routing system based on function decorators and regex, the ability to factor your apps into reusable components based around your python modules, jinja2 templates, etc. I use sqlalchemy for db access.

Honestly I find it much more of a pleasure to be coding python/flask vs PHP/codeigniter, but due to team and project constraints it isn't always possible to go that way.

[1] https://ellislab.com/codeigniter/

[2] http://flask.pocoo.org/