|
Introduction
I have been using ASP (Active Server Pages) since its introduction several eons ago. I can safely say it was the first Microsoft development product I really enjoyed to use. While it never really incorporated an object-oriented approach that I preferred using, it is still a solid solution for developing quick and dynamic web solutions for my customers. A year or so ago I was at an ASP conference and someone I was talking to said to me "ASP was such a great idea that Sun copied it and made JSP". This statement intrigued me and I mentally filed away the conversation for examination at a later date. It was late 1999 when I took the time to briefly look at JSP. I was amazed at similarities. After a month of research, I decided JSP was mature enough for prime time, so I decided to take the JSP plunge. Well, I must admit, it has been an interesting choice. From my experiences, I am now ready to help my fellow ASP programmers and write this article.
JSP or ASP
This is the first of four on-line articles I am writing. The purpose is to examine both ASP (Active Server Pages) and JSP (Java Server Pages). The goals of these articles include:
- Give developers enough information to decide when it is appropriate to use each language.
- Examine the differences between the languages.
- Assist ASP programmers who want to make the transition into JSP.
AND THE WINNER IS...
OK, it all boils down to one simple question. Which is language is best for your dynamic web site? The winner of the battle between ASP and JSP is... Neither. Each of these languages has its strengths and weakness. Both languages are excellent choices for building dynamic web sites. Currently, the prime considerations for choosing between ASP or JSP should depend on the following criteria:
- How large is your project?
- Which expertise does your shop have?
- How and where are you going to host your site?
- How many concurrent users are you expecting?
Lets look at each of these criteria.
- How large is your project?
For large projects, I would say JSP is the clear winner. When used properly, you can logically assign your team resources easier in a JSP project. Some of your team can concentrate on building Java beans while other members concentrate on the presentation parts of your project. In addition, with the object-oriented nature of Java, it is easier to logically break apart the project among the project staff. On large projects, ASP tends to become spaghetti code rather easily and the maintenance issues can swamp you quickly. JSP is much cleaner and easier to maintain for large projects.
For small projects, ASP tends to be better. This is due to three facts.
- ASP is very simple.
- There are fewer hassles in setting up and maintaining an ASP web site. The integration of ASP and Microsoft's IIS (Internet Information Web Server) is incredible. In addition, many excellent articles and books explain how to set up an ASP site. This makes setting up a web site based upon ASP a relatively simple task.
- Microsoft's ADO object. Using the ADO to data enable your project is simple and fast. It works with most data sources and is feature packed. This speed and power is passed on to you, which means you are that much more likely to finish that time critical project on time.
- Which expertise does your shop have?
In other words, stay with what you are good at. I see no reason to drop ASP for JSP if your shop's expertise is in ASP. If your shop has expertise in neither language, I would lean towards ASP, since ASP has a easier learning curve over JSP/Servlets/Java. If your shop has experience in Java, then JSP would be the hands down winner.
- How and where are you going to host your site?
If you are going to host your web site outside of your business then ASP is the clear winner. Currently it is much easier to host an ASP site over a JSP site. As of early June this year, I was able to find roughly 30 JSP hosting services worldwide. Out of this selection, I found only three hosting services that I was willing to consider for my web site. In fact, I ended up deciding to wait three months before making my final decision. When I examined ASP hosting services, I quickly lost count of all the possibilities. Over time, JSP hosting alternatives will improve but I don't see this changing this year. I must mention ASP had the same problem two years ago. The market place quickly caught up with demand and now hosting an ASP site is as easy as a normal HTML base site. I expect JSP to follow the same trend and by early next year we should see an explosion of sites that will host JSP.
If you are going to host your own site, then this limitation is removed. Also if you are going to use a web server other than Microsoft's IIS, I strongly recommend JSP. This is due to the independent nature of JSP relative to a web server, and the ability to choose a JSP container (a container object is what the web server calls to process the JSP page) that best fits your needs. ASP, on the other hand, is really only meant to be used on Microsoft's web server. There are third party solutions to remove this limitation, but I prefer to bypass the issue altogether and use JSP, which is web server independent.
- How many concurrent users are you expecting?
As a web developer, I have concentrated on small sites where the number of concurrent users is under 500. At this size both ASP and JSP function well. However, when you begin to scale your web sites to larger configurations, things change rapidly. Having used both ASP and JSP, I can clearly see JSP has much better support for larger web sites and for web farming solutions. If I were to deploy a web site designed for over 800 concurrent users, I would use JSP as my language of choice.
Conclusion
Overall, I am happy using each language and have found both to be solid solutions for web sites. I normally leave my crystal ball at home, but I am willing to make several predictions. First, I fully expect to see the marketplace divide itself evenly between these two languages. There might be some regional variations, but on a large scale, these two languages are fairly balanced in the pros and cons. From looking at criteria breakdown, I expect JSP to be quickly accepted on the larger corporate web sites while ASP will be very popular among the smaller web sites. My final prediction is that each of these languages are here to stay and over the next ten years I will be happily up to my armpits in both ASP and JSP sites. Oh these are good times to be a simple country programmer!
Next article: Under the hood: A direct comparison of ASP and JSP.
|