About 3 months ago I made the decision to dump “classic” ASP / VB COM in favor of Microsoft’s spankin’ new ASP.NET.
In a short while I have picked up VB.NET and C#, and become quite familiar with most of the common framework components. While there is a lot to cover, I’ll give you my overall impressions of the framework and the toolkit.
Firstly, it’s important to note that ASP.NET is a quantum leap over ASP/COM. While ASP/VBscript was/is effectively a crippled programming language for novices, .NET gives an experienced dev a lot of nice tools.
The jury is still out on whether ASP.NET really offers much over JavaBeans and JSP or PHP. Obviously these are not easy comparisons, as each has it’s own strenghts and weaknesses. I will say, without a doubt, that ASP.NET offers very little that is not already available in other web app platforms. What it does offer, however, is a bit more polish, and a bit more completeness, and a bit more ease-of-use, especially for novice web devs.
ASP.NET’s maligned and misunderstood event model is actually a nice feature, especially once you begin re-using user controls. Simply put, you can encapsulate the logic of a form in a user control, nest those controls in a page, and the aggregated events will all fire based on the parent’s events. This is very slick, and allows for some quite profound code re-use.
ASP.NET is also an interesting beast, offering a simple XML template system on top of ‘codebehind’ script. While this does a good job of separating presentation from logic, it is somewhat primitive and simple when compared to SMARTY (PHP) or Velocity / Freemarker (Java). The simplicity and ease-of-use with ASP.NET limits it’s ability to do things like dynamically load templates and nest templates. While this is possible by overriding some .NET base classes, it’s expected that ASP.NET 2.0 will have some sort of robust templating, called ‘Master Pages’.
VB.NET is an update of VB 6 and is now a completely OOP language. A lot of the nasty idiosyncracies of VB have been cleaned up. Problem is, there is really no longer a compelling reason to use VB for anything – because you have C#. Many of us seem to agree that VB.NET is the endgame plan for Microsoft to drop VB 6 support. I would guess that 90% of VB programmers will never make that leap, and will spend their careers trapped in the VB 6 ghetto Microsoft has created.
C# is a great little language. With stonger typing and faster execution than VB, it’s C/Java style syntax is a lot cleaner and less verbose. I have moved all my new projects to C# and thus far have had excellent results. If you can write Java or C/C++, and you know OOP, you will have no problem learning C#.
Finally, the .NET class libraries. The .NET lib is huge and has basically everything. The ASP.NET classes contain a vast amount of utility controls, and functionality like HTTP servers, I/O filters, logdaemons, and other such niceties for a server dev.
Now, on to the knocks. Hey, it wouldn’t be a Microsoft product without some serious flaws, right?
First up is Visual Studio.NET 2003. For 900 bucks I expect the HTML editor to work. Unfortunately, it sucks. They used the Frontpage HTML gen libraries! Remove the WYSIWYG form tools, and the big giant productivity gains go right out the window.
Next up, many of the supplied ASP.NET controls, especially the Datagrid, suck. There are numerous gaps in their functionality which essentially defeat their usefulness. Example – you cannot set a querystring with multiple parameters without resorting to mingling program code in template.
Finally, despite all the talk about ‘Managed Code’, many, many of the .NET classes are just wrappers around existing, sucky COM objects. Imagine my joy when I discovered that System.Web.Mail was really just good ol’ POS CDONTS in disguise.
In conclusion:
ASP.NET is an excellent package, and goes a long way towards redeeming Microsoft as a developer tools company. Yes, there are flaws, but the overwhelming sophistication of this toolkit is quite impressive. While it does compare favorably with other tools, it suffers from some key flaws, and a lack of platform portability. As always, your mileage may vary.
If you are a pro web dev, I would advise getting some familiarity with this toolkit – it’s going to be around for a while.