views:

142

answers:

4

... I really like extreme programming and get the sense that the Java community is moving further and further away from direct feedback, simple design and object-oriented programming.

I love the sense of direct feedback you can get in Python, Ruby, Groovy (and if I could find work in it, Smalltalk)

I'm really good at OO design, extreme programming and building workable abstractions.

I don't have the time or energy to waste on overcomplicated platforms where you have to code for long periods of time (like 5 mins or more) without being able to run the code (or the tests)... or where crazy people try to program in XML.

Question: I still love software development, so is there anything new and refreshing that I should look at doing?

I'd be so happy if somebody came up with an inspiring, practical answer to this ;-)

+4  A: 

I partly agree and partly disagree with your observations.

Where I agree is that Java developers (as a whole) have a predilection for "over-layering" and unfortunately in Java this leads to lots of boilerplate lines of code and (imho) not as much value as is suggested.

Where I disagree is that Spring (core) is bloated or that the XML is bad. For one thing, most of the boilerplate XML can be done with annotations and classpath scanning so you have little or even no XML in a Spring 2.5+ application. Secondly, the whole point of the XML (or annotations) is depdency injection. This makes testing easier not harder as it's easier to swap in mocked implementations in unit tests.

Maven is an interesting one. A lot of people (myself included) aren't entirely comfortable with the dictated directory structure (which is particularly deep) but Maven projects work well with modern IDEs and stop you having to write some boilerplate with, say, Ant+Ivy. The downside is that there are cases and combinations you can come up with where Maven just doesn't work. Recently a colleague found a case where two JAXB builds just didn't work in a multi-module Maven setup when you wanted to build one sub-module (apparently there will be a fix in Maven 3 for it).

But based on the principle that all abstractions are failed abstractions there will always be corner cases like that and you'll constantly be plugging such leaks.

The build and deploy process in Java apps does put me off too. In all honesty, I've found (of all things) PHP to be emancipating in this regard. Click "save" on your editor and reload on your browser and you check if it works.

PHP isn't new and shiny but I think developers have a real "greener pastures" view of new and shiny. You simply trade one set of pros and cons for another. Most of the "new and shiny" Java expat crowd these days are on Ruby on Rails (possibly JRuby), Scala, Clojure, Groovy or something like that.

Don't get me wrong: I still do like Java and it definitely has its place and its advantages but for more straightforward Web development I will generally favour PHP all other things being equal.

cletus
I'm old school XP - and I like having explicit Dependency Inversion in the code - so the refactoring and dependency analysis tools work - and so I only have to think in one language. I've found spring to be a brilliant impediment to refactoring... everything's implicit and done with reflection.
cartoonfox
Perhaps you're using the wrong tools because IntelliJ works brilliantly with refactoring (and code completion) in Spring.
cletus
I get the thing about intellij - but there's power in just having one seamless language - not jumping between 5 different mini-embedded languages... which is a serious problem with J2EE... and it suggests that Java is failing as a language.
cartoonfox
Java isn't failing as much as people are extending it as there are uses that wasn't predicted, and there is no reason to have to predict everything. The fact that AOP or DI works is due to a good design of the language. IDEs make it easier to use these new tools, so Eclipse can use AJDT for AOP and SpringIDE for Spring.
James Black
cartoonfox
While DI an AOP have their place, the frameworks they go with are a language and architecture in themselves. Unfortunately, both can have a big impact on troubleshooting because of the amount of run-time variability (ignoring the massive number of cases where DI is used for the typical one choice case). And, if your application does any significant amount of locking, static analysis of resource locking tends to go out the window.
Jim Rush
A: 

I guess you are missing the point of maven and spring, if you want to code less than 5 minutes and be able to run the code.

Agile doesn't deal with being able to code something quickly and run it. It is being agile to the needs of the customer, or client.

Spring works well with that, as, though DI you can swap modules in and out, so, you can have configuration settings for your development, QA and production environment, and so just change the file and be in a new environment. Spring also makes it easier to keep your levels decoupled, and annotations like @Autowire I found helpful, so I didn't have to do a lot of work to keep the xml config file up-to-date.

Python and Ruby have their uses, but it seems to be more on the server-side, supporting REST, and you may see how well you can work with JRuby, but enterprises will continue to go with frameworks like Spring due to the ease of testing that they give, the stability and maturity of the codebase.

If you have your build environment set up properly then it is easy to deploy to the webserver and see the new changes with one click, or, for a more complicated system you can use subversion, and whenever their is a new checkin the build system runs the unit tests and then deploy the new version.

The thing about Python, Ruby, PHP or any other dynamic solution is that you can make changes and see what happened, but there is nothing to say that you have to test, or that what change you made will have broken any other part of the application.

If you just want to stay in the web application sphere then you may find some work, depending on where you live, with just using dynamic languages.

James Black
It's fair to say that as far as spring is concerned, I think the emperor is naked. You don't have to use annotations or XML to do dependency inversion... and I think it's an absolute maintenance nightmare to make large sections of your code implicitly dependent on uses of reflection.As far as maven goes - I don't understand why I love rubygems but hate maven... I haven't understood my own reaction to that. They're not really that different are they?
cartoonfox
They don't seem different, except that with maven you are downloading new versions more often, and if it is part of your build process it always goes out to check on the latest version. I tend to use AOP in my own code, but I have used Spring, and it can simplify the process, as then one team isn't blocked on waiting for another to finish, since mocking is so easy in Spring, for example.
James Black
Your comment about how easily dynamic stuff can get broken is absolutely right. I do everything test-first and I've worked in type system free languages before (Smalltalk, Ruby, Python) ... in fact that's how TDD got invented in Smalltalk - (SUnit can do things you just can't do in JUnit/NUnit...)
cartoonfox
Smalltalk seemed to be the start to so many good ideas, I have never used it, but did play with it at one point.
James Black
Maybe spring is better than the traditional, J2EE way - but I didn't spend very much time doing that because I went straight into extreme programming. "frameworks like Spring due to the ease of testing that they give" really seems like a joke to me - it really seems to make things much harder to refactor - like setting things in cement.
cartoonfox
For enterprise applications you need some stability, but you want to be able to swap modules around, for example, so Spring works well for that, and it is much better than using EJBs. It is a trade-off between being agile, so you can react to customers, and having something that meets the requirements of the business.
James Black
+1  A: 

Have you looked at learning some of the Google frameworks, like Guice? Heck, Google App Engine looks pretty agile to me, though I haven't had the opportunity to use it myself.

Steven Huwig
I have heard good things about GWT but haven't tried it. Last project had me do Spring MVC which sucked the absolute life out of me. It just looked bloatier and stupider than all the other web frameworks I've used.
cartoonfox
+1  A: 

What about moving into Grails? Super fun, great framework for prototyping those whizbang ideas one has at 3am, GORM does a lot of things right when compared to EJB3, and you still have all of your old Java jars hanging about for you to fall back on when you're lost and scared. As a bouns, you can deploy it up on the Google App Engine (if you use JPA or JDO).

gmoore
I did a grails contract last year. I'd happily do so again. Groovy is a bit of a mess as languages go - I'd prefer ruby (shame JRuby isn't so popular with Java devs)
cartoonfox
Agreed on JRuby. Very promising but very little acceptance so far.
gmoore