Hacker News new | ask | show | jobs
by InclinedPlane 4564 days ago
Seriously. Using even a relatively crummy PHP framework like CodeIgniter feels like heaven compared to the burdensomeness and complexity of spring/hibernate. Need a new controller, a few new models, and a couple new views? You can get that done in a snap in any reasonable MVC framework but with spring you'll be pulling teeth and it'll feel like a good day's work if you can get the skeleton working.
2 comments

It really depends on the size of the project. Having used CodeIgniter for a few projects, and Spring extensively for 2-3 years, there were projects where I really appreciated CodeIgniter - basically self-contained CRUD apps with a bit of originality layered on top - but other times where the CI approach would have led to a lot of pain, as in multi-layered applications that relied on legacy integrations.

I don't think it's unreasonable to prefer the simpler projects that the smaller frameworks are a good fit for, of course! Sometimes though the project is big enough that something like Spring is going to save you time and headaches in the medium and long run.

Are you using an especially old version of Spring? I work with Spring MVC on a pretty regular basis and I've never had that much trouble with defining a new controller/model/view.

Controller: Add an @Controller annotation and some @RequestMappings and you're done.

Model: Usually these have no Spring dependency at all, though there are annotations you could put on some of the fields for various tasks if you'd like.

View: Also mostly unrelated to Spring. Write a Thymeleaf template or JSP and return the name of it from the appropriate controller method.