I'm writing this topic for learning purpose, not to start a flame war.
Basing on your experiences when It's highly recommended to use Java and not .NET, and when I must use .NET and not Java, also when I have the choice to use anyone of them in Projects development.
Thanks already.
The choice of language always depends on what you and your team know best and the problem at hand.
It's not common to do scientific computing with heavy numerical methods in Ruby or PHP; no one writes web apps in FORTRAN. The problem you're solving will affect the choice.
Your deployment environment will also affect the .NET versus Java EE choice. If you're a 100% Microsoft shop, .NET is an easy choice. If you have a heterogeneous environment, maybe Java EE is for you. If you like Linux, perhaps Java EE is preferred over Mono.
.NET and Java EE have evolved to solve similar kinds of problems. There's almost a 1:1 correspondence between features in the language, except for some advances like closures that .NET has added.
Related
I have seen the use of the word "platform" and the word "framework" used interchangeably. I would like to get some input on the subject. If someone could answer these questions, it might clear it up for me...
Is .NET a framework or platform?
From the product side, would Visual Studio be considered a Platform?
What would JavaScript be considered?
I am confused. :)
Thank you for your time.
I would say that a platform is something you build on top of -- your OS, an ORM or a set of services provided by an API.
A framework is something you use to build up inside of -- think ASP.Net, WCF or .Net itself.
The platform has functionality which you are extending, while by itself the framework does nothing until you utilize it to create an app.
.NET is a Microsoft Framework
Visual Studio is an IDE
JavaScript is a programming language
A platform IMO is a system, a kind of environment, can consist of a number of different frameworks working together. http://en.wikipedia.org/wiki/Computing_platform
Framework is a toolkit to help you get things done quicker and with conventions so everyone is on the same page.
I can simplify you a little things:
we can say that Windows OS is a "platefom" but about. Net is a "framework"
Generally:
Framework is a set of components that are used to create foundations, architecture and outline for a software.
A platform is formed by the assembly equipment such as a PC and an operating system.
What is the process involved with converting a Java web application to something like ASP.NET with Silverlight or alike?
I know many Java frameworks have been proted to .Net (either C# or VB.NET), but haven't really seen many web applications done. (I might be very wrong here)
I also know very little about Java programming but know C#, VB.NET and ASP.NET. I haven;t looked at silverlight yet but know what it can do to some extent. I do know though that Java syntax is very similar to that of C, C# and C++ as they all the the "{}" brackets and layed out similarly.
For arguments sake (just to get a handle and example) what would it take to convert something like Alfresco to a .NET type web app? Also, just want to add that I am not planning on doing it but want to know that if its even worth investing time in looking into Java applications to port to .NET.
Microsoft used to distribute a 'Java Language Conversion Wizard' to convert Java code into C# code, including substituting some of the common framework classes. It needs a lot of cleanup after the fact, but may be useful depending on what sort of code you're trying to convert. If you have access to the VS 2005 tools you should be able to install it.
Other than that, it's heavily dependent on how the code's structured. Finding a web framework that's similar to the Java framework used would probably be helpful. In many cases, I suspect it would be easier just to port the database and master page templates/stylesheets across and build the rest from scratch.
This page on MSDN might be useful: http://msdn.microsoft.com/en-us/gg715299.aspx.
It does a conceptual mapping of concepts in Java to concepts in .NET.
Regarding Giacomo's mention of the Java Language Conversion Assistant (JLCA), it is in fact retired and I wouldn't recommend relying too heavily on it. As he says there's quite a bit of cleanup to do but much of that depends on how you architected your app.
Why Java is still used in web development? I'm just curious..
There are a number of reasons:
1. It is by no means a dead language. There are thousands of Java developers out there.
2. Many available Java developers means that it relatively easy to find maintenance programmers if necessary.
3. The Java / J2EE architecture is robust and reasonably elegant. It makes it possible to architect well built applications.
4. The free tools available for it are enterprise ready. For example, Apache / Tomcat / JBoss are a solid foundation to build a web-app from.
5. Excellent support for developers. Eclipse is one of the best developer platforms available. Ant and Maven support for Java is excellent.
6. There is a good availability of third-party (and open-source) libraries and Eclipse plug-ins for most of the additional functionality that might be needed but does not come in the core libraries.
7. There is also great support tools from commercial vendors: ORacle; IBM / Rational; etc.
8. Updated versions with newer language constructs are constantly being developed.
In short, it is a good tool for the job. It is compares favourably to other development platforms (.Net, Ruby, etc), and perhaps is better than some.
Simple. It's a cross platform environment, that is clearly defined, and controlled. Sure, Sun has a big deal of say in what is available in the Java environment, but there is plenty of 3rd party support and development in the Java environment.
Yes, Java applications start up slightly slower than Native applications, but take a look at VUZE... Once it's started, it's nearly native speed (or at least it was when I was using it). With the JIT (Just in Time) compilers, code caching, and other features, there isn't much of a reason that there would be a major speed penalty...
One big reason I think is because it's platform independent meaning they can easily run on all operating systems as long as you have the Java Runtime Environment installed. This could allow you to, for example, compile code in Windows and deploy on Unix.
I would also add that while this is only a con against .Net, your application server doesn't have to be Windows so it is cheaper to throw more hardware at it.
For the same reason as why COBOL and FORTRAN still exist. Because the language has proven itself to be robust and reliable.
Compare it with cars. Some people want the latest models because it has more power, better speed, improved features and whatever more. Others will just use a reliable car that's made to last for many years without much need for additional maintenance. Some buy a new car every 3 years, others will use their cars for half a century or more.
When talking about Java & the web, people seem to happily mix things by concentrating on Java applications deployed with Web Start (or even Applets), and forgetting that Java is a common language for implementing plain old dynamic web sites (or web applications). The latter is especially true for larger, more "enterprisey" systems. Even if on the desktop Java never really took off, on the server side it certainly did.
Without going into much detail, a couple of reasons why Java is used for creating web sites / applications:
It's a tried and true approach for building large-scale web apps. Either using just the basic (Java EE) technologies of Servlets and JSP, or newer frameworks built on top of those, such as JSF, Wicket or Google Web Toolkit. (Just one example of high scalability: Gmail is implemented in Java, using Google Web Toolkit.)
A mind-boggling amount of Java libraries exist, for all kinds of tasks — both open-source and commercial ones. If you need some in the backend of your app it may make a lot of sense to do the whole app using the same technology.
There are a lot of skilled Java developers out there — something that may affect tech desicions when launching (larger) projects
When creating a web interface for, or integrating into, an existing Java enterprise system (which are common) it may be beneficial to use the same language
Edit: I also agree with Doug about the tools and developer support. For example, IntelliJ IDEA may well be the most advanced IDE for any language (and I've heard this also from people who've used Eclipse and Visual Studio extensively... ;-) )
It's ubiquitous. The tools are great across the board. It's powerful. The community is huge. There is an amazing amount of available libraries / products / toolkits / frameworks. The JVM is great.
You can build cathedrals with this language. Those tend to stand for centuries.
Since Java doesn't run on the iPad, doesn't that hurt Java web development? Developing a web application that supports desktop and mobile is a possible path, but if your site uses Java or Flash, you have eliminated that opportunity.
We have a web application that is for both desktop and mobile (supports swiping, zooming, and such using jQuery). We decided against Java, Flash, and Silverlight because they do not work with iPad. The iPad is a growing base and web applications will have to keep up to support it.
It will be interesting to see how this affects web development with Java... time will tell.
I've tried asp.net and jsp...and the programming language was powerful enough to create both desktop and Windows apps.
Butwhat can I possibly do with php other than creating web applications? Does it have some kind of runtime or framework?
Thanks
Powerful is an unfortunate word. It's about focus, not power. PHP is not very well suited for desktop applications. In part because of weak library support (Though some exists), and in part because of its memory management model. It can be used for jobs outside the web world though; It's often used as a general scripting language, as well as various background tasks.
PHP is not "limited" per se. PHP is primarily only used to develop Web applications. However, there are products like WinBinder that promise to allow you to use PHP to build a desktop application; I wouldn't exactly recommend that though. Also, you probably have not built Windows applications with ASP.NET and JSP but rather more likely .NET WinForms and Java (perhaps Swing). PHP is used by thousands of developers building many different Web applications. It is possible to build other kinds of applications with it but again I wouldn't recommend going down that path.
PHP was intended as a web development language, but you can write console scripts with it, and if you're feeling brave, use something like PHP-GTK to write GUI apps.
PHP makes a surprisingly good shell scripting tool. It has a wealth of simple functions built in.
File IO
String manipulation
Array manipulation
While you can do the same thing in JSP and C# you will spend a lot more time vs. any scripting langauge.
The biggest advantage PHP has over other scripting languages is PHP.net Documentation. Out of any language I have ever used this single resource defines what good documentation and organization of a langauge reference should be.
PHP can be run via an interpreter on the command line, so any computation task can be done in PHP. I don't know about desktop apps and GUI.
PHP has a runtime but it's not fully interpreted like some languages. For example, you can't redefine a method. As far as desktop apps, PHP has bindings for creating desktop apps but it's not very good. It's great for command line tools. Zend and CakePHP are two frameworks for web apps. PHP is like a very-easy to use version of C with a very good community of extensions (look at the extensions on php.net docs). PHP is well supported on windows (even by Msft).
Quite often it is the "limitation" or for want of a better word "focus" of a language that makes it powerful rather than weak.
I'd say PHP is best suited for web application development.
It does the job, and does it well.
But that's not to say that it is not useful for anything else. It can be used as a generic scripting language.
With Qt, you can even develop desktop apps using PHP. Check out http://php-qt.org/
But the focus must be with web apps: PHP was intended for the web.
Depends on what you consider powerful?
It is designed for server-side web-development, and it does that perfectly.
I can't see myself saying one language is more powerful than the other, as it is always a matter of preference, the task at hand and whether the language was designed for what you are trying to accomplish.
I need to implement webservices in an upcoming project and wanted to know what are the main points to base the decision on whether to implement using java or .NET
I'm a C++er...
If you're a Java shop use Java. If you're a .NET shop use .NET.
There really is no difference that makes one of the two languages superior to the other in regards to web services.
Possible consideration - .NET pre 3.5 only provided support for SOAP based services, but I believe the 3.5 WCF offers REST and SOAP now.
There's no real difference from programmer's point of view (implementation).
For me, a reason to pick Java is that all tools and infrastructure are free/open source. OS, deployment web server, databases, IDEs and developer tools.
I have plenty of experience with both, and both will certainly do the job.
However I tend to prefer Java over .Net for things like web services for the following reasons:
It's cross-platform, which gives you much better options on the hosting side (e.g. running a big Linux cluster on Amazon EC2)
The library ecosystem is larger and more mature, especially on the server side.
I prefer the more flexible open source philosophy to "the only way is Microsoft". Vendor lock-in is always a bad idea for your enterprise architecture in the long run.
You can optionally use awesome languages like Clojure or Scala on the JVM
Ultimately though, I'd go with the one your team has the most skills with. This will determine what you are most productive with, which is usually most important if your main objective is to deliver value quickly.
It's a personal decision, usually determined by the technology already in place or the skill set of the developer(s) writing the services.
i've never really developed web services in java, but i have in .NET and if you're using Visual Studio they're an absolute cinch to whip up (i expect they're a little more difficult to do without the aid of VS).
if you're already working in java, and don't have any .NET stuff in place, stick with java - it'll save you a lot of money (if you were to get Visual Studio in, as i mentioned), and possibly some time involved in learning the specifics of .NET
In my experience, Web Services are a bit more tightly integrated into Visual Studio than they are into Java's editors.
The Eclipse IDE doesn't even have JAX-WS (Java standard web services stack) support built in, opting to use Apache Axis 1 instead.
Netbeans supports JAX-WS, though.
I personally prefer .NET to Java for many reasons I don't want to go through, since it doesn't really matter and is more a personal preference than a strict guideline I can recommend.
If you have Java infrastructure in place or using a platform other than Windows for your server applications, I strongly suggest Java. However, if you don't have anything in place and running on Windows platform, .NET is pretty cool in that area (WCF/ASMX/WSE/...).
As you say you're a C++ - er you'll probably find .NET easier as you can target it directly from C++.
I'm a Java guy, but I think Web Services are easier to code in .NET. Visual Studio takes care of everything, in Java it takes a bit to get started.
A bit of a problem in some projects with JAX-WS is, that SUN ships the "old" version 2.0 with Java 6. If you want to use the current version, it's some work to make it run with Java 5 and Java 6.
If your app must be portable, you should obviously choose Java. Otherwise I would say it's just a choice of your preferred language, since the above issues are really small (maybe you want to choose Axis or something else anyway, I haven't worked with something other than JAX-WS yet).
IMO if you want to do SOAP, then its a heck of a lot easier to use .NET and WCF. However, I've found REST to be a bit tricky with WCF, and had to implement a custom XML parser to do it instead of using their built-in one.
You probably want to consider your hosting environment too. If you are going to serve this from Windows hardware, you can drop .NET WCF web services into IIS. If you are going to run a Linux/Solaris server, then it isn't even a question...
I suggest implementation with JSP ,it provides a robust platform for development
I prefer JSP to ASP or any microsoft techonolgy!