开发者

SOA/web services: Java on Tomcat or C# (.NET) on IIS?

开发者 https://www.devze.com 2022-12-18 12:01 出处:网络
While this stems from the age-old debate between Java and .NET, I\'m interested in the merits of these two technologies in terms of SOA/web services.

While this stems from the age-old debate between Java and .NET, I'm interested in the merits of these two technologies in terms of SOA/web services.

I'm starting a new project writing web services. I don't have extensive experience writing them in either Java or C#, and I'm open to using either a Microsoft stack (running IIS) or a Linux stack (running Tomcat). So far in my research, the complexity of the two languages seems to be about equal.

I'll be running a MySQL database (SQL Server is out of the question).开发者_高级运维 Database access thus has no bearing on the rest of the stack.

I will be consuming REST services (and possibly SOAP as well), and exposing SOAP services.

What are the advantages or disadvantages of these two technologies in terms of ease of use, complexity, typical development time, total cost of ownership (esp. maintenance costs), etc.? Which has better integration to existing security and authentication frameworks (e.g., CAS, LDAP, or OAuth)?


While I am a java proponent and have little C# experience, I will honestly say they will likely be about equal, and you should go with whatever language you are most familiar with and comfortable in programming.

On the Java side, both exposing and consuming web services (SOAP or REST) can be easily done via open source libraries (and there may even be some stuff built into the JDK at this point, although usually they are a bit behind the open source community), one of the most popular being Spring. This will do for you all the complexity and plumbing around creating and consuming SOAP, and exposing or consuming REST.

For SOAP:

For REST:

http://blog.springsource.com/2009/03/08/rest-in-spring-3-mvc/

http://blog.springsource.com/2009/03/27/rest-in-spring-3-resttemplate/

For SOAP:

http://static.springsource.org/spring-ws/sites/1.5/

Note Spring is just one option (but a good one), but my overall point is don't write the plumbing yourself, choose an existing framework to do it for you and it shouldn't matter what language you use.

As mentioned I don't know much about C# but what I've found is they usually take the good parts of the core JDK and the open source java community and build it into the language, so there may be some nice native stuff in C# that mirrors what Spring has done for Java.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号