Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

.Net vs. JSP/JAVA

Hello folks,
  This has been a struggle of mine for the last 3 weeks. We are on the fringe of changing our ASP website to either .Net or Java. Very tough decision to make we are a somewhat small department in a large Bank and keep getting sucked into Microsoft Licensing schemes. We're tired of it but Microsoft makes it easy for the developers.  JSP/JAVA makes sense because of the increased flexibility but will it be hard to retrain Microsoft based developers to program in JSP/JAVA?

DK
Thursday, September 19, 2002

Pls drop me a line.  I work at MS and would be glad to talk to you about this issue (I'm a developer, not a marketing guy, so you can bypass all the BS :-)

Obviously, my viewpoint is that you should not move to JSP/Java, but I've done LOTS of J2EE development (I've only been with MS a month now), and I believe I can at least discuss the issue in a blanced way (I haven't been fully assimilated yet :-)

David Weller
Thursday, September 19, 2002

When the website is already created in ASP you can easily port it to .NET. Keeping the website active porting one page at a time. Porting to .JSP will be more of a chore.
It's also the question where is the expertise in your company and where do you want it to be.

Your own site is a relatively safe way to learn a new technology.

Aemca
Thursday, September 19, 2002

You say MS, but what language?  It's a lot easier for developers with C or C++ skills to make the move to the Java world, then it is for the VB only folks.  (Not impossible, just harder.)  Of course, they will have some of the same issues in moving to VB.NET as it is a pretty major change, but not as much as to JAVA.

Also keep in mind that .NET has J-sharp, it's own Java language.  I can't say anything about it's merits, but I do think the .NET framework can be extremely valuable, and it may be that you can bring some of the advantages you see with Java over into .NET.  (Please someone with knowledge about this correct me if I'm off base here.)

You speak of the greater flexibility in JSP/JAVA vs .NET - can you speak more to that?  I've personally yet to see any strong arguements to push me away from .NET towards JAVA.  To me they are fairly equal (I'd lean a little towards .NET, but that's more from familiarity and not any strong logical argument I could give.) 

If you were starting from scratch - then it might be a tough call.  But your not.  It sounds like your company, and your department are already pretty invested into MS tech, and therefore I think .NET is the better road for you. 

On the other hand, you seem to be suggesting that you would prefer to go the route of Java...  Why is that?  What business or economic reason is there that is pushing you that way?

Thomas Lobaugh
Thursday, September 19, 2002

From a technological viewpoint, I would say the implementation architecture of your existing ASPs should decide. The JSP samples I've seen (yes, I'm not a Java developer) looks like classic ASP with optional custom tags.

ASP.NET can be programmed like classic asp, but you can't mix HTML into your for loops anymore. The flexibility in programming this way is lost.

Instead there is a new programming model using web forms. But a web form is not a win form, so you actually have to think very hard on where to put code. It's important to understand the event model. And adding controls to controls collection is the way to create dynamic contents. Took me a while to understand that one.

As for the language issues: There is none.

Thomas Eyde
Thursday, September 19, 2002

being a Java coder.. well I guess thats all I have to say. :D

Actually, Im pretty fond of .NET too and do some (non pro)stuff in C#.
Is platform independance something you need? What existing/future systems do you need to integrate with?

Otherwize both alternitives are good IMHO.
(JSP is a good way of getting stared with Java, but configuring the server can be a headache at first.)

Eric DeBois
Thursday, September 19, 2002

I echo some of the concerns and questions the original poster has. We currently ship a VB6 desktop product with a Perl server component. I am very impressed with aspects of the .NET story and have been exploring migrating our code to C#. However there a couple of issues that we have:

1. Cross-platform support. I know there is Mono and some other efforts. We sell software that needs to be installed on our customer's web servers. They run all sorts of OS and server combinations. Perl (with all of its warts) seems to the only language constant across the various platforms. Java seems to follow closely behind but I have had issues setting up Java application servers.

It's tough to convince your boss to move to .NET when he feels we will be losing sales because we can't run on Linux and Solaris.

2. Ability to dynamically create a web page using ASP.NET. With servlets or Perl you get an HTTP request and you can return a full web page. In ASP.NET it seems you can return dynamic content inside of pre configured controls but you can not dynamically create a full html page.

I am interested to hear other peoples experience in this area.

Brad Patton
Thursday, September 19, 2002

Well, I live in "both worlds" at the moment and I have to say there is no comparison. While the languages and features are roughly the same, the real differentiators to me are cost and productivity.

Java’s tools are *ridiculously* expensive compared to what you get with MSDN universal. And the deployment costs are often Per CPU costs on top of the OS & hardware you’ve already paid for. How anyone can justify it cost wise is beyond me.

The dev environments for java are (for me) about 30% as productive as VS or VS.net. I’ve tried them all (TogetherJ, Borland JBuilder, Visual Age, etc.) and the time it takes to compile/deploy/debug don’t come close. In fact, most of the “java heavies” in my organizations gave up on debugging altogether and simply use print statements.

Anyway – my 2c – make sure you try before you buy.

Friendly .net pimp
Thursday, September 19, 2002

Java vs. .NET - the rumble in the jungle! The thrilla in ... Cupertino? :-)

I think if you look at the underlying architectures of both Java servelets/JSP and ASP.NET, you'll see a lot of similarities. They both do essentially the same things in mostly the same ways.

Java Servelet <-> .NET HttpHandler
JSP Page <-> ASP.NET page
Java taglib <-> ASP.NET server side web control

The details on both, of course, vary.

I've never had a chance to actually deploy any systems with either technology, so my knowledge comes from research, some training classes, and experimentation rather than actual practice. But, having said that:

As a developer, I prefer ASP.NET to JSP. It just seems to have more of the details right. Things like needing to write deployment descriptors for servelets - no need for such a thing in ASP.NET.

The VS.NET tools are pretty nice for ASP.NET development.

And C# is just a better language than Java; they had several years of looking at Java's mistakes and took the opportunity to fix them by adding stuff like enums, delegates, and operator overloading. I've often described C# as "Java after a large dose of Compound W" (that's an over the counter wart remover).

The only real concern is cross-platform. If that's really a problem, I'd say avoid both and use Apache modules instead :-). Java's got a better cross platform story right now.

Hope this helped.

-Chris

Chris Tavares
Thursday, September 19, 2002

If your code is already in ASP, then just port to .NET a page at a time, put your logic in code-behind pages, maybe convert some of the commonly used parts of your ASP pages into user controls, etc.  If you don't have enough people that do not know JSP/Java, but you have people that are familiar with VB/ASP, then stick with what you know. 

As to the person who said that you cannot dynamically create HTML in .NET, I'm not sure what you mean.  What's to keep someone from creating a string that contains HTML and then posting it back to the client via Response.Write()?

Tim
Thursday, September 19, 2002

If you create an HttpHandler, you don't even need the .aspx page. You get the request to handle however you want (just like a servelet would).

Chris Tavares
Thursday, September 19, 2002

If you are comparing C# and Java be sure to read the C# critiques at this site: http://www.geocities.com/csharpfaq

The pitfalls and best practices recommended there can be illuminating. And there are quite a few surprises even for experienced programmers.

Apu Petilon
Thursday, September 19, 2002

To answer the original question that kicked off this thread:

The decision to go with .NET or J2EE will depend on a variety of factors ,and not all of them will be technical in nature.

What is the development standard within your organization? COM+/.NET or J2EE

What is the current skill set of your developers?

Do you have a timeline for when you need the product implemented?

Does your project timeline take into consideration the training and ramp-up time for your developers to come up to speed on whatever technology that you choose and which technology will provide the shorter ramp up time?

Is this going to be an internal application where you can control the deployment OS or is this a shrink wrapped software that you need to deploy across multiple OS’s?

Both .NET and J2EE have compelling stories to tell and neither is going to go away any time soon.  If you plan to deploy a web services interface to your app .NET *currently* has an easier and very productive tool set  (VS.NET) that will get you out the door faster.  If you have to deploy the app to multiple OS’s J2EE *currently* has a better cross-platform story.

You mentioned that the current site is developed using Classic ASP/COM.  If so, in either case, your developers will have to come up to speed on Object Orientation and will have to take the time to learn the Framework libraries whether they be .NET or J2EE.

The point here is that, it is indeed a hard decision, but there are factors to consider beyond the Technical.

Anil

Anil John
Thursday, September 19, 2002

ASP.NET in its current form is next to useless.  Unfortunately, all the included server controls are IE specific.  If you have the luxury of targeting IE 5.0+, you will probably be very happy with ASP.NET.  I was hoping that there would be an option to have the controls emit standard XHTML and CSS.  I can understand treating IE4 and NS4 users as second-class citizens, but Mozilla and Opera users shouldn't suffer through a lack-luster user experience when they have browsers that are just as capable as IE6.

With that being said, ASP.NET is a very nice templating engine, and VS.NET is easily the best IDE I have ever used.  I really like the event-based programming model and the automatic view-state that the web controls offer.  It makes writing a web page nearly identical to writing a windows forms application.

Java has one major advantage over .NET, IMHO.  Java is much more mature than .NET and has a plethora of nice third-party components that are available to use in your applications.  http://jakarta.apache.org has many wonderful components to make your Java/JSP project easier to implement.  Plus you have multiple vendors to get a Java solution from.

At this point, I think Java has a definite edge due to its maturity and established developer community.  I also think that .NET has a lot of potential if MS plays their cards correctly.

Scott Banwart
Thursday, September 19, 2002

In response to Scott Banwart:

I've made a number of sites with ASP.NET that are cross browser compatible. While ASP.NET doesn't necessarily help you in doing it, I wouldn't say that it hinders you.

There are some extra features that are IE only but you're not required to use them. The DataGrid control will work on any browser.

I think the sites I've been doing with ASP.NET are actually more cross-browser compatible. A number of things I would have done on the client side in javascript or dhtml are easier to do server-side now.

Luke Duff
Thursday, September 19, 2002

ASP.NET Server controls are not IE Specific. In fact they emit HTML 4.0 compliant HTML.

What the controls do have is the concept of "uplevel" and "downlevel" browsers. If ASP.NET detects that the user is an "Uplevel" browser, then DHTML code (stylesheets/dom/javascript) is sent in ADDITION to the HTML. If a downlevel browser is detected, only the HTML is sent.  This actually is very apparent when you use the validation server controls. If an uplevel browser, validation occurs both on the client AND the server, but if a downlevel browser it occurs only on the server.

Currently, by default, "uplevel" browsers are classifed as IE 5.x and above BUT you have ability to explicitly specify who to consider uplevel and downlevel.

In short, ANY browser can view an asp.net page, but those classified as "uplevel" and can support the additional functionality on the client will be sent the code to make the browsing experience more enjoyable.

Anil

Anil John
Thursday, September 19, 2002

This is an interesting topic. I am a MS-technologies developer at a large financial services company and we are now debating the Java/.NET question. I am assuming that since you were work for a bank your situation is a lot like ours - there is this big computer built by IBM that contains 90+% of your data at the very back of most of your app architectures.

Over the years we have done most of our PC/Web development using MS technologies and ignored Java (except for 3rd party apps). This works fine for one-off type projects, but now we want to build a single code base for our data stores that can be used by any application (Web, PC, COBOL batch job, etc) in our company to control costs. To do that the code has to run on the MF. Web Services allows the MF code base to talk to any extra-MF app, but .NET does not run on the MF (Somebody want to port .NET to OS/390? I bet there are a lot of Fortune 500 companies that would be interested!).

Sorry for the amount of wind, but I would say that considering any sort of legacy integration (once again, assuming that you work for a bank that has Big Iron) would be paramount.

Later

Dave Langer
Friday, September 20, 2002

As I remember Joel articles, making really good software takes 10 years. Are you still going to .NET

Yakov Sirotkin
Friday, September 20, 2002

I've only just noticed this thread and feel compelled to comment on Mr "Friendly .NET Pimps" comments.

1:  Java’s tools are *ridiculously* expensive compared to what you get with MSDN universal.

The question was in regard to the deployment of JSPs and Servlets.  The JDK is free, Apache's Tomcat servlet/jsp engine is free, Jetty (another fine jsp/servlet engine) is free, the development tools vary in price, from free up to $800 (USD) for what I consider to be the best IDE I've every used (IntelliJ IDEA).

If you are talking Application Servers then there is a large variation in cost - JBoss/Jonas are free, IBM's Websphere is nowhere near it - 10s of thousands from memory.  It's very rare that an ASP site is going to need anything an application server has to offer.

2: The dev environments for java are (for me) about 30% as productive as VS or VS.net. I’ve tried them all (TogetherJ, Borland JBuilder, Visual Age, etc.) and the time it takes to compile/deploy/debug don’t come close. In fact, most of the “java heavies” in my organizations gave up on debugging altogether and simply use print statements.

Please compare apples with apples.  TogetherJ is a full cycle tool, not a java ide - comparable to rational rose.  JBuilder and Visual Age are the tools you should compare with VS and I agree that VS wins hands down.  VS is an brilliant tool - a very good interface, fast and well featured.  It lacks what I would call the most important element of any productive programmer's toolkit - refactoring support. 

The Java heavies in your organisation need to try a decent tool, to any Java progammer I would recomend investigating IntelliJ's IDEA product - the early access version.  I use VS for VBA programming and IDEA for Java programming - yes we actually have projects that utilise both - and I've extensive C++ experience using VS.

This is completely off the topic however.  The decision should be made, as several people have said, based on a few factors
1 - what is your target platform, if it includes a Mac/Unix/Non-windows, then you should seriously consider Java.
2 - where will you take it in the future.
3 - what are you familiar with - stick to what you are familiar with, you will make less errors.

James Walker
Friday, September 20, 2002

In response to Anil John:

In short, no they don't.  Don't believe me?  Try running a simple aspx page through the W3C validator. http://validator.w3c.org The server controls emit invalid attributes, invalid name values, and lots of IE specific DHTML/Javascript.  (MS_Positioning anyone?)

I also want to reiterate that treating Mozilla and Opera as "downlevel" browsers is unacceptable.  I think that the uplevel/downlevel concept as presented is a wonderful idea, but it won't really be usable until they truly support all uplevel browsers throught the use of true standard HTML and CSS.  Today, if I want that kind of support I have to rewrite the entire server control library.  That's strikes me as rather stupid.

Since this is the 1.UhOh release of .NET, I am willing to wait and watch to see what MS's next move is, and I will continue to experiment and work with .NET technologies.  However, if these issues are not addressed by .NET 1.1, then .NET is going to be yet another development platform for MS-only solutions.

Scott Banwart
Friday, September 20, 2002

IMHO I would consider PHP4 for the following three reasons:

  a) Licencing shemes - PHP's freeware open source license!

  b) Its robustness, performance and flexibility features that made it surplant ASP web implementations all around the world/Internet (from simple web pages to complex dynamic eCommerce applications).

  c) It's very easy to learn with a very good community support (php.net, zend.com, phpbuilder.com, etc.) and it has extensive three party software modules support.

Ricardo Silves
Friday, September 20, 2002

RE: Cross-Browser viewing.

Also remember that using ASP.NET does not mean you have to use th web-forms controls.  If you are concerned about Cross-browser functionality, then you can create dynamic HTML just like you did in ASP and forget about the Controls..  You still get the aspx advantages of pre-compilation and true VB.NET or C# code to work with for server side functionality.

ASP has web-forms type controls too that were supposed to make life grand.  They didn't and nobody uses them.

ASP.NET is not neccessarily a 1st release.  In many ways, it's just the next step up for many of the technologies.  ASP, COM, VB.  The main things that are really new, or Radical changes, are the Framework, and the IDE.

Thomas Lobaugh
Friday, September 20, 2002

reply to Ricardo Silves:

By your arguements, why not use PERL?

AND:
- It's been around longer than PHP
- It's actually got a .NET implementation allowing it to integrate.

In the end, IMHO, few large corporations are going to embrace PHP or PERL because of perceived issues with Support (Who's going to provide it??)

Thomas Lobaugh
Friday, September 20, 2002

Reply to Scott Banwart:

The basic precept behind the Server Control architecture is to allow developers to take advantage of browser features without breaking broad compatibility.  I am sure that there are indeed server controls out there that do not emit valid HTML for some browsers.

Whether a server control is specific to a browser or not is entirely dependent on the creator of the server control. The great thing about the ASP.NET architecture is the extensibility model that is inherent in it, which allows you as a developer to write server controls yourself.  If you wanted to write a server control that was completely and totally standards compliant in every way, you can.

The broad base of native controls that are provided seem to be designed in a manner such that, each control on a per browser basis, emits the proper html/script/UI that best displays it across that browser while still maintaining compatibility with others.

BTW, an excellent example of a server control that demonstrates both the extensibility of the asp.net platform and provides an example of what can be done to create a great UI across multiple browsers is the RichTextBox control at http://www.richtextbox.com

I prefer to take advantage of the some of the client side features in a browser AS LONG AS the same code degrades gracefully in other browsers.  Yes, it will mean that the browsing experience on one specific browser may be much better than in other browsers.  But that is a choice I am willing to make. In a lot of ways, ASP.NET fits in with the way I work. 

You are obviously passionate about the standards compliance of browsers and perhaps coding to that?  We will simply have to agree to disagree about our respective philosophies :-)

Anil

Anil John
Friday, September 20, 2002

Reply to Thomas Lobaugh:

  a) although PERL has been around longer, PHP4 is more widespread than PERL, not to mention it is much less cryptic and consequently easier to learn and master, specially if your audience is coming from Windows developing environments. But this is all syntatic "sugar" and not that important!

  b) PHP4 has both COM and .Net extensions working. Want better integration than that?! (Offtopic: It also has JAVA extensions that enables PHP4 code to interact with JAVA code! :) )

  c) There are already PHP4 support service packages from companies like Zend.

  d) Please look for real world PHP4 case studies: www.zend.com/zend/cs/ and check real world Internet usage statistics at www.netcraft.net.

Ricardo Silves
Friday, September 20, 2002

Mono has an alternate implementation of ASP.NET, and we would be very happy to make sure that our resulting HTML is compliant and that "upside" versions of the HTML generated take advantage of IE and Mozilla.

Being an open source project, you can be part of the developers that make this happen.

Love!

Miguel de Icaza
Friday, September 20, 2002

Miguel - you post is spot on

Anil - I agree with you and think you stated the case nicely. Also thanks for all of your posts on the .net mailing lists http://www.aspfriends.com/aspng/index.asp

Ricardo - PHP4 is more widespread than PERL - wow  - would you care to back that up with some statistics and a definition of "widespread"

DK - you started this thread. Are you getting anything useful out of the discussion?

Nick Katsivelos
Friday, September 20, 2002

"PHP4 is more widespread than PERL - wow - would you care to back that up with some statistics"

http://www.securityspace.com/s_survey/data/man.200208/apachemods.html

AC
Monday, September 23, 2002

I used VB6/ASP back in 97-99 for a major e-commerce site.

I hated the spaghetti code produced by ASP and it's includes, the problems caused by the "everything goes" VBscript, random IIS errors, dll hell, nonexistant page/resource depolyment tools, MTS problems, etc.

On my next few projects, I used java/JSP/J2EE sometimes on Unix, sometimes on Windows w/ Oracle. I enjoyed some of the  improvements JSP made (you can compile the pages, a real language, better design/reuse, jars/packaging, the java classes, concept of a J2ee app server separate from the OS, etc.)

After a while though, I did notice that the tools did not cut it (I stuck to ultraedit, basically a super notepad), memory requirements kept going up, and the performance was not snappy as I want it to be.

I'm now doing a .NET project and it is such an improvement over both VB6/ASP and J2EE in that it takes the best of both (performance and good design practices, ease of use and extensible). The negatives are definitely the same as everyone else has mentioned: one platform, one vendor, etc. But if you can live with this, is the approach to take, especially for corporate/dept programmers.

Thank God for competition - I'm looking forward to who (Sun? IBM? Oracle? Apple?) raises the bar next.

AEB
Tuesday, September 24, 2002

AC,  Thanks for the stats, I am not sure how you interpret them to back your point that PHP is more widespread than PERL. For starters PERL is running in a whole lot more places than the sites running the Apapche mod.

Or is your point that the PHP module for Apache is more widespread than the PERL module for Apache? If that is the case the statistics show PERL's share growing very rapidly over the past nine months while PHP declining at a slow steady rate.

nick katsivelos
Thursday, September 26, 2002

*  Recent Topics

*  Fog Creek Home