Saturday 12 March 2016

The Green, Green Grass of Home

The things fall into place.

After 3.5 years of software development exclusively on Microsoft platforms (mainly .NET but also Excel; with some Oracle back-end, that’s true), I am coming “home”: I am joining a trading company where the main development platform is Java. Looking forward to it.

Java, home?

Why do I call Java as “home” given that I was born and raised in Microsoft1) and I’ve worked much more on Microsoft technologies than on Java? Perhaps because I feel that Java (as an ecosystem) is … well … more … homely (in a way).

What Java has and Microsoft Land doesn’t have

There are a few things that the Microsoft ecosystem lacks when compared to Java:

  • Community – in the true sense of the word. Microsoft has always been very keen on communities, but those were communities around Microsoft, not communities with Microsoft.
    • Microsoft was the driving force and the crucial ingredient in those communities. In fact, the idea was to drive people towards Microsoft, via communities – not to build communities which can do it on their own without Microsoft. You take Microsoft out, the foundation of those communities ceased to exist.
    • By contrast, the Java ecosystem has never been so much centred on one company, even during Sun era. Java was – and still is – a gigantic collection of specifications more than anything else. From those specification anyone can - theoretically – implement another Java even if Oracle disappears along with all the JDK source code. Microsoft only recently started to open up in such direction (and not completely).

      I experience this community spirit first-hand. I am a proud member of London Java Community (to which, unfortunately, I do not contribute as much as I’d like). There is involvement in Java technology from there going down to JDK contributions. There is no such equivalent in Microsoft Land (although there is a vibrant F# community, another one for Azure, etc).
  • Ecosystem Dynamism – which is strongly linked with the more democratic character of Java. Java has strong technological trends evolving independently of the “mother company” – a thing that Microsoft Land lacks. I mean major technological trends, not an individual system or library here and there.
    • Application servers? Plenty in the Java land, both J2EE compliant or not. Take Spring for example, it stirred up a movement when the Java Enterprise specs were getting lost in bloat. A true reaction from a community that’s had enough. Same with Hibernate, in response to JDBC and JDO limitations. No such revolution in the Microsoft Land coming from another place than Microsoft. In fact, no application server even exists there (if you consider IIS a web-server and not an application server).
    • Web Frameworks? Plenty again in the Java land, both J2EE compliant or not. Vaadin, GWT, OpenXava – just to name a few non-compliant. No such thing in Microsoft Land (although small initiatives exist, like WebSharper): the vast majority of .NET developers had to wait for ASP.NET, then ASP.NET MVC and so on to see things moving. In other words, the move forward was coming almost exclusively from one company: Microsoft.
    • Popular Programming Languages? Scala, Groovy, Jython, Clojure, Nashorn JavaScript, Ceylon, Kotlin, even Prolog – the list is very long for JVM. Situation in Microsoft Land? Besides the languages directly supported by Microsoft, none of them reached industry-strength or wide acceptance or both.
    • Drive to Modernity? Android programming: mainly Android Java. Amazon Web Services, Google App Engine and many other cloud providers: mainly Java. Big-data and analytics: Apache Foundation which is mainly portable C++ and Java. By contrast, Microsoft offers Azure (excellent platform), Windows Phone (good but small market share) and F# and TypeScript (excellent programming languages, no equivalent in Java Land) - but MS is rather a follower than a leader in this area.
  • Platform Stability – which is a side-effect of the enormous portability of the platform. Disclaimer: here platform stability = backwards compatibility, application stability = being able to run without change.

    A program written for Java 1.0 still runs on Java 8. Most (well-written) Java programs running on Windows will run unchanged on Solaris. Not all programs written for MS-DOS or Windows 3.1 would work on Windows 10 64bit. Java had to be portable therefore it had to level out differences behind a common interface and semantics. The natural consequence of this it was making it portable across versions – i.e. backward compatible.

    This makes Java ideal for long-lasting business applications – where knowing that your business does not halt because the platform cracks with an upgrade. How many ad-hoc small service applications produced quickly on .NET can claim the same application stability as the applications developed in the confines of a Java Application Server (be it compliant or not with J2EE)?

What Microsoft Land has and Java doesn’t have

“Give to the Cesar what belongs to the Cesar” – still applies, even in software engineering. There are a few things which I think Microsoft Land has and Java doesn’t have:

  • Ecosystem Consistency – the predominant position of Microsoft in the Microsoft ecosystem had one very positive side-effect: consistency. One platform (.NET), one IDE (Visual Studio), one small group of inter-operating languages (C++/C#/VB.NET/F#), one web server (IIS) and one set of tools (NuGet, etc). By contrast, the Java ecosystem is hugely fragmented and – sad to say – the alternatives to the same solution are of unequal in quality.
    • Take for example IDEs: there is one that comes with the platform (NetBeans) and it’s a child’s play to install and get the job done. We have a clever one (IntelliJ) with plug-ins of varying quality and we have yet another one (Eclipse), a de-facto standard, but with a plug-in eco-system falling short compared to the platform itself. How typical: the standard is not de-facto standard and the de-facto standard falls short in terms of tools.
    • Another example, application servers: we have the specs (J2EE) and a reference implementation (GlassFish), but J2EE itself is less popular than a non-compliant system (Spring, a de-facto standard). Again, the standard is not de-facto standard and if you follow the de-facto standard you end-up in vendor lock-in.
  • Technological Dynamism – each Microsoft technology, taken in isolation, evolves faster and is more innovative than its Java counterpart.
    • C# language? Moves faster than Java language and it is a pleasure to use. In Java I still have to use final ThisIsVeryLongObjectName x = new ThisIsVeryLongObjectName(); where a val x = new ThisIsVeryLongObjectName(); would be just as good.
    • F# language? Something that Scala doesn’t match and there’s no equivalent on the JVM.
    • .NET Platform itself? Superior to JVM, evolving faster than the JVM and requiring less tuning than the JVM.
    • Mobile development? Simply a breeze – if you are happy to stay within 2% of the market share.
  • Fewer Moribund Technologies – I think there are more admins programming today in cmd.exe than Java developers producing Java applets.
    • … Same with .NET WinForms versus Abstract Windowing Toolkit … or …
    • … ASP.NET versus JSP … or …
    • … .NET/Native Interop versus old Java I/O
    • The ecosystem dynamism of Java has a big downside: technologies become obsolete but don’t disappear and they just bloat the ecosystem. By contrast, Microsoft Land is bolder in pruning dead wood (or keeping the useful alive). The net result: fewer moribund technologies in Microsoft Land.
  • Genuine OS integration – .NET may not be a portable platform, but certainly it is well integrated with the OS (Windows). Java, to achieve portability, gave up on integration. That exists, but it is not as natural. If you program rich applications for the client (which will be Windows in the foreseeable future), then Microsoft integration with the OS is a blessing (sorry, JavaFX!).

    Microsoft technologies will not disappear simply because it is impossible to replace the billions of Windows workstations out there. The reverse is true: if you take the platform away, then Microsoft is just one of many (see the mobile, for example).

How my Perfect Land would look like?

In my Perfect Land this division (and competition, at times) between the two great ecosystems would not exist (without one swallowing the other):

  • Acknowledgement of The Other would be, perhaps, First Principle in my Perfect Land. Currently the two ecosystems simply ignore each other – how rude! Java development for Windows is seen as a chore whereas Microsoft Land looks at Java Platform as if it’s one of many (like Django or Perl, for e.g.). In my Perfect Land the two great ecosystems would acknowledge their paramount importance for the sofware industry and build on that acknowledgment.
  • Symbiotic Evolution would be my Second Principle in my Perfect Land, and a consequence of the First Principle. Does Java have extension methods? No, but C# does and why not importing that from “the other camp”? It would open so many doors. Does .NET have portability? No, but JVM has and there is a lot to take from there – to everyone’s benefit.
  • Less competition, More cooperation would be my Third Principle in my Perfect Land, and a natural extension of the first two Principles. Competition is hailed as a major drive for innovation. I beg to differ. I believe that competition comes naturally (whether we encourage it or not)2), but what needs a boost is cooperation – because this is where good things really come from. Examples:
    • We still don’t have a reliable RPC mechanism from .NET to Java and from Java to .NET:
      • WCF is a great platform – does Java take advantage of that for the sake of interoperability? Did Microsoft care to engage Sun or Oracle in the design? Would Sun or Oracle have participated?
      • SOAs can be a substitute for RPCs, yet serialization (be it XML, JSON) is not perfectly compatible – did anyone care to work with the other side to iron out all the wrinkles?
    • We still don’t have a reliable cross-platform componentization model between Java and .NET:
      • I can implement COM in Java but is it efficient? Do I have the tooling to integrate that quickly into a .NET/Windows app?
      • I can consume CORBA in .NET but do I have the means to do it easily? Does anyone care?
      • Can I cross-componentize directly, like implementing applications in .NET for a Java application server? That would require running Java and .NET runtimes in the same address space, side by side. It would be like a dream come true – but it will remain a dream.
    • There is virtually no ground for convergence in terms of best practices, information dissemination and so on:
      • You read the MSDN and the JDK and you find so many commonalities – because the .NET and Java are very similar. Can you see this convergence in the instructional material?
      • You can find .NET developers who don’t know Java and Java developers who don’t know .NET – which, to me, is an anomaly. Sure, anyone can say “well, if you know one you can learn quickly the other”. Yes, if for a superficial knowledge of the other. But to do it well you have to double the effort – because the devil is in the details.

Conclusion

The Java Ecosystem has, in my opinion, an upper hand compared to the Microsoft Land when it comes the latest trends in the industry. My ideal would be for the two ecosystems to form one single Perfect Land where they cooperate more than compete - but until that happens I call my return to the Java Land a coming back to the “green, green grass of home”.


1) Although I started my career in my home country, my first contact with the industry at large was when I joined Microsoft.

2) My wife and I can see it with our children: we need to teach them to cooperate, not to compete.
It also happens at workplace: good, strong organizations are the ones who discourage workplace competition in favour of cooperation. Why?
Competition has its merits but what it achieves it achieves many times at high costs: for one good, innovative solution or product you have N others that failed – and N can be high …

No comments:

Post a Comment