Java and .NET Interoperability
We’ve been doing a lot of Java / .NET interop for last couple of years in our enterprise applications. On one hand, our customers used their existing expertise and infrastructure that worked better with Java based technologies like their existing Unix based servers, Sybase database (on Unix) and the knowledge of their DBA team, and we using our existing Java developers and expertise. But what Java based technology provides that we don’t have on .NET world? Is it important at all?
With rise of Silverlight presentation framework working the interop becomes more important. You can now create a sophisticated user interface and make it work with your existing EJBs on your JBoss backend and you have best of both worlds. As a .NET developer you might not be familiar what this provides, so here’s a few things you’ll get right out of the box:
When you create applications on top of EJB 3.0 using any EJB compliant application server, one thing you get is a standard, pluggable persistence API. The idea behind JPA was to provide a standard set of interfaces to application developers and let the application server provide different implementations of these interfaces using various persistence frameworks. Great idea, right? This means you don’t need to learn how to use another persistence framework, because now they all support an standard interface.
Should you need to expose your business logic through WebServices, all you need to do is to decorate your existing services with an Annotation to signify the application service that the class provides a WebService endpoint. An Annotation is actually a Java term for almost the same thing we call an Attribute in .NET world.
There are a lot of cross cutting concerns your application server provides. Things such as standard logging framework, inversion of control container, queues, scheduling, Message Driven Bean (which is a very simple ESB) , hot deployment of applications, etc.
Yes, the best part of it is that all of this comes as free (as in free food). You don’t have to pay for licenses for your application server, you don’t have to pay for IDEs because there are a lot of great IDEs available, you don’t have to buy license for your Linux based Server and there’s a large community out there that can help you freely, if you’re stuck. Of course there are paid services too, mostly for services such as support, but you hardly need it. If you’re pairing Silverlight frontend with Java backend, you can use Eclipse to handle both in one place!
This is just a scratch on the surface. I’ll shed more light on the subject on upcoming posts.