Forum Moderators: open

Message Too Old, No Replies

ASP.NET Pros and Cons

Making the transition from Classic ASP to .NET

         

pageoneresults

2:54 pm on Feb 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yikes! What did I get myself into? I decided a little while back to build a .NET ecommerce application for one of my clients. What I've seen so far has impressed me "visually" and "functionally".

What I've seen behind the scenes scares the hell out of me! I've never seen so much code in my life. Well, I have, but it was usually generated by a WYSIWYG program in the wrong hands.

Based on what I've gone through over the past few months, I'm not too certain I'll take the .NET route again. Not unless every single issue I've presented to the developers can be addressed. They've been able to address some of them, but others are not as easy to fix due to the way .NET works.

.NET is a programmers paradise.
.NET is an SEOs nightmare!

sgietz

11:40 pm on Mar 1, 2007 (gmt 0)

10+ Year Member



Well, you can set the title programmatically in a subroutine with "Page.Title = something." Although, I don't know if that would render with breaks, or not. Seems pretty trivial to me.

I do like the idea of using literals to generate meta tags. I need to try that myself ;o)

duckhunter

2:02 pm on Mar 2, 2007 (gmt 0)

10+ Year Member



This is a classic discussion between folks that know what they are doing with .NET and those that, well, don't. For those of you that say you can't make .NET do this or that, you're wrong. .NET will just about make the coffee in the morning if you know what you are doing.

I agree with those saying that producing your own HTML and code behinds are the only way to do it. The Drag/Drop controls are too messy and often produce very SEO-unfriendly results.

.NET isn't something you can just pickup and start producing database driven, URL friendly, dynamicly served pages in a weekend. .NET is a highly evolved, component oriented programming model that requires some basic knowledge of inheritence and writing code. Dreamweaver won't do it. Put some serious time into studying books and writing code and the Heaven's open wide with this stuff's capabilities.

I've been writing code in various languages for nearly 20 years and this stuff is 21st century cool. I am constantly amazed at the things it can do. Not to mention how freakin' fast it is when things are written correctly.

sgietz

7:12 pm on Mar 2, 2007 (gmt 0)

10+ Year Member



I agree with a lot duckhunter has said. If you know what you're doing, or have the drive to learn it, then the possibilities are virtually endless.

Yes, .NET makes it very easy to be sloppy. Drop a few controls here and there, and your HTML looks horrible. Take some time to read up on .NET. There is a plethora of information out there. I bet the MS programmers themselves don't know every little feature there is to know about .NET (everyone knows different bits and pieces). Once you accumulate more and more information, the .NET experience will become a great one.

In my job, I often find myself having to build "dirty" pages due to deadlines (unbelievably unrealistic deadlines!). To give you an example: I was asked (well, told) to build a local version of monster.com, geared toward local business/job seekers. They gave me about 2 weeks. And that's with 3 other projects converging at the same time in March. Lots of fun, in a sadistic, painful sort of way. So yea, I had to drop a few built-in controls on those pages to meet the deadline.

Here's the good news: .NET allowed me to throw together some functional pages, that can do some pretty nifty stuff in a short amount of time. I would love to spend more time on it and build my own custom controls to streamline the whole site. As I build more and more pages, I am starting to accumulate more and more logic, which I can wrap up in a class and stick in the App_Code folder, or compile into a dll. Each time, life gets a little easier and the pages look a little prettier. I go back many times in my spare time to smooth out pages to take real advantage of the OOP concept. Sure, I would love to get it done right the first time around, but no such luck with such unrealistic deadlines.

The point is, without .NET, I feel I would have little chance to accomplish even half of what I'm doing now. Granted, I sometimes have to take shortcuts, but being the only guy in the entire company who knows anything about websites -- and to put this in perspective: If all I knew what HTML spells out, I would still be a major guru among everyone else here -- I literally need to handle every aspect of every web related project. That leaves little time for perfection.

To wrap this all up, .NET is perfectly capable of outputting beautiful HTML. Just takes a little time and effort. But even when you don't have the time (effort should always be there), you can generate decent content. I'm not sure if .NET will ever be able to brew me a cup of Joe in the morning, but there is a ton of stuff you can do, if you take the time to learn it.

Easy_Coder

7:54 pm on Mar 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nicely put duckhunter... I agree. .Net can do just about whatever you the developer are capable of telling it to do. The learning curve is going to be very difficult if you don't have programming in your background.

pageoneresults

8:11 pm on Mar 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The learning curve is going to be very difficult if you don't have programming in your background.

Which makes it very difficult for someone like myself who learned classic asp the hard way, through trial and error. I have no programming background whatsoever. :(

But, I'm learning. In the past few days, I've picked up quite a bit through research, your guys/gals responses, etc. Keep em' coming!

The <title> element issue appears to be related to the default settings in Visual Studio which force a line break after the start element and before the closing element. Easily fixed...

AffiliateDreamer

8:35 pm on Mar 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have NEVER been a fan of ASP.NET's built in controls for displaying data. Sure they help you get your pages up and running, but when you require any sort of customizations it requires you to tap into the events of the control to override the default behavor (example: row color).

I love .NET, but I don't make use of the controls at all. I simply design my database, classes, DAL (data access layer) and business logic layer, break things out into seperate assemblies (dll's)and go from their. I weave my own HTML on my pages so I don't have to worry about all this control generated nonsense.

Its funny, when you scan message boards there you will find a *ton* of questions on people trying to customize the gridview etc etc. I have been coding .NET since it was release and I don't even know how to use most of the built-in data display controls.

[edited by: AffiliateDreamer at 8:37 pm (utc) on Mar. 2, 2007]

centime

11:22 pm on Mar 2, 2007 (gmt 0)

10+ Year Member



Hmmm,

You might find that to some extent, you're reinventing the wheel,

Having said that, I have to spend quite a bit of time researching the available features of ASP.net,

I often find myself then thinking in terms of what I know is possible an manipulating the features to achieve the desired outcome, this only became feasable once I committed to learning the .net model in detail

aleksl

4:27 am on Mar 3, 2007 (gmt 0)



You classic ASP guys remind me of the COBOL programmers that we have here for our legacy systems. Sure, COBOL & Classic ASP will be around forever, but I personally wouldn't want to be stuck doing your work.

Actually take some time to learn object oriented/event driven programming

As funny as it sounds...
I've done COBOL in the past. Assembler too.

It is not about "time to learn". I've learnt my share of object-oriented languages. Now I hire programmers, my time costs more than what I pay for development. It is not that, and I hope "me the cool programmer" guys understand this eventually...it is not only a cost and coolness of development, but of maintenance...and cost of maintaining a site - typically - IS MUCH HIGHER than of original development. So as a business, I don't care how "cool" it is and "what great object-oriented paradigms you can build with it"...if it doesn't work and cost an arm and a leg in rework. And in my experience, .NET is constant rework.

Maybe eventually I'll find some genius .NET guy who can build this stuff properly and to last...but no luck yet

JMHO

txbakers

4:10 pm on Mar 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am put off by the constant upgrading of the framework.

I started tinkering with .NET when it first came out, and had some facility with it, but had to keep generating revenue, so stuck with ASP for real projects. Then, 2.0 was on the horizon so I waited. Now that I'm getting ready to start again, 3.0 is on the horizon! It hasn't been that long, and I'm certainly glad I didn't invest a ton of time designing apps in 1.0

I was also put off by the rigidity of the controls. Granted, I 'll concede that I don't know enough to be critical, but in classic ASP I could run my query and grab any field and display it with one command.

With .NET it was such a chore to get a handle on the one item I needed to display! I found that my .aspx files were beginning to look more and more like my .asp files and I said, "What's the point then?"

But, I'm open minded enough to know that the future moves forward and we keep learning about it.

TheNige

9:05 pm on Mar 5, 2007 (gmt 0)

10+ Year Member



There have been 3 "ASP.Net" framework releases: 1.0, 1.1, and 2.0. .Net 3.0 is marketing speak as it didn't change or add anything to the ASP.Net feature list. 3.0 used to be called WinFX which is mainly graphical tools for Windows Forms. 3.0's new features really just sit on top of the 2.0 framework for the most part.

The change from 1.0 to 1.1 was mainly just a service pack and had a few language upgrades. 2.0 was bigger and was a big leap in terms of functionality and resources over 1.1. Upgrading an application from 1.1 to 2.0 can be done pretty painlessly.

They should have changed the name from ASP to something like Web.Net....that way we wouldn't be having this conversation.


It is not about "time to learn". I've learnt my share of object-oriented languages. Now I hire programmers, my time costs more than what I pay for development. It is not that, and I hope "me the cool programmer" guys understand this eventually...it is not only a cost and coolness of development, but of maintenance...and cost of maintaining a site - typically - IS MUCH HIGHER than of original development. So as a business, I don't care how "cool" it is and "what great object-oriented paradigms you can build with it"...if it doesn't work and cost an arm and a leg in rework. And in my experience, .NET is constant rework.

Maybe eventually I'll find some genius .NET guy who can build this stuff properly and to last...but no luck yet

The problem usually isn't the .Net developer, Java developer, PHP developer, or the classic ASP developer. It is the whole project team and process that it follows that determines if a project is going to function as it is supposed to. If you just give a developer a 1 page spec and say I need this in 2 weeks, then you are going to get a product that will needs constant rework, no matter what technology you are using. The developer is just part of the puzzle.

Provide a developer with detailed business requirements, scope, functional specs, and tech specs and you'll get a product that delivers what it is speced out to do (in most cases).

[edited by: TheNige at 9:16 pm (utc) on Mar. 5, 2007]

moopy

12:39 pm on Mar 7, 2007 (gmt 0)

10+ Year Member



So... URL Rewriting is easy in ASP.NET?

I tried and it made life very complicated for me. I would really appreciate an easy solution.

Anyone?

aleksl

1:55 pm on Mar 7, 2007 (gmt 0)



Provide a developer with detailed business requirements, scope, functional specs, and tech specs

:)
herein lies a problem, had we known exactly what needs to be build, there would be an exact technical spec written. But it will be given to a $10/hour developer instead of a $50/hr, 'cause even a dummy can build something from a precise technical spec. But the topic is called "making a transition", which means that the original party is not familiar with the intimate parts of .NET yet.

URL Rewriting is easy in ASP.NET?

Trivial, google it.

TheNige

8:37 pm on Mar 9, 2007 (gmt 0)

10+ Year Member



Tech spec isn't even the most important. A non-technical person can create a great functional spec that details everything about the applicaiton and what it is supposed to do exactly.

Tech specs are derived from that. And yeah, letting a $10 hour person do the tech specs probably isn't that good of an idea.

pageoneresults

9:07 pm on Mar 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Trivial, google it.

While trivial for some, it is a monumental task for many. I've seen rewrites that looked fine on the surface but once you started drilling down, it was a mess. While some of us have the advantage of saying it is trivial (but it isn't), others are not so fortunate. Heck the first step of finding a host to install ISAPI_Rewrite may be difficult for many.

It appears that .NET rewriting capabilities are limited and somewhat clunky. While sufficient for some, not so for others.

Is there something with the .NET rewriting that I'm missing? Does it function the same as ISAPI_Rewrite? Do you have "complete" control over the URI structure? Header responses, etc.?

I know from working with the ISAPI_Rewrite filters, we are able to insert one or two rules to handle thousands of exceptions. Two lines of code compared to the .NET equivalent which appears to be a few blocks of code?

I'm guessing that it all comes down to the person configuring the rewrite? Heck, I look back there and think, "now that's rocket science". But for some, its trivial. ;)

aleksl

12:39 am on Mar 10, 2007 (gmt 0)



pageoneresults, I guess it did come out as a bit snobby...and indeed, creating a good rewriter isn't trivial.

Ok, here's what we are using, this has been built into a commercial software that we bought and works quite well, that's why I don't show all code (or exact code). It is very similar to ISAPI_Rewrite in capabilities, and the sky is the limit what it can potentially do. You don't need to have ISAPI_Rewrite on the server, it is pure .NET. But - figure missing details yourself though.

At least this is the bulk of my understanding how it works (I can be somewhat off base on the details) :

1. Create a public class - call it URLRewriter or something - that overwrites IConfigurationSectionHandler (err...yeah, I guess this is where it gets non-trivial, show this to a .NET programmer). This is where you are going to use Regular Expressions (Regex) to execute rules.

2. In web.config (this is a config file in root folder) create separate XML node to handle rules. For instance:


<system.web>
<pages validateRequest="true"/>
<urlrewrites>
<rule>
<url>/somepage-(.*)\.aspx(?:\?(.*))?</url>
<rewrite>/someotherpage.aspx?Param1=$1&amp;$2</rewrite>
</rule>
...more rules
</urlrewrites>
</system.web>

Basically, "url" is what you pass to Regex, and "rewrite" is your match pattern.

3. Overwrite Application_BeginRequest() function in Global.asax.cs, call your URLRewriter from there. If any rules where executed, do a server redirect to execute different page with call to:
HttpContext.Current.RewritePath(NewURL)

Something of that extend works real well. If you are really lost, give this to someone on Rentacoder - see "Outsourcing" thread [webmasterworld.com...]
someone should be able to finish it pretty quickly.

Basically, proves my point that making transition to .NET is not a walk in the park.

pageoneresults

8:39 am on Mar 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Why must I have to place a &nbsp; between two adjoining elements to obtain a space? Why? There are non-breaking spaces all over the place. It was like this in classic asp too.

aleksl, we're getting ready to do the rewrite implementation now. I'll let you know how that turns out. We're looking to ISAPI_Rewrite to handle the entire process but there is talk of using the .NET facilities in addition to ISAPI_Rewrite.

brucec

11:38 pm on Mar 24, 2007 (gmt 0)

10+ Year Member



I will admit that I also have trouble getting into ASP.NET from classic ASP. I prefer classic ASP, but am starting to realize that ASP.NET 2.0 is worth it. I did not think ASP.NET 1.0/1.1 was better than Classic ASP and maybe that is why I avoided it for so long.

Now, ASP.NET 2.0 is AMAZING! Master Pages, Skins, Web Parts, just blows away ASP.NET. 1.0.

When you see how LESS coding you will be doing in .NET 2.0 as compared to .NET 1.0 or classic ASP, there is just no turning back.

This thread is getting too large. I am starting a new conversation.
Bruce

RossWal

4:28 pm on Mar 28, 2007 (gmt 0)

10+ Year Member



I'll let you know how that turns out. We're looking to ISAPI_Rewrite to handle the entire process but there is talk of using the .NET facilities in addition to ISAPI_Rewrite.

Pageone, can you comment on:

A) Why you would consider ISAPI_Rewrite for the entire process vs. net for the entire process
B) What would cause you to use both ISAPI_Rewrite and the .NET facilities?

Thanks

PS I wasn't sure whether to post here or follow the thread split

pageoneresults

4:36 pm on Mar 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



A) Why you would consider ISAPI_Rewrite for the entire process vs. net for the entire process.

Based on what I'm seeing so far, the .NET facilities are somewhat limited. I really can't make any definitive comments yet.

Also, I've been working with ISAPI_Rewrite for years and so have my team members. It is the Windows equivalent to mod_rewrite. I don't think the .NET facilities are going to give me the wide range of options that ISAPI_Rewrite will.

B) What would cause you to use both ISAPI_Rewrite and the .NET facilities?

Maybe a performance based decision? I'd have to see what the pros and cons are of working in an environment like that. But, from what I understand so far, we're going to utilize ISAPI_Rewrite for the entire process along with IIS. ;)

pageoneresults

3:05 pm on Apr 4, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hmmm, ASP.NET has some killer link obfuscation methods...

<span class="but"><a id="ctl00_ContentPlaceHolder1_UcProductList1_DataListProduct_ctl00_lnkAdd2Cart" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$UcProductList1$DataListProduct$ctl00$lnkAdd2Cart','')">Item Details</a></span>

That should keep the bots from getting in there and duplicating my content. At least I don't have to worry about my sort links getting indexed. ;)

This 50 message thread spans 2 pages: 50