« Patterns Of Enterprise Applicaton Architecture (by Martin Fowler) Chaper 1 and 2 | Main | Sizing Up .Net 3.0 Windows Presentation Foundation (WPF) »

Chapter 5. Rules of the Game

The premise of the book: conditions are ripe for an alternative applications programming language to emerge, because Java is abandoning its base. I'm not going to pretend to know what's next. Hopefully, I'll lay out some interesting languages and frameworks that have promise. This chapter, then, suggests the characteristics that the language should have to have broad commercial success.

The premise of the book: conditions are ripe for an alternative applications programming language to emerge, because Java is abandoning its base. I'm not going to pretend to know what's next. Hopefully, I'll lay out some interesting languages and frameworks that have promise. This chapter, then, suggests the characteristics that the language should have to have broad commercial success.

5.1. Java Raises the Bar

Each new language is subject to the rules of its time. Changes in standards force the industry to retool. Every language leaves behind a legacy. Sometimes, changing languages embrace the legacy.

  • Portability - Java introduced a virtual machine. The next major applications language will almost certainly support a virtual machine.

    • Security
    • Portability
    • Extensibility
    • Interoperability

The next commercially successful language should have a version that runs in the JVM.

Dion Almaer: Why Java Will Be Hard to Replace... "You are saying I should bet my Fortune 500 enterprise on a Japanese Mormon named Matz?" ...Don't get me wrong... I want the industry to move to languages that are more dynamic. I think we need to...but I am skeptical.

  • *Internet Focus*- Enabling applications for the Internet has become the most important problem that a business solves...

The Internet has at least two dimensions: interfaces for computers, and interfaces for people. ...users are just beginning to understand that HTML is not enough... [its] broken in fundimental ways...

  • Interoperability - Interop on the Internet will undoubtedly play a critical role. I think that leads to three important capabilities:

    • XML and structured data - Java doesn't let you declare nested structured data very well. In Java, you see a proliferation of XML, even where it offers little tangible value. The next language should let you declare and express structured data, cleanly and natively.
    • Service-oriented architecture (SOA) - A common structured data format is not enough to bridge two languages. You also need a communications mechanism. Build loosely coupled services, available on the network, and let them communicate with simple messages, with an XML payload. It's a good strategy for interop, for many reasons:

      • SOA works best with coarse-grained architectures, or calling big chunks of code. Interop between languages is a coarse-grained problem.
      • SOA is hot. Since it's politically popular, support and mindshare will likely remain high.
      • SOA uses Internet standards. That means you can leverage existing infrastructure, like security and existing message protocols.

A lighter form of web services, called REST, may last unlike the current SOA implementation. REST stands for Representational State Transfer, and it promotes using services the way Internet sites have used them for years. Like the Internet, REST views the network as a collection of resources rather than a collection of methods

5.2. Enterprise Integration

The next major applications language will not initially have to have the full enterprise capabilities to succeed. That said, some enterprise capabilities will be very important.

  • Database Integration - Minimally, a new language should access relational databases in a natural, productive way. I

    • Embrace the relational database
    • Don't force structure on the relational database
    • Perform, and scale

  • * Transactions and Security* - Enterprise developers need the ability to define a business transaction

5.3. Generating the Buzz

Many languages have trumped Java technically, but they still failed. The biggest factor of the equation is social. Without a credible community, there can be no success. To a programmer, a language is an investment in a future, and even an identity. Call it marketing, or buzz, or even hype. If it's hip, or at least interesting, a language stands a fighting chance. If not, there's no chance at all.

  • Open Source - Unless it's a disruptive technology, it's hard to imagine the next major programming language coming from a larger commercial vendor. A new language will need an attractive community to succeed, and the open source community seems like a natural place for that to form.
  • Economics - You can't move away from Java without economic justification. The leading potential economic catalyst is clear—an overwhelming advantage in productivity.
  • Approachability - When you look at early adoption for all major successful languages, one of the key issues is approachability. New languages need to grab new users quickly. You should be able to get started quickly, and solve a problem that's important to you immediately.
  • The Killer App - Without some kind of catalyst, it's difficult to imagine how a successful community ever gets started, a catalyst. The killer app is a seductive idea, because it encapsulates so many important concepts:

    • The catalyst, with economic justification, often takes the form of a killer app .
    • Once a solution is technically viable, a killer app enables a rapid growth to critical mass.
    • The killer app often initiates the hype that's required to escape a niche. With the newly found hype, the language can explode from a small, focused niche to a more generally successful language.

5.4. Language Features

  • Dynamic Typing - To be sure, static typing does have its advantages:

    • Static typing enforces typing rules at compile time, when they are least expensive to fix.
    • Static interfaces make it easier to enforce a protocol across important boundaries.
    • Static typing catches some types of subtle errors at compile time, like the misspelling of a variable name.

Still, there's a related cost, usually in productivity.

  • Code Blocks and Continuations - The Java open source community now uses anonymous inner classes with greater and greater regularity. When you need lightweight callback-style functionality, in Java the best way is the anonymous inner class. Code block show up frequently. Continuations will also be important.
  • Rapid Feedback Loop - Think of a feedback loop as the time between making a change and seeing the impact in running code. New application development principles, like test-first development, work best with a fast feedback loop.
  • User Interface Focus - User interface development demands more than Java has to give. For most application developers, the framework should do much more for you.
  • Dynamic Class Model - Dynamic, and reflective.
  • Sound Foundations - Java's successor will probably be object-oriented, and will be theoretically purer than Java. Especially when you start to consider meta-programming, simplicity, learning curves, and increasing processing power. * Transparent persistence frameworks need only deal with objects and collections.

    • XML binding frameworks would have a cleaner API, and a much cleaner implementation.
    • Debugging frameworks like loggers could easily print values of any parameters.
    • Consistency is important, too. Languages with consistent naming and consistent behavior are far easier to learn.

A Few Potential Suitors

  • Perl - Perl is a scripting language, with a quirky syntax and a turbulent past.

    • Like - If raw productivity is your goal, perhaps Perl is a possible answer. It's dynamically typed, is highly productive, and has a small community established. It also has a fanatical following.
    • Don't like - A write-only language: with its cryptic syntax, you can easily produce code that's very difficult to understand and maintain. Perl's OOP syntax, is bolted on and awkward.

  • Python - A dynamic programming language with goof syntax and power, and it supports the language features that you'd want.

    • Like - Dynamic typing, a quick feedback loop, and a concise syntax. It's pretty fast, and it has a version that runs in the JVM.
    • Don't Like - Not object-oriented enough. Python depends too much on white-space. Python community aren't happy with the web development tools. At times, it's too academic and too defensive.

  • Ruby - Ruby is an object-oriented language. The Ruby community grew steadily, and gained popularity only in the last couple of years.

    • Like - Ruby has a terse and readable syntax. It's highly dynamic. Ruby has strong web frameworks, and good support for XML and web services. Ruby has a couple of popular emerging frameworks, like Ruby on Rails. Most importantly, Ruby may have the killer app in Rails.
    • Like - Ruby has an embarrassing lack of commercial backing. Its relatively small community shows in the dearth of niche frameworks. The JVM support is immature.

  • PHP - PHP is a scripting language. With PHP, you effectively start with HTML, and mark it up with tags that can tie your application to a database, or other back-end systems. The tags get interpreted on the server, which returns pure HTML to the client.

    • Like - PHP success seems to be ramping up sharplyit's very well suited for its "sweet spot," controlling database access from a web page. It's easy to understand and easy to learn.
    • Don't like - The model tightly couples the user interface and database together. PHP grew rapidly and haphazardly with a heavy Perl influence

  • C# - C# is effectively a Java clone. It has many of the same benefits and drawbacks. Microsoft will always have a core set of developers. That's effectively a closed ecosystem, though.
  • Smalltalk - A well-established, hard-luck object-oriented language. It's hugely productive, slightly awkward, and quirky to the extreme.

No Silver Bullet

You may have noticed that no language has all the characteristics we're seeking. That's not surprising. If one did, we'd be using it by now. Still, you can see that these languages do establish real strength in important areas.