Tuesday, July 29, 2008

Scala and XML

Scala is a popular new programming language that runs on the Java™ Virtual Machine (JVM.) Scala compiles into byte-code and thus it can leverage the Java programming language. Its syntax, however, makes it a powerful alternative to Java code in certain scenarios. One of those scenarios is XML processing. Scala lets you navigate and process parsed XML in several ways. It also has first class support for XML built right in, so you don't need to create strings of XML or programmatically build DOM trees. In this article, you will see these aspects of Scala in action and see how Scala can make working with XML a joy to do. Scala and XML

The busy Java developer's guide to Scala: Implementation inheritance

Scala gives you just as much support for implementation inheritance as the Java™ language does — but Scala's inheritance yields a few surprises. Polymorphism done the Scala way, blends functional and object-oriented language styles while still mapping perfectly to the Java platform's inheritance model. The busy Java developer's guide to Scala: Implementation inheritance

The busy Java developer's guide to Scala: Of traits and behaviors

Scala doesn't just bring functional concepts to the JVM, it offers us a modern perspective on object-oriented language design. Scala exploits traits to make objects simpler and easier to build. Traits are both similar to and different from the traditional polarities offered by Java™ interfaces and C++ multiple inheritance." The busy Java developer's guide to Scala: Of traits and behaviors

The busy Java developer's guide to Scala: Don't get thrown for a loop!

Scala's approach to control constructs like if, while, and for - may look like good old Java constructs. However Scala imbues them with some wildly different characteristics. Rather than let you risk the frustration of discovering the differences after you've made a bunch of mistakes (and written buggy code as a result), this month's article is a primer on what to expect when using control structures in Scala. The busy Java developer's guide to Scala: Don't get thrown for a loop!

The busy Java developer's guide to Scala: Class action

Scala's functional programming features are compelling, but they're not the only reason Java developers should be interested in the language. In fact, Scala blends functional concepts and object orientation. In order to let the Java-cum-Scala programmer feel more at home, it makes sense to look at Scala's object features and see how they map over to Java linguistically. The busy Java developer's guide to Scala: Class action

The busy Java developer's guide to Scala: Packages and access modifiers

Scala takes a slightly different approach in respect to packaging, treating it as a combination of the Java language's declaration approach and C#'s scoped approach. With that in mind, a Java developer can do the traditional Java approach and put a package declaration at the top of a .scala file just as normal Java classes do; the package declaration applies across the entire file scope just as it does in Java code. Alternatively, a Scala developer can use Scala's package 'scoping' approach in which curly braces delimit the scope of the package statement. The busy Java developer's guide to Scala: Packages and access modifiers

Monday, July 21, 2008

The busy Java developer's guide to Scala: Functional programming for the object oriented

The Java™ platform has historically been the province of object-oriented programming, but even Java language stalwarts are starting to pay attention to the latest old-is-new trend in application development: functional programming. In this new series, Ted Neward introduces Scala, a programming language that combines functional and object-oriented techniques for the JVM. Along the way, Ted makes the case for why you should take the time to learn Scala — concurrency, for one — and shows you how quickly it will pay off. The busy Java developer's guide to Scala: Functional programming for the object oriented

The busy Java developer's guide to Scala: Collection types

Scala's functional orientation is worth exploring, and not only because you've run out of objects to play with. Functional programming in Scala will give you some new design constructs and ideas, as well as built-in constructs that make programming certain scenarios (such as concurrency) much, much easier. The busy Java developer's guide to Scala: Collection types