Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Why .Net? Why not?

Hello .Net gurus!
I'd appreciate your opinion on several things regarding this technology in the context of other existing ones. I have managed to avoid .Net for some time due to several reasons, but it pops up every now and then lately, so I've decided to ask those of you have can compare it to J2EE or anything else out there. But, please no religious stuff :) I worked pretty much with pre-dot-Net technologies from MS, I stopped exactly when .Net came up, so COM/DCOM/ATL/MFC are all well known to me from inside out. For a coupla years now I'm tailoring distributed server applications with J2EE. Needless to say, I am pretty happy with it as a server technology. It's not perfect like nothing is in this world, but it's sure kicking it's way through.. Ok, this is a background, now to the questions.

It's about some project, nothing fancy, - browser based UI, some DB, some business logic floating around, usual stuff.

1) One of my customers insists on doing it solely based on .Net. What do you think makes him sure that he's making a right choice for the platform (let's say, he's not an idiot and knows what he pays for) ??

2) I'd like to get this project, but I want to stay away from MS a little longer. How would you convince someone that there is an alternative? And - is there actually an alternative today?

3) What are the advantages of .Net? I know that J2EE is rock solid on a server side, but sux as a rich client choice. How about the .Net? Where does it have it's strong points?

4) What are the weak spots? Let's look into the whole development cycle, - from a plain sheet of paper up until burned CD installation disk. Including the cost of course :)

And the last one, I'd like to get familiar with .Net but can't pick up a proper book to get into it. On one hand I don't want to read all the nasty details about CLR or C#, I have a basic idea what it is, on the other hand I do need some details to help me make a choice from the system architecture point of view. I mean - real life details. Any opinion will be greatly appreciated ! :)

Storyteller
Wednesday, April 28, 2004

1. If you're running all-Windows (or primarily Windows) infrastructure, .NET wins hands down. It has the best, deepest integration into the platform. On the other hand, if you're not running Windows, then .NET is out.

2. Why are you biased against Microsoft? And, why would you pursue a contract with someone who wants an all Microsoft solution, when you know you'd rather work on J2EE?

3. The rich client story is very good, if the client machines have .NET installed. A WinForms app is a Windows app, because it leverages the underlying infrastructure. On the server side, I like ASP.NET a lot better than any of the competitive Java technologies that I've looked at (Servlets, JSP, Struts, etc.). I think you'll be surprised at how good .NET is at the server side. I also think that, as a language, C# is stronger than Java; it's less restrictive, more powerful, and more flexible.

4. The biggest weak points are related to immaturity. Not absolutely everything is wrapped or ported, so sometimes you have to step out with P/Invoke. It can be a pain, but again, I prefer P/Invoke over JNI by a long shot. Similarly, because .NET is newer, it has a smaller amount of community information. Plus, of course, using .NET ties you to the Microsoft platforms. You can use the alternatives like Mono, but you won't be getting nearly 100% coverage, so if you plan to go down that route, start with Mono, and then run the resulting code on MS .NET.

There is a lot of free information, and .NET is free. You can jump in merely with some downloads and hitting a bunch of the .NET related web sites. There are free IDEs (like SharpDevelop), and many of the tools that you're used to in the Java world have .NET counterparts as well (NAnt, NUnit, NDoc, etc.).

Brad Wilson (dotnetguy.techieswithcats.com)
Wednesday, April 28, 2004

I'm not an expert in dotnet, so take what I have with  a grain of salt.  I've done a couple professional, smaller scale projects (less then 40k LOC) with .NET while i've done some bigger j2ee projects ( > 300K LOC, multi server, etc.). 

I LOVE I LOVE I LOVE web forms.  They are the coolest thing in the world.  When I go back to my J2EE projects I seriously miss the simplicity of web forms.  The idea of making web pages event driven is just so clean and beautiful.  Other then that..... .NET pretty much copied java.  You have your very similar network/mail/database APIs, and very similar lanugage feel (c#).  If you mostly develop your applications with servlets and POJOs, I imagine the switch will be very simple.  Now, .NET does NOT have the equivelant of Entity Beans, Session Beans, JMS,O/R mapping etc.  Instead of CMP, you have these funky things called DataSets... Check my thread on how it is using them.  I still haven't figured out if they're good practice or not.

Overall, i'd say dotnet is J2EE done a  little simpler and a little cleaner.  I will say though, I prefer J2EE, mostly because of the tremendous vendor support, and the fact that there are so many open source projects supporting it.  Windows costs money, while I can set up a full J2EE enviorment with free software. 

vince
Wednesday, April 28, 2004

Some people might say the lack of EJBs is a strength, not a weakness. ;)

I only use DataSets in the absolute simplest applications (like, I'm going to spend less than a couple days on the code, tops, for the entire web app). For anything that is now, or may be, complex, I opt for domain objects. The bindable controls can bind to collections of objects, not just DataSets, so I can have the same data-binding advantages of a DataSet.

Brad Wilson (dotnetguy.techieswithcats.com)
Wednesday, April 28, 2004

1) .NET is just as easy to use as Java, and if you are going with a Microsoft Server, you might as well stick with the platform that is the most performant on that system.

2) Mono is an alternative, but not nearly as stable or integrated as .NET is. J2EE is another alternative. I wouldn't have any idea how to convince a customer of anything, but a smart friend of mine always believed that if you lowered their expectation and delivered above that expectation, then you will always have a happy customer.

3) ASP .NET is great for server side web apps. I have no idea how it scales though. Microsoft uses it on its sites, but they are experts. The one strong advantage of .NET overall is productivity. The tools are really well integrated and classes are mostly well thought out. You can be up-and-running really quick when you build .NET apps. Eclipse and J2EE is fast too though. In my personal experience, I found that coding against J2EE is difficult because of server compatibility. With ASP .NET I find it easier to determine what features I have available on a particular server because all you need to know is the version of the runtime that is running. And since different version can run side-by-side (not sure if that works for ASP .NET) you can have more freedom in this respect.

4) Xcopy deployment is just as easy with J2EE as it is with .NET. You still have to install the runtime for each, but with .NET it automatically sets itself up on IIS. With J2EE you have to grab a server and install that as well as the java runtime. I can't say much other than that.

"And the last one, I'd like to get familiar with .Net but can't pick up a proper book to get into it. On one hand I don't want to read all the nasty details about CLR or C#, I have a basic idea what it is, on the other hand I do need some details to help me make a choice from the system architecture point of view. I mean - real life details. Any opinion will be greatly appreciated ! :)"

When I learned .NET I picked up "Programming C#" but I am not sure it fits what you are looking for. For what you are looking for I would say go to MSDN and find some of the old articles when .NET first came out. They usually covered the basic architecure and stuff like that. Other than that, I have no clue.

Gp
Thursday, April 29, 2004

Thanks everybody for a valuable input, gonna use it..

Storyteller
Friday, April 30, 2004

If you don't want to read a proper book, then these resources will be helpful.  They have certainly helped me.

These are free online seminars from Microsoft.  There is one from "Dr. GUI" that gives a good, quick walkthrough of the framework/CLR:

http://www.microsoft.com/seminar/default.mspx 

The .NET Show on MSDN has interviews with the developers, and demonstrations for each aspect of .NET:

http://msdn.microsoft.com/theshow/Archive.asp

.NET Rocks! is an online audio talk show.  It is entertaining and informative.

http://www.franklins.net/dotnetrocks/

The guys from .NET Rocks! have a very entertaining online training seminar that is not to be missed.  Even if the info is not new to you, they are the most entertaining trainers I have ever encountered.

http://www.franklins.net/dotnetrocks/dnrvideos.aspx

With resources like these available for free online, it's possible to become a .NET chair potato.

++Alan

Alan Stevens
Sunday, May 02, 2004

*  Recent Topics

*  Fog Creek Home