ASP, it’s not all bad.
ASP October 18th, 2006Joining Fish Media meant getting to grips with ASP at a commercial level. As some of you know, I’m not I wasn’t the greatest fan of ASP (given the other choices available; PHP/JSP). I felt ASP lacked the control, the speed, the complexity and depth of PHP. The fact it was developed by Microsoft and closed source also put me off. It seems I was wrong, in most cases.
In actual fact, ASP 3.0 isn’t all that bad. Perhaps it’s because I am a better programmer than I was 3 years ago…
My first large scale ASP project was to write a (re-usable) e-commerce web site with all sorts of advanced features. I have written it entirely in ASP, using MySQL v5.0 as a backend datasource. The best thing about the application is its built with search engine optimisation in mind - one thing that 99% of e-commerce sites fail to achieve; even Amazon - Jakob take note.
I researched quite extensively on ASP URL re-writing techniques - where PHP has its Apache mod-rewrite tricks, ASP/IIS seems to lack big time. Never fear, I came up with my own solution © CJ ASP SEO-Friendly URL 2006! Other SEO features include 1) making the site accessible to search engines (rule number 1), 2) structuring the site correctly, 3) usability, 4)…. I can’t give all my secrets away, jesus.
Technical geeks read on…ASP is such a basic language (and by language I should say VBScript); it’s when you start writing spaghetti code that it slows down. My tip of the day is to write clear, minimalistic code that gets to the point. Code that is called more than once, should be re-used and re-used effectively! Only one database and query needs to be instantiated at any one time (unless you are doing nested querying that is) - make them global to your procedures/functions and your pages will load so much quicker, I guarantee.
This is a great page that will show you how you can open/close/rewind/skip through/re-query/cancel/resync a query and much more: http://www.w3schools.com/ado/ado_ref_recordset.asp. I bet you didn’t even know you could do half of that with ADO Recordsets.
Leave a Reply
You must be logged in to post a comment.