3 ms·
Sure. First I like Java the language. I dislike Java the enterprise platform. I don't like XML as another programming language, I don't like having to fire up a
by rlawson 15y ago
Sure. First I like Java the language. I dislike Java the enterprise platform. I don't like XML as another programming language, I don't like having to fire up a giant container to test a piece of code (looking at you weblogic). Now things are probably moving in the right direction - I did try EJB3/JPA and it was ok. But I'd hate to be a new programmer coming to Java and being confronted with Spring, EJB, Hibernate, JSF and an app server just to shove some data in and out of a database.
- geebee 15y agoI agree that things have moved in a better direction lately. I recently wrote an app using Struts 2, Spring, and JPA (backed with hibernate), and I made heavy use of annotations that did greatly reduce the amount of XML. I'd agree with you, though, that this would be a nearly impossible (and probably pointless) task for a newcomer (including experienced developers who haven't done much Java). I almost have to wonder who even uses these things anymore... they're too complicated for programming newbies, and I have trouble believing that an experienced programmer from Rails or Django would be willing to put up with it. Are the only people who use this stack existing Java developers who learned java back when it was manageable? I can see someone slowly backing into these frameworks incrementally (like you and I did), but if you're new to Java, it's got to be a thousand pages of reading. I'm prepared to believe that a smart, studious person still wouldn't be there in six months. What do you think about my other suggestion - dropping back to a lower level of code for java applications? I don't think the servlet/jsp approach is anywhere near as hard to learn, and I think it can be effective. As for not reinventing the wheel... well, I'm all for bringing in components incrementally as you need them - MVC, web service APIs, DI containers. What do you think - could Java be more popular if the "java community" embraced the lower level approach, starting with Servlets/JDBC, and leaned toward gradual integration of technologies as needed? (I know, it's hard to speak of a "community", it's really just a collection of individuals, but it seems like the overwhelming thrust of the Java world has been starting within frameworks that add tremendous overhead at the start and actually sometimes become a hinderance as the app grows).
- rlawson 15y agoyeah you are right, I learned servlets / jsps from Marty Hall's book and then just progressed from there. For smaller projects I usually start with Tomcat + Stripes + iBatis Sql Maps in order to minimize the learning curve. But no self respecting corporation would consider that stack (even though it is free, easy to learn and very fast).
- geebee 15y agoWhat do you think are some of the factors behind the resistance to some of these alternative frameworks? I've heard good things about stripes. But it seems like almost every MVC framework other than Spring MVC is losing mindshare. I actually think Struts 2 is a nicely designed framework, but the association with Struts (which is actually an almost completely different framework) may have doomed it. Almost everyone using Spring for DI seems to be leaning toward Spring MVC these days, probably because they don't want to do too much pick-and-choosing. And the default choice for a DI framework seems to be Spring as well, which means a Java programmer is now a Spring programmer. This is probably why the "java cookbook" style books haven't been updated since 2004. They're treated as an evolutionary dead end, though I don't think they should be.
- rlawson 15y agoYou hit the nail on the head. Java EE programming is consolidating into Spring programming. I think it is because Spring gives you a layer on top of the app servers that finally achieves the write once run anywhere as long as you stick with Spring. That part is good but it is a shame that you need so much stuff to achieve this. I always cringe when maven pulls down all spring jars (20 or 30 ???)