Why people Choose Asp.net over classic Asp

My freelance programmer used classic asp to develop my website. According to him, everything (database, functioning) will be the same even if he used asp.net?
So, what’s the drawback of classic ASP?

The only drawback to using classis asp over asp.net is that with classis asp you might have to download components to do things that asp.net has built in, such as uploading and image generating.

Thanks for the info. So, it will add troublesomes to web developer but not affecting quality & performance of a website?
I have little IT knowledge. My apology if the question sound silly. :stuck_out_tongue:

It won’t add any problems unless what you are trying to do is too advanced for ASP.

I still code in Classic ASP and I get around just fine doing all the things I need to do. www.iportalx.net for example and [URL=http://www.iportalx.net/chat]www.iportalx.net/chat for example.

The limitation is only in the coding skills of who is developing it.

The other problems with classic ASP are:

  1. You cannot debug the project. You have to figure out error messages based on cryptic messages and line numbers and don’t have a robust debugging tool.

  2. Classic ASP pages are interpreted every time they’re viewed with a browser. This, unlike ASP.NET in which the pages are actually compiled into objects, can make for performance issues in high traffic or very intensive logic.

  3. There is a lot more code that you have to write with Classic ASP for database manipulation and returning data to the page… In ASP.NET a lot more functionality has been included for ease of database development.

-Niardica

TAKE NOTE; The advantages of .net are far more

ASP is a mere scripting language that is like a text file read off by the webserver.

.net is a framework, it has far more advantages, though i still code in asp. Its a totally new ballgame, and i wont compare it to ASP.

As niardica said, its compiled to IL code, which makes it far much faster and efficient than ASP. Then again, once its compiled, no one can see your source codes as it is with ASP scripts

It has other things, like memory management. Which is a real big issue esp with multiple transactions/high traffic

Hope u understand better ?

The only problem with ASP vs ASP.NET is that ASP is deprecated and won’t be around for too long.
As we saw 3 or 4 years ago, Microsoft has no problem of dropping support for 6 million developers. Talking about Visual Basic here.

Debugging tools are great for complex alghorithms, and indispensable when working with multiple threads.
But for average web applications where logic is simple enough, and ussualy it is, you guys should read about Test Driven Development because there is no debugger as efficient.

Although a good point vs ASP, experience tells me that the main bottleneck of almost all web applications are network bandwitdh and database access.
And whenever you have intensive alghoritms to execute in ASP, although it is hardly the case, you can always use COM objects.

I wouldn’t say that.
ADO.NET is much harder to use than clasic ADO.
The only gains you get here is on quick data binding that you can do between datasets and asp.net components.
But other than that, I watched grown men cry when they had to switch :wink:

It should mean less code. Should mean better performance. Should mean more manageable apps.

But, “should” isn’t always the real world. The longer answer is that if you’re paying someone to develop a site NOW, it’s far better to do it with ASP.NET, because that is what the world is moving to, and finding people to fix an ASP site will only get harder with time.

Hell, I used to program in ASP full time, and I probably couldn’t do a simple shopping cart these days.

I totally agree with Bonefry.

If you know how to code (instead of using dumb programs like Dreamweaver that code for you) debugging is simple and not hard at all. The error messages that ASP/IIS provide are plenty enough to find your errors and actually do tell you where the error message is and what is causing it.

I have to disagre. I find .NET to have a lot more code into doing a simple database listing/call. But i do agree on .Net being faster since it is cached into IIS.

If you have any more complex logic other than simple, top-down, non object oriented, non-COM then you’re wrong, have you not ever gotten the notorious CreateObject Failed, type messages?

again, I’m sorry but here is some proof. Obviously this is just a very simple example and there may be something that I’m leaving out, as I’m typing this directly into the reply box, but it seems clear to me.

C# ASP.NET populating a simple DataGrid


 <!-- aspx page -->
 <ASP:DataGrid id="myGrid" runat="server" AutoGenerateColumns="true" />
 <!-- /aspx page -->
 
 SqlConnection con = new SqlConnection(dsn);
 SqlCommand cmd = con.CreateCommand();
 cmd.CommandText = "SELECT * FROM foo";
 myGrid.DataSource = cmd.ExecuteReader();
 myGrid.DataBind();
 

… and if you’ve taken the time to create a good DataAccess layer for your application then you’re going to have even less code.


 SqlDataAccess sda = new SqlDataAccess(dsn);
 sda.createCommand("SELECT cust_name FROM foo");
 myGrid.DataSource = sda.ExecuteReader();
 myGrid.DataBind();
 

Classic ASP (again not OO all procedural)


 <%
 set cnx = Server.CreateObject("ADODB.Connection")
 cnx.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Blah"
 set rs = Server.CreateObject("ADODB.Recordset")
 rs.Open "SELECT cust_name FROM foo", cnx, adOpenStatic, adLockReadOnly
 %>
 
 <table>
 <tr><th>Customer Name</th></tr>
 <%
 dim ostr
 do while not rs.EOF
 ostr = "<tr><td>"
 ostr = ostr & rs("cust_name")
 ostr = ostr & "</td></tr>"
 response.write(ostr)
 rs.movenext
 loop
 %>
 </table>
 

-Niardica

If you have any more complex logic other than simple, top-down, non object oriented, non-COM then you’re wrong, have you not ever gotten the notorious CreateObject Failed, type messages?
If you know what you are coding then the CreateObject errors are not a problem. If you have a memory span of 2 minutes and forget what component you are coding for then i can see how this would be a problem.

I have been coding asp for over 5 years and it is not hard to find errors and fix them.

Something else that i have about ASP.Net is there is a LOT more coding to get a decent design into a website. With ASP it is really easy to code your design into it. With ASP.NET you have to basicly forget all about HTML and learn .Net. Makes it much harder to learn and harder to design your website.

Well, one benefit of using ASP and PHP over ASP.NET is that it is NOT compiled.

I’m not sure if its a requirement, but I paid for some web apps to be designed and even though I asked for ASP, I received ASP.NET… compiled!!! That means that I cannot edit it and make changes myself since I don’t have an ASP.NET Editor and Compiler. And worse, the web designer didn’t give me the original code, which meant I could’t change it and recompile it myself even if I wanted to. With ASP and PHP, I can whip out a text editor if I want and make changes to the code. Because of that I have had to rewrite all the ASP.NET code they wrote for me into either ASP or PHP, which is something I can modify myself without an ASP.NET compiler.

Plus there was the fact that ASP and ASP.NET weren’t playing well together (e.g. I would have to maintain multiple includes that did the same thing because the ASP navigation includes for the rest of the website wouldn’t work with the ASP.NET pages the developer created.) {After all, I did ask for ASP since the rest of the website was in ASP.}

I prefer ASP or PHP over ASP.NET, especially when I am paying for coding to be done. With it being in ASP, I can customize it and integrate it into my website because the source code is included. With ASP.NET I’m basically screwed if I want to change it because I am not allowed to since I don’t have the source code.

ASP.NET is good for professional web developers who want to prevent you from changing the code, in order to force you to pay them for changes. Or forcing you to accept whatever they offer (i.e. you can’t ask Microsoft to change Microsoft Word just for you no matter how much you pay them).

ASP and PHP are good for webmasters who want to modify the original code of the script they purchased or who want to build upon a good script to create something unique, and not have to pay a developer to do simple changes they can do themselves for free.

If you are a webmaster who is a programmer out of necessity and/or who builds things off of existing scripts (i.e. use them as a base and create something better or integrate with other scripts), then ASP or PHP is preferred. Never buy an ASP.NET program from someone unless they give you the source and you are capable of changing it.

If you are a professional programmer who wants to make sure your clients depend on you for every little change, then ASP.NET is the way to go, since your clients will be helpless without you. Until they decide to just build it themselves in something they can actually modify.

So, in the end, whether ASP or ASP.NET is better depends on where you are on the food chain. The consumer of scripts or the creator of scripts.

ASP.NET basically tries to turn what used to be uncompiled script-based web pages that could easily be changed by the webmaster into compiled software that the webmaster cannot modify.

WisTex - you can change the design of an ASPX page all you want and not have to re-compile…

As long as you’re not changing the names of server side controls, etc you can change the design around in your text editor all you want and just save it again…

The page will get re-compiled/cached the next time it’s visited.

True. But you are limited to mostly cosmetic things in the ASPX page, right? How the data is displayed. You cannot change the compiled stuff unless you pay the developer more money, correct? So simple changes like changing the sort order from ASC to DESC or adding a field to the database would cost money.

Obviously you wouldn’t have to deal with this if you were writing code your yourself, but that is what a client would have to go through.

I don’t know have any experience with .NET personally but what I’ve heard from those who have is that they have a hard time getting it to produce standards-compliant code. Is that the case?

I believe that is why VB.NET is around. Yes, it is a lot different because you aree now interacting with a framework, but the syntax is exactly the same. I believe VB.NET was created to help get those 6 million developers moved over more easily.

ADO.NET is much harder to use than clasic ADO.
The only gains you get here is on quick data binding that you can do between datasets and asp.net components.
But other than that, I watched grown men cry when they had to switch :wink:

Databinding is one of the best features… no doubt about that.

No. ASP.NET 2.0 is a lot better about standards-compliant markup.

Classic ASP makes me cry. Who in the world actually enjoys writing serverside code in VBScript? :frowning:

I received ASP.NET… compiled!!!
No wait a minute. ASP used with .NET is still a scripted language, isn’t it? It should be compiled on the fly when it is used the first time and held in memory until some garbage clean up comes along. Isn’t that true? I was not aware you could supply a compiled version of asp.net code but I really don’t mess with this since I looked into it last year.

Threads like this with so much misinformation make baby jesus cry.