We help IT Professionals succeed at work.

Delphi survey app on Windows server 2003 - advice re gotchas

Mutley2003 asked
Last Modified: 2010-04-05
I have to write an app to do surveys over the internet - like a "poll" but longer and more complex .. some questions are only asked if a person has answered yes to a previous question, there is a need to "paste" the response to one question into another, there would be maybe 10 "pages" per questionaire.

The traditional approach to this is to use PHP and people have probably already done what I want in PHP. But while I like PHP, I don't really want to become an expert in it .. talking to the boss, she agreed that we don't have to mount this on any and all servers so maybe I don't have to think Unix and maybe I don't have to use PHP and can do it in DELPHI!.

One problem. I have never done a Delphi server side app. I don't know anything about n-tier architecture or ASTA thin client stuff or web snap or anything much.  And anyway I don't have Enterprise editions, only Pro of D5/D6

I want to write the app locally to run locally and then go straight to the web to run on the server.

So what are the problems I need to look out for, and how do I solve them ?

1.  Stateless related stuff. OK,  I realize that I am going to get packets in from various people more or less at the one time and they represent different stages of progression through the questionnaire. OK, cannot this be solved by simply giving each person a unique respondent ID, then when you get an incoming packet look at the respondent ID, look up the record if any in the dbISAM database, update with what has been delivered, generate some new HTML?  I don't see the problem with this.. one EXE, managing "partial information" packets in a CGI sort of way

2.  Hmm, what happens if 2 or more people attempt to submit to the exe (cgi) at the same time ? .. does the OS take care of this?

3. Please don't tell me I need to install my data collection app as a service : I know nothing about services and don't want to know <g>

4.  If you want to be generous, give me some code or code skeleton or pseudo code that simulates a bunch of users pounding that Delphi server side exe, getting some stuff back, doing it all over again.

Or I will settle for some intelligent discussion that helps dispel my ignorance, but Code Rules OK!


Watch Question

Just a thought: may be completely useless to you, but still...
Why not have your application (ActiveX) run on the client system, create a file of data you collect (text, XML, binary: anything you like)? When the survey is over, the client can ftp the file back to your server.
So, if you name the file correctly, your app won't need to bother about multiple users submitting things at the same time.




hmm. interesting approach .. have all the logic run client side! I can see the cleanliness. I wonder how big the activeX would need to be and what the tradeoff is between a single big hit download and multiple hits at the server.

yeah, you have got me thinking. I wonder how this would work with non IE browsers ..of course it aint gunna run on non W32 platforms, but still..  

ok, thinking here .. thanks

ActiveX is windows IE only .. and there are a lot of security issues with activex so they're turned off by default
you can buy Intraweb separately and create an app with that
it can be a standalone normal app, a service, an ISAPI dll, ...

I'm using it and creating this kinda survey thing is real easy - like creating a normal app with forms
all the forms logic stays the same .. but you can have only one form visible at a time

you can also use templates so you have a webdesigner design the page layouts and stuff .. IW then just inserts the business logic into it :)


DragonSlayer .. no, should have mentioned D5/D6 only, and that reference was all about .net .. uggh

Lee, I looked at IntraWeb but apart from the price (899 euros), it seems more suited to I guess what I would call "static forms" .. you know, in the designer you shove a button here and a label there .. well, my survey app has to work with different surveys so essentially it is the changing html (ie different between apps, and different content generated within the one app depending on prior answers) that drives the content and appearance.

I had a quick look at Marco Cantu's discussion of WebBroker based stuff .. looks OK, but I did not really see how to handle session/state stuff .. mutters something about cookies..

So, where does WebSnap fit into all this .. is it a Borland upgrade to the WebBroker architecture or ??

OK, the next question is CGI or ISAPI. I don't understand how to install an ISAPI DLL at my host, and Cantu's book suggests that there are problems in unloading the DLL when you want to upgrade.

So, why not CGI .. should I care that my host is having to reload the app each time ?? I ASSUME that multiple copies get loaded if there are multiple requests.  It is not like there would be a big load .. maybe a few thousand hits per hour at max. Cantu sort of suggests that session/state issues can be handled by passing hidden form fields.. anything wrong with that?

Finally, ASP . Is that overkill for my app?

btw, I don't much care about databases server side. I think I can get by with some flat file/XML stuff.

More questions than answers, so far <g>

didn't know IW costed this much :)
I got it bundled with D7 Arch.
if you need anything more in the IntraWeb direction let me know ... I've also created a small ISAPI dll using webbroker .. long time ago and without any GUI :/
This one is on us!
(Get your first solution completely free - no credit card required)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.