A recent conversation reminded me of the debate about Java and C#. The subject is not as clear cut as might appear and there are things to consider beyond the purely technical reasons for using either.
Java's Age
Java has been around for a while now, since 1995, and was one of the first major commercial object-oriented languages designed as such. C# is relatively new, released in 2002, and has features, such as reflection, that have been invented since Java was released. Java has either only partially included these new features or not at all. The reason for this conservatism in language design is that Sun has been focused on backward compatibility, even at the byte code level, and has been reluctant to implement new features that break this. Microsoft has had a reputation for being somewhat careless about backward compatibility, although this has changed somewhat as they've tried to promote .Net as an open standard.
Java's age, however, is also a head-start and there are many application frameworks and tool suites for Java, such as Spring, Hibernate, and the Apache Jakarta project, which are very mature. C#, or rather .Net, equivalents are only just starting to develop, and some of those that exist are actually ports of Java systems, such as Spring.Net and NHibernate.
Web Enabled
From the start, .Net has been designed for use in web applications. The effect of .Net on ASP, for example, has been almost revolutionary. In particular, .Net has libraries which make the development of web services and SOA much easier than before. Java, on the other hand, has had web services introduced retrospectively, through changes to J2EE and frameworks like Spring and languages like JSP.
UI Applications
Like web applications, .Net has been geared up to produce Windows applications right from the start, although not to the degree that Delphi has. Java has the Swing library, which, although cross-platform, produces very poor applications. It may be worth noting, however, that Vuze, one of the most popular bittorrent clients, is implemented in Java.
Cross Platform
From the start, Java was designed to be cross-platform. The Java slogan has always been, "build once, run anywhere" and Java applications can be built on a Linux box and run on Windows. .Net applications can only be run on Windows and .Net web applications only on IIS, Microsoft's web server. There are ports of .Net to other platforms, such as Mono, but these are not compatible with .Net to in the same way that different implementations of Java are.
The cross-platform limitation of .Net also makes it easier to take advantage of features only available in Windows and nowhere else. This is particularly true of Windows applications.
Politics
Java has evolved in a very open culture at Sun, Java going open source in 2007. Even though Sun held the licences to Java, it included interested groups in it's decision making process, what Sun called the Java Community Process. This is probably because the focus at Sun was hardware, which is where it made the bulk of it's money, rather than software. With the buyout of Sun by Oracle, this may change as Oracle are a software vendor, like Microsoft, although not development tools.
In contrast, .Net is very proprietary. Microsoft have not developed a port for .Net to Linux, for example, because of the licencing problems involved with the GPL and because Microsoft has no control over the development of the Linux operating system. In other words, if you want to use .Net, you are stuck with Windows and Microsoft. In anti-pattern terms, this is known as "vendor lock-in".
Conclusion
The choice between .Net and Java is not an easy one. There are a lot of technical factors to be considered, as well as the one's I've listed above. I tend to go for Java, but this is based on the cross-platform nature of Java, in addition to it's maturity and the vendor lock-in aspect. There are good arguments for .Net, however, including Microsoft's considerable support for it for the for the foreseeable future, and it's close relation with the Windows operating system. It also depends on the nature of the work being done. If it's going to be mostly Windows applications, then .Net is the obvious choice. With web applications, it's more complex, but, again, if it's going to be based on Windows, .Net seems to be the right choice. There are other choices than .Net and Java for the web, however, Ruby and PHP for example.
Another consideration is how much is it going to cost to move to these development languages from wherever you are now. Java and C# are syntactically very similar (the claim that C# is a clone of Java has some truth), so the jump from, say, Delphi or Visual Basic, would be the same to some extent.
A good idea is to look at other companies and see the choices they made, but understanding why they made those choices. For example, why do Google use C++, Java and Python, especially Python? Wikipedia is made using PHP, which is also cross-platform independent.
And, of course, the worst choice is one made from blind ignorance.
... about programming, growing up in the 1970's and 80's, games, science fiction, working in a charity book shop, films, spending too much time watching television, living in Basildon and Essex, and whatever else emerges from my fevered imagination. If you're reading this, it's your fault you clicked on the link: I am not responsible for your actions.
Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts
Saturday, 21 August 2010
Friday, 6 August 2010
Friday: Jobs
Since being made redundant from City Financials (the web site still exists, I noticed, even if the company doesn't), I've been casting around for a job.
I've been interviewed by JHC, a big firm up near London Bridge who were looking for an experienced Delphi developer. After three interviews over four or five weeks, they withdrew the job vacancy. Although this was a bit disappointing, I get the feeling that the job would have been quite a tough one and I'd have been on a learning curve for the next few years, although it would have been quite a rewarding role. Their attitude toward software development is very professional, plus I would have been doing Java as well as Delphi, which is the direction I want to go in. So mixed feelings about that one.
However, two other roles have sprung up at the same time. The first is another (Senior) Delphi role at the FTSE. This is for the unbelievable amount of £65k. So, obviously, I applied for it and just for good measure, I applied for the team leader role as well.
The other role my sister found me. It's a Senior DotNet Developer role at the NHS hospital where she works (she called it "DotNot", which was unintentionally funny. Or maybe dotnot), right in Basildon. I might not suitable for it: there was lots of web stuff, which I've avoided these past years, but there's enough connectivity stuff which is my speciality, so you never know. Plus it's local. Even if it was in Chelmsford or Southend, it would be a reasonable journey. I filled in the online application form and I'll keep my fingers crossed.
Finally, I got an interview at South Essex College for a Information Service Analyst, a sort of support/programmer job, at Thurrock (cheers, Pete). A good mix of different technologies and answering the phone. It doesn't pay much, but it might be just the thing.
I've been interviewed by JHC, a big firm up near London Bridge who were looking for an experienced Delphi developer. After three interviews over four or five weeks, they withdrew the job vacancy. Although this was a bit disappointing, I get the feeling that the job would have been quite a tough one and I'd have been on a learning curve for the next few years, although it would have been quite a rewarding role. Their attitude toward software development is very professional, plus I would have been doing Java as well as Delphi, which is the direction I want to go in. So mixed feelings about that one.
However, two other roles have sprung up at the same time. The first is another (Senior) Delphi role at the FTSE. This is for the unbelievable amount of £65k. So, obviously, I applied for it and just for good measure, I applied for the team leader role as well.
The other role my sister found me. It's a Senior DotNet Developer role at the NHS hospital where she works (she called it "DotNot", which was unintentionally funny. Or maybe dotnot), right in Basildon. I might not suitable for it: there was lots of web stuff, which I've avoided these past years, but there's enough connectivity stuff which is my speciality, so you never know. Plus it's local. Even if it was in Chelmsford or Southend, it would be a reasonable journey. I filled in the online application form and I'll keep my fingers crossed.
Finally, I got an interview at South Essex College for a Information Service Analyst, a sort of support/programmer job, at Thurrock (cheers, Pete). A good mix of different technologies and answering the phone. It doesn't pay much, but it might be just the thing.
Subscribe to:
Posts (Atom)