I’m relatively new to asp.net, sure I’ve bought the fancy £30 books that tell you how to do it all, read them and vocally argued with them but I still have not cut my teeth on a juicy .net project.
Something I’ve been asked many times by people who are breaking into web development is this “Should I learn asp.net or asp? What’s the difference?”
My response is usually this. If you are learning from scratch then I would suggest you jump in at the deep end and look at .net, if you intend to make a career out of web development it will stand you in a much stronger position for jobs out there and could improve your wage by a signifacant amount.
That doesn’t outline what the main differences are between the two though and that is something I am going to try and clear up in this article.
ASP, or classic asp as it is now commonly known has served me well over the years, earning me some fun, high profile site credits to put on my CV.
For those of you that do not know what ASP is here s abrief overview:
Classic ASP (Active Server Pages) is a server side scripting technology developed by and for Microsoft platforms.
ASP 3.0 was the last version of classic ASP and is a free component with Windows 2000 that runs inside IIS (Internet Information Services).
If you have heard of other variations such as ChiliASP or InstantASP they are just different technologys that allow asp to run on NON windows operating systems.
ASP pages/files can contain HTML, XML and scripts.
Any ASP scripting is executed on the server.
For those of you new to web development this is what is meant when you see the words SERVER SIDE SCRIPTING.
An example of Client Side Scripting would be Javascript. (Something I’ll talk about in another article maybe).
ASP can dynamically edit, change or add content on a website, access databases and return results to the browser.
ASP code cannot be viewed from the browser which offers a limited amout of security. (very limited!)
I would say that there are few things that can’t be done using asp if you use it cleverly and learn all the available functions, however technology improves from day to day and prgramming has to move on too. That’s where ASP.net comes in.
Firstly understand this, ASP.net is NOT ASP.
It is an entirely new generation and technology of server side scripting. It is NOT an upgraded version of ASP.
It has been developed from scratch and has no compatibility with classic ASP.
But I’ve also seen something called ASP+ out there should I learn that or asp.net?
They are the same thing. ASP+ was a working title microsoft used when developing ASP.net there is no difference.
Put Simply ASP.NET works like this:
A browser requests a ASP.net file and so IIS passes the request on to the .NET engine sitting on the server.
the .NET engine reads the file line by line and executes any files that sit within the file, the ASP.NET file is then returned to the browser as standard HTML
Differences between asp and asp.net
ASP.net has much better language support and a wide range of new controls and xml support.
Because ASP.net code is compiled, it also offers much better performance than standard ASP.
Those of you from a Visual Basic background will be glad to hear that ASP.net supports full Visual Basic rather than the VBscript that ASP supported. (VBscript is a trimmed down, quite limited, version of Visual Basic.)
ASP.NET Controls
ASP.NET contains a large set of HTML controls. Almost all HTML elements on a page can be defined as ASP.NET control objects that can be controlled by scripts.
ASP.NET also contains a new set of object oriented input controls, like programmable list boxes and validation controls.
A new data grid control supports sorting, data paging, and everything you expect from a dataset control.
Event Aware Controls
All ASP.NET objects on a Web page can expose events that can be processed by ASP.NET code.
Load, Click and Change events handled by code makes coding much simpler and much better organized.
ASP.NET Components
ASP.NET components are heavily based on XML. Like the new AD Rotator, that uses XML to store advertisement information and configuration.
User Authentication
ASP.NET supports forms-based user authentication, including cookie management and automatic redirecting of unauthorized logins.
High Scalability
Much has been done with ASP.NET to provide greater scalability.
Server to server communication has been greatly enhanced, making it possible to scale an application over several servers. One example of this is the ability to run XML parsers, XSL transformations and even resource hungry session objects on other servers.
Compiled Code
The first request for an ASP.NET page on the server will compile the ASP.NET code and keep a cached copy in memory. The result of this is greatly increased performance.
Easy Configuration
Configuration of ASP.NET is done with plain text files.
Configuration files can be uploaded or changed while the application is running. No need to restart the server. No more metabase or registry puzzle.
Easy Deployment
No more server restart to deploy or replace compiled code. ASP.NET simply redirects all new requests to the new code.
Compatibility
ASP.NET is not fully compatible with earlier versions of ASP, so most of the old ASP code will need some changes to run under ASP.NET.
To overcome this problem, ASP.NET uses a new file extension “.aspx”. This will make ASP.NET applications able to run side by side with standard ASP applications on the same server.
So I hope that outlines the main differences between the two.
As I say I am still new to ASP.NET and learning daily but thankfully I was a VB user some years ago and it’s all coming back to me now!!!!
If you want to learn more about asp.net I can recommend the books:
Beginning ASP.NET using VB.NET from WROX and ASP.NET Developer’s Guide from Osborne.
Of course there are plenty of online resources and I always find a good starting place to be W3Schools.com