I wrote my first ASP.NET program the other day. I was so amazed. Microsoft has made it unbelievably easy. Using all Microsoft tools, the steps were something like:
– open webserver to my ASP.NET ISP
– use their admin tool to “create a new Web Application”
– open Visual Studio.NET
– create a new project
– point it at my ISP
– create code.
It was so easy, I couldn’t believe it. You have to try it for yourself to believe me.
So I created a little subroutine which just detects whether .NET is installed on a client’s machine. Nothing magic about that, right?
Now, try to use that subroutine anywhere other than .NET!
.NET seems to take the approach that if you use ANY code to generate your web page, you should put the entire webpage into .NET code. I mean real code here – code that you have to compile before you can run it. This makes no sense to me and violates all principles of separating UI and code.
Example – if you’ve got some static HTML, why would you ever want to put the static HTML into code? Now, if you want to change a comma on your website, you’ve got to go to your web developer who knows how to build code to do it.
And most websites are made of a lot of static elements.
Most web pages end up being a collection of elements that are combined together. Each element may be created by a completely different source. For example, I may have a page which includes:
– a static HTML header
– a side menu created by a perl program
– a main content page created by ASP.NET
– a right-hand-sidebar contianing ads from a third party app
– a static footer
Now, how are you going to assemble these into a single page? Do you want to write code to do all this? Of course not. But the ONLY way to do it in .NET is to write .NET code to include it all. ACK! You can’t include “blobs” of ASP.NET from ASP!
ASP (like JSP) had simple HTML with callouts to code. This allowed for easy separation of UI and Code. And, I could hire web-designers rather than programmers to create 99% of that website and iterate on the UI. The programmers created code components which the web designers would “include”. Now, ASP.NET wants me to make the developer do all the work. In ASP.NET, you need to know how to open visual studio and WRITE CODE in order to spit out anything.
I like what they’ve done with ASP.NET. The integration with Visual Studio is astounding FOR DEVELOPERS.
But, unless you want to write code for every closing
- C# #define. Missing the easy stuff