Fog Creek Software
Discussion Board




ASP Basics

My company wants to do something using ASP and figures that I can do things in ASP on the client side.

This runs counter to what meager ASP knowledge I posess, which is that ASP is just a scripting language that spits back regular HTML pages at the browser, as you would do if you wrote a Perl or PHP script that returned text to the browser and thus could not do anything itself on the client; things other then ASP would have to do that.

Am I completely misunderstanding ASP? Can it actually interact with the browser?

Alai
Friday, July 11, 2003

That much is true before some of the changes made to Internet Explorer. There are now some new enhancements available in the newer IEs call HTML Applications which essentially allows you to write desktop applications using VBScript. They are like WSH Scripts, but prettier (I'll take HTML pages over MsgBox anyday). And in mapping with ASP, you'll be able to use client-side ADO libraries, client-side components, and the only way to talk to the server is GETs POSTs of FORM submits or XML-RPC/SOAP.

IBM has a project called Sash.

Li-fan Chen
Friday, July 11, 2003

Will HTML Applications and VBScript work on different OSs? ie Mac, Mozilla under Linux, etc.?

Alai
Friday, July 11, 2003

ASP pages may contain JavaScript, which runs in the end-user's browser.

Christopher Wells
Friday, July 11, 2003

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/hta/hta_node_entry.asp

Li-fan Chen
Friday, July 11, 2003

Yeah, you can create HTML pages that has Javascript code embedded (or included in a separate web fetch). Doing this allows the javascript (javascript if you want platform neutrality) to run client-side when the page is loaded. Then hopefully you can use the clien-side javascript to talk back to the ASP.

Li-fan Chen
Friday, July 11, 2003

HTML Applications (HTA) and Sash are platform specific. Sash is windows. HTA is which ever platform you can find that has a version of IE 5.0+ with HTA implemented.

Li-fan Chen
Friday, July 11, 2003

I dont no anything about it, but Ive heard that XUL might do what you want. Though youd have to write in Javascript, not vbs.

Eric DeBois
Friday, July 11, 2003

Then again, maybe not. You were not looking for a widget set were you? :D

Eric DeBois
Friday, July 11, 2003

I think it's time somebody asked why your company wants to do something with ASP. You make it sound like it's for the sake of using ASP, which is hopefully not true.

ASP is platform-centric, which means that you appear to be willing to bind yourself to a platform. Have you considered which other options you have, given that you've chosen Windows as your platform? What I don't understand is why you would want to program an application in HTML using a scripting language when you can use a real programming language that provides a rich user interface.

Just wondering.

Big B
Friday, July 11, 2003

Alai,

You can also Run ASP pages on localhost if Personal Web Server is installed.

However, there are some limitations on this:  PWS isn't available for XP home, for example (this really screwed us at work a while ago).

If you want cross platform you can use PHP and Xitami for a low impact solution.

However, I'd say that if your working on the client, there are much better solutions.

Ged Byrnbe
Friday, July 11, 2003

It seems that we're using ASP because someone at the top threw it out as a buzzword.

I get the sense that what they really want is a way to have our application be cross platform, which would naturally suggest Java to me, however, Java was ruled out.

Alai
Friday, July 11, 2003

If you can save yourself some time and skip to ASP.NET instead. It's well worth it in terms of ease of use and power over regular ASP. Also it's easier (and cheaper) to program in if you do not have Visual Studio. If you have an IIS server you can install the .NET redistributable on it and have simple tutorial apps running on it in no time. You can compile code with the free .NET SDK and design pages using WebMatrix or use the SharpDevelop IDE (both also free).

Justin K.
Friday, July 11, 2003

Alai: dear Lord, I certainly hope that's not the case.  It's like a garage shop where the mechanics are standing around an open engine and arguing amongst themselves: "Let's use a wrench!  I've never seen one but I heard they are really useful",  "No, what we need is a screwdriver, I used a screwdriver when I was fixing my VCR and it should be the same",  "You guys are all nuts ... if you want power, you need to use a hammer ... everybody knows that ..."

Lemme help you out (and I won't even charge my usual $200/hr consulting fee =-) ... can you give me a little bit of background what your project is, and why your company thinks it should be "cross-platform"?

Alyosha`
Friday, July 11, 2003

You can't have a program download onto your hard drive and have it run out of the box regardless of platform. The closest this came (with the ease of javascript for Mac and Windows) is probably Flash. And even with that you probably had to create two executables. To have a program compile to all platforms requires you to use platform neutual apis..for example Python will probably let you do that. So what you do is compile Python for each platform, and learn how to distribute each all-in-one-executable using some installshield software you know.

Java is close though, basically, you can't do this project without Java. But if none of your customers uses UNIXes, you really don't have to use Java.

Li-fan Chen
Friday, July 11, 2003

Alai -- I don't see anything wrong with using ASP to build a platform independent web application (even though ASP.NET would probably be preferable).  You'll be able to run the app in anything with a browser as long as you don't create browser-specific html.  ASP is very similar to PHP, which it sounds like you have had some experience with.

Only thing I can't understand is why your company would want you to "do things in ASP on the client side."  As with PHP, most of the nitty-gritty stuff (i.e., the real application) is done server-side.

What is it, exactly, that they want you to do on the client side?  Most of the client-side programming with ASP is done using JavaScript (although there is a little-used ability to use VBScript).  But most of it is also done just to prettify things or give them a better user interface.  The basic functionality will come from the server-side scripts.  Client-side stuff will just give you a better UI, and is not usually necessary.

Herbert Sitz
Friday, July 11, 2003

> Client-side stuff will just give you a better UI, and is not usually necessary.

How about CGI form validation?

The more you put in the client side, the less work your servers has to do, ergo the more clients per server you can handle. QED

I suppose that this would only apply to huge websites.

--
ee

eclectic_echidna
Friday, July 11, 2003

It sounds like I'm a zealot, but I'd really worry about using client-side validation to reduce load on the servers - in my opinion (ymmv), I'd trust the client as far as I can throw it.  If I validate on the server, then I know whether what I'm getting from the client is valid or not.  If I validated on the client, I'd have to trust it.  Why should I trust the client?

Of course there's a position where security and pragmatics meet, but I'd be extremely wary of blindly accepting whatever I got fired back from the client and hoping it would work as I had originally intended.

Konrad
Friday, July 11, 2003

We should all be zealots when it comes to developing secure public web sites!

Indeed, data should be validated on the client AND the server -- on the client for performance and on the server for security.

Eric

Eric Lippert
Friday, July 11, 2003

*  Recent Topics

*  Fog Creek Home