Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

New to .NET, experienced in J2EE.. seeking advice

I'm a J2EE developer starting a new asp.net project in a few weeks. The project is about doing a small web based content managing system.

I've been told that we are going to use webmatrix as IDE.. Is it any good?

What learning path do you recomend for a J2EE developer to become proficient in .Net. ?

Also, Is there anything similar to struts (the framework I mostly use) in the .Net world?

What are the main differences between J2EE an .Net philosophies?

Thanks in advance.

DotNet newbie
Sunday, May 23, 2004

A common mistake is for people to mix up .Net and J2EE. .Net is a development plaform. There are multiple languages that can be used to write programs which are compiled to an intermediate format (IL) that can then be run on the common language runtime (CLR). Similarly, the Java platform allows one [mainstream] language to be used to write programs which are compiled to byte code, and which can be run on the java virtual machine (JVM).

The .net SDK is the same as the java JDK, in terms of it's purposes. It provides a library of functions that help in the development of software by providing useful classes and functions commonly required.

J2EE is an extension of the java SDK - standard edition. It is a collection of predefined specifications for implementing enterprise level services - database access (JDBC), naming and directory services (JNDI), web interfaces (JSP/Servlets), Transaction coordination (JTS) and messaging (JMS) etc... An enterprise java bean (EJB) is just a set of classes that provide a way for a client to remotely access business logic, wrapped with these services. The container (Weblogic, Webshpere, JBoss) manages the services for you so [in theory] the developer is freed up to concentrate on implementing their business logic.

Currently on the .NET platform there is no formalized "Enterprise Edition" in the same sense as the J2EE platform where there is a defined specification and once implemented you can run your code in a single container. The following is my understanding of how these sorts of programs can be implemented. (I will stand corrected though)

With .Net we have web development (ASP.NET), database access (ADO.NET), messaging (MSMQ), distributed transaction coordination (DTC), and a package of services that provide remote method invocation (remoting), service lookup, transaction coordination, security context authentication and authorisation. These I believe fall under the banner of "Enterprise Services". Everything you can do in J2EE, you can do with .Net. However in .Net there is not a single set of APIs that provide you with this abiility in the same way. But using the services provided by Microsoft you can certainly build enterprise strength apps with the .Net platform.

Regarding a "struts" replacement for the .Net platform, ASP.NET implements a similar model in terms of server side "action classes" that are called when a user performs an action on the client. The Code behind model of ASP.NET allows you to write your processing logic, call helper classes, invoke your business logic tier (ADO.NET or Enterprise Services) and maintain session state etc... Personally, I think that ASP.NET has succeeded in building a decent, usable web framework, where JSPs, servlets and struts etc... have evolved into a configuration nightmare. This has spawned the Java Server Faces project, to try and bring java web based development up to the standard that has been set by ASP.NET (imho).

As for a learning path... I guess try to understand what the equivalent  technology offered by the .Net platform is for each of the offerings of J2EE. Look into Enterprise Services and maybe also search for enterpirse frameworks that might be starting to emerge. Probably the best source of information would be Microsofts port of the J2EE sample app - Pet Store Demo. See how they've gone about implementing different functionality and browse the source code etc... Other than that, I guess it's just time and experience.

hope this helps. best of luck.

stuart
Monday, May 24, 2004

Get ready for a fun little adventure. If you are the typical anti-MS developer then you will have fun saying "They just copied Java" and not much fun saying "I don't understand what they are doing. Where's their xyz (MVC, struts, etc.) framework.

Two places to start:
http://www.asp.net - there are numerous lightweight samples on the site. In addition, there is a very active develop forum there. The source code for the forums is available and provides lots of great info.
http://www.microsoft.com/resources/practices/default.mspx - this is their patterns and practices site. lots of articles on best practices within the .Net world.

In regard to Web Matrix: It's free so don't expect too much. If you are a serious developer used to Enterprise level developer apps, then you will probably feel like you are working with one hand tied behind your back. I would recommend getting a copy of Visual Studio .Net 2003. A developer edition can be had for <$100.

It is an easier switch to go from Java to .Net vs VB6 to .Net. I've done both and having Java experience before switching definitely helped because they are so similar. The hardest thing was getting used to a new way of doing things in the ASP.Net world of postbacks and codebehinds.

Best recommendation is to grab several of the apps from www.asp.net and explore and compare how they do different things.

Regards.

Matt
Tuesday, May 25, 2004

Well, thanks everybody.

Incredibly useful the patterns and practices site!

I'm finding the transition to C# very easy and I'm getting an overall positive impression form the .net framework, also, WebMatrix is less amateurish than I thought.

For me, the biggest problem is the .net way to data access wich is much different than the patterns I'm used to, I'm findign ADO.NET more 'table oriented', so to speak.

Thank God there is a guide in the patterns and practices site ".NET Data Access Architecture Guide"[1] which is wonderful for newcomers as myself.

Thanks again. I'll keep you posted on my progress (if any :-)

[1] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/authaspdotnet.asp

DotNet newbie
Wednesday, May 26, 2004

*  Recent Topics

*  Fog Creek Home