Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
User Journal

Journal Spinlock_1977's Journal: ASP vrs. PHP

I've written applications in both - and here's a difference no one talks about. When you open up MS's ASP environment, all that great GUI stuff is there and it's pretty easy to get going. Then as often happens in a development environment, you need a quick script to munge a long list of field names. Is ASP your first choice? It wasn't mine, because I couldn't find a way to get input into/out of it from the command line. So I whipped up a temporary web page with a text box to do it. More overhead than I wanted to spend for what should be a 2 minute job given an editor with macro key abilities.

Then a couple of years later I built my first app in PHP. The first thing I noticed was how easy it was to script from the command line. Since I'm not a perl junkie, it was real useful for small scripting jobs. I'd use a shell language for this, but fankly, I'd rather poke a fork in my eyes.

The next thing I noticed in PHP was I needed an modern editor (the free download doesn't come with an IDE), so I bought one from zend.com for a couple of hundred bucks. It's getting better, but like ASP, it too has no macro key ability (maybe I'm wrong and someone will tell me?), and other nits I'd pick given the chance.

But the big discovery in PHP was that all my ASP data-type problems magically went away. Hours and freaking hours I spent debugging situations where an int was returned from a DLL and ASP string'ed it, or vice versa. There were byref/byval issues I recall as well. We had to build test local harnesses for all our middle tier ASP components because these problems rendered ASP too lame for a debugging platform.

But my original point is really that PHP is useful along a continium of the problem space. Need a quick script? Need a nightly job that cleans up your app? Need web pages? PHP works well for all. ASP, from my experience, hits one for three.

I've noticed several design suggestions in your code.

Working...