Entry for January 29, 2007
Understanding ASP
www.w3schools.com
This is your one stop at learning about asp. But why do I want to talk about asp today? What is so great with asp? I chose to answer these questions when I finally looked at the requirements for a software support post in my current company (allsec). I never had the experience with asp, but I wanted to find out...
ASP - Active Server Pages. In my own words they are scripts that give pages dynamic content. It does not mean content that moves around, rather content that is updated to reflected the new changes. What changes? Changes in data. This data could be lying in the server (such as server time, free memory) or in a remote database. What I find great about it is that you embed asp script along with your html document, and when that script is being executed by a server (usually an IIS server) the output is pure HTML. But however not in all cases. It can also be used to load java applets, activex components, etc.
And another significant thing is that you can interact with components. Components provide specific functionality. Like for e.g. in a banking site, you can call a component in you asp script that validates the customer account number. Components can be developed in languages such as vb, c++ or java; but regardless of which language they are built they perform their respected service, i.e. the service for which that component was designed for. Theoretically the component can look the same but it can implement different services. All thanks to a new philosophy or a software paradgim called object-oreinted design.
But as I looked deep into asp I wondered how it worked. You can actually build websites with it! I suppose these asp scripts lie inside the server. When a browser makes a request to that particular page, the script is executed, and html output (as is the normal case) is created and sent to the browser. So if you tried to view the source of the page, you won't see any asp code; you'll see only html.
Till here it was interesting. But where is the web server? And when you create asp pages what do you run it on? Where do you store it?
This is where the IIS comes to play. Internet Information Server/Services. I guess it can be defined as software that gives http-server like capability to your windows operating system. It can let ur os behave like a server over an intranet. And if you didn't know there is probably already one that is in your os!
I initially thought it was a web server. But if it was, how do you test and run asp scripts sitting at a remote terminal? Are you actually sending the asp script via your browser to the server? No. I guess like html pages you've to upload these scripts to that server. Like I said, the IIS give s your os a server-like capability. This means you can execute asp scripts from you remote terminal that is not connected to the internet.
But that leaves us a question to ask, doesn't it?
If you've developed asp applications in your system; you are eventually going to upload it to a web server that is not your system. So what makes you think that the asp application you wrote will work there...?
If your asp application happens to work, remember that that server is IIS-enabled. Yes web servers have to IIS-enabled to actually process asp scripts.
I have delibrately not discussed how you can make asp scripts and run them in your system itself. I guess in any windows version after 95 has the a version of the IIS built into them. The asp support for IIS came during its 3.0 release (i.e. in iis 3.0). From then on both iis and asp are shipped as one package. Remember both of these things are MS products.
When I had set out to learn asp my self, I had sun into simple problems. But things that I've discussed above have helped me in trying to understand what asp is, without even getting to use asp! For those who serious about working with asp, I've told you this much, haven't I?