3 ms·
There is a trade-off to using a Framework. For me, it depends on the complexity of the problem, and the difficulty of learning the framework. Suppose someone
by geebee 18y ago
There is a trade-off to using a Framework. For me, it depends on the complexity of the problem, and the difficulty of learning the framework.
Suppose someone is familiar with Java Servlets and JSP, basic JDBC and SQL, and the tomcat container (with connection pooling). If I have a simple database driven application, I can choose to hand code some of my application logic, or use a framework.
So I'm choosing between, say:
No framework: container managed security, hand coding my ORM layer, writing my own server side form validation, writing my own MVC (or just not bothering, if it is just a few pages).
Framework: Spring Security, Struts for form building and validation, Spring for the MVC tier, JPA and Hibernate for ORM.
These are slightly extreme - you don't have to use all those tools, of course.
But let's say we do get something out of the framework. The code really is easier to maintain and understand, provided someone has read a 300 page book on spring, another 300 page book on hibernate, and a 150 subsection of a book on Struts, along with doing all the exercises.
Even if the framework based code is better, that's not enough to justify the complexity. I need to justify taking an application out of the realm of someone who understands the basic servlet spec and putting it into the realm of only those who have read and digested an additional 600+ pages of Framework complexity.
Thing is, I like frameworks. You can read and digest 100 pages about Rails and really get going. So the bar for justifying the "added complexity" of a framework in the Ruby world is much lower than it is in the Java world. I don't use Python, but I'd imagine it's a similar situation - it's much easier to justify Django than the Java framework stack.