4 ms·
It's not that Scala is Effective Java, it's that "Effective Java" (the book) is a good set of patterns of software developments in many other object oriented la
by strlen 16y ago
It's not that Scala is Effective Java, it's that "Effective Java" (the book) is a good set of patterns of software developments in many other object oriented languages. You'll note much of the same discussed in Design Patterns (unfortunately, in a more rigid and less accessible form) and visible in well written pieces of software in Java, C++ and many other languages. That's why I highly suggest reading Effective Java even if you hate Java the language / Java the culture, the latter symbolized by horridly designed and implemented frameworks like Spring which have turned design patterns into a set of buzzwords to liberally sprinkle.
- foamdino 16y agoI agree that the Java culture is significantly poisoned by the 'enterprise architect' culture, but Spring if anything has been the saviour of Java. Compare IoC (Spring setter injection), with J2EE+EJB2.x - it's night and day - and I know which I would prefer to code using. Spring introduced POJO programming and explicitly called out the crappy J2EE design patterns in favour of simplicity. Now, Spring has accumulated so much cruft (and become much more commercial with the vmware buyout), that it is becoming the new J2EE. I've been doing some android programming recently, and working with Java without IoC is simply unbearable.
- strlen 16y ago> Compare IoC (Spring setter injection), with J2EE+EJB2.x - it's night and day - and I know which I would prefer to code using. Spring introduced POJO programming and explicitly called out the crappy J2EE design patterns in favour of simplicity. Agree. J2EE is an even worse example of "Java the culture". For a much better alternative, see Guice. I personally prefer "it's okay to call new sometimes" Design Pattern to IoC containers (but occasionally I find myself using Guice).
- strlen 16y ago> I've been doing some android programming recently, and working with Java without IoC is simply unbearable. Can't you use Guice with Android? I'd be surprised if you can't.
- foamdino 16y agoI'm looking into Guice + Roboguice (which seems to be the way to go), but I really need to understand Guice semantics first - Guice != Spring and I have a fair bit of 'unlearning' to do