Solved

Getting a Windows (Delphi) program to run on a website...

Posted on 2011-03-20
17
272 Views
Last Modified: 2012-05-11
Hi, I've written a stock analysis software and instead of selling individual copies outright (as most people do), I would like to have it 'pay-per-use' over a website. It's a Windows program written in Delphi, that basically runs one big 'batch job' on the data of 3500 stocks and spits out recommendations. Ideally I'd like to have my software sitting on a server somewhere, the customer comes to my website, makes a small payment of a few dollars to Paypal (or some other payment processor), then gets access to my program over the web so he can run his one-time batch job analysis. Then when he's done, he logs out (or his allotted time expires and he gets logged out). And that's it.

So basically my first hurdle is - how can I run my Delphi program through a website? Maybe it's not even possible? Then once I can solve that, would look for a way to handle the "pay-per-use" side of it.

Thanks!
    Shawn

0
Comment
Question by:shawn226
  • 6
  • 3
  • 2
  • +3
17 Comments
 
LVL 19

Expert Comment

by:Thommy
ID: 35176942
I suggest using a web service to make your application accessible over the internet.

Building a Web Service from Scratch with Delphi
http://www.devarticles.com/c/a/Delphi-Kylix/Building-a-Web-Service-from-Scratch-with-Delphi/

You can either implement your functionality directly into the web service server application or make a call to your Windows program...
0
 

Author Comment

by:shawn226
ID: 35177146
Thanks Thommy, but I haven't a clue on how to do this or where to start. Briefly looking at that link and I was totally lost.
   Do I just basically take my existing Delphi program and add a few commands to it? Or do I have to totally write my program over again in a different programming language?

Shawn
0
 
LVL 24

Accepted Solution

by:
jimyX earned 125 total points
ID: 35178284
>   "how can I run my Delphi program through a website?"
Here comes the wonderful world of the Intraweb:
http://www.atozed.com/intraweb/index.en.aspx

For simple example:
http://www.swissdelphicenter.ch/en/showarticle.php?id=6

And you can find many examples & demos on the web about working with IntraWeb.
This link will get you started:
http://delphi.about.com/od/intraweb/IntraWeb_RAD_Web_Delphi_development.htm

And let's not forget Dr.bob's:
http://www.drbob42.com/examines/examin48.htm
0
 
LVL 19

Expert Comment

by:Thommy
ID: 35178629
There is no getting around to familiarize with web development, if you want to make your application available over the internet!!!

You do not have to use a different programming language, but you have to rewrite your program as a web application, which meets the demands of the internet.

jimyX has provided a good collection of links for starting your career as a Delphi web developer...
0
 
LVL 36

Expert Comment

by:Geert Gruwez
ID: 35178674
i would consider what your app actually does first,
before even thinking about the web

from what you say: a stock analysis program

from what i know about something like that:
1: start program
2: get access to the database
3: get the data
4: run tool for analysis
5: create report

now let's get into detail about each item
1:
you control when you start this program
you will have to automate each step if you want this done over the web
probably also provide 24/7 support as the web is wordwide

2:
99% of your customers will not want something from on the web have access to the database
especially if they don't know what it's gonna do
which databases will you support ?
oracle, interbase, firebird, dbase, paradox, mssql, banyan vines, teradata, msaccess, ... etc

3:
again 99% will not trust anything from the web
> alternative: upload all the data into your site
> this means that you will have to provide the necessary space to store their data
> i hope you are very succesfull, and that you provide enough space for at least 10 customers a day
> also keep in mind that once they paid, they will want you to maintain a history for them to access every 6 or 12 months

4:
you control this too, the more customers you have, the more processor power you'll need :)

5:
pdf reports or even html reports are easy to make

i believe your most crucial point:
getting to the data
* having people trust you and let you in
or
* having them upload the data to you

if you can get them to upload the data, you wouldn't need to change your app at all
just build a framework around it to get the data and deliver the report back out
if i were you, i would try to get this to work first
0
 
LVL 32

Expert Comment

by:ewangoya
ID: 35180827
Nice one Geert

On top of that you can always change bits of your applications to DLL's so you dont have to write a whole new application for the WEB, just use existing (already tested) code via the DLLs
0
 
LVL 36

Expert Comment

by:Geert Gruwez
ID: 35180857
Nice one ?
just pointing out some possible problems
like clients having a few TerraByte of data to analyse
0
 
LVL 32

Expert Comment

by:ewangoya
ID: 35180871
So I agree with you
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:shawn226
ID: 35185963
Thanks everybody for the replies. Looks like I have quite the magical journey ahead of me  ;-)

But doing some googling I found this link:

http://www.delphipages.com/forum/showthread.php?t=191067

... it seems to address exactly what I need in a much much simpler way (making my Delphi app an ActiveX object?). Is this approach okay too? Would this work?

In response to Geert's suggestions, it's best I give a little more detail on my app. The running of it is pretty straightforward and it essentially accepts a few input fields from the user, he then clicks GO and my app reads through flat ascii files (no database) of the daily data of around 3600 stocks (one ascii file per stock). Total size of all data files together would be around 250 - 300 megs. It does its number crunching (around 10 - 12 minutes total) and then presents a list of candidate stocks right on the screen in a TListView box. No pdf output, no pdf printouts, nothing like that. The User can sort and rank the results in the TListView by clicking different columns - if he finds a trade suggestion he likes, he can simply jot it down.
    This all raises another important issue as well - if my app becomes halfway popular, it's possible I could have a lot of customers all arriving at my website wanting to run it simultaneously. Would this cause problems and require a special kind of web server?

Thanks to all
    Shawn
0
 

Author Comment

by:shawn226
ID: 35223468
Hi guys... are you still with me? Any thoughts on my last post?

Thanks
   Shawn
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35224008
Does your application require interactive communication with database?
When I read your comment (#35185963) I understand that you have database. Even if it's a text file and one-way reading, still it requires retrieving data. Can the ActiveX do that? I do not think so.

> "the customer comes to my website, makes a small payment"

You can have Customers Database and assign user/password to every customer whenever a payment is made. The payee will be extended the right to access your application for a specific period of time, let's say X hours from the time of the first log in, or it can be prorated to a maximum of three sessions every session is a specific period of time, or whatever the package that you offer is. So whenever a customer logs, in the time will be captured and counter will start to determine when the session ends.

You have two options here, use web application (IntraWeb) or web Site (php or similar).
0
 

Author Comment

by:shawn226
ID: 35224578
Thanks for the reply JimyX. Yes my app has to read ascii data files, so in that sense, I guess that is the database. And an ocx cannot do this?? I really have no idea how ocx's work, I hardly know what they are.

You say "You have two options here, use web application (IntraWeb) or web Site (php or similar)." How would I accomplish this with the "web site" option? I would have to re-write my whole app in Java or something?

(I realize I've asked kind of a 2-part question: how to make my Windows app run on a website, and also how to set up a pay-per-use system for it. I think in this thread I better just stick to the topic of how to get my app to run over a website. Once I've got that working,then I can worry about how to set up a "pay-per-use" system for it).

Thanks
   Shawn
0
 
LVL 32

Expert Comment

by:ewangoya
ID: 35227362

I don't know how an ActiveX object helps you in this case. Your processing is done on your server where you have your files so whats the need for ActiveX

All this stuff is going to be done in the code behind. Send the desired information to your dll in the code behind, let it crunch the numbers then spit out XML which you will bind to your datagrid
0
 
LVL 1

Expert Comment

by:sbrvar
ID: 35239795
Does your application have a form? Or can it just accept some parameters and run away with it and return a result?

ActiveX could be used, but it would only run on IE browsers, not on others. On top of that, users would have to allow unsigned activex controls to run on their computer (which mostly they don't), so there'd be a lot of issues.

Another option is, if no form is required, CGI (console) program, run on web server.
Yet another, to make regular ISAPI (dll) to run on web server.

You really need to provide us with more information about your Delphi application :)

Take care,
Sabina
0
 

Author Comment

by:shawn226
ID: 35261235
Hi Sabina... you wrote:

>Does your application have a form? Or can it just accept some parameters and run away with it and >return a result?


Yes, I do use a GUI form. It's a very simple program - the user enters some parameters in the form, clicks GO and the program then crunches data for 3600 stocks. Then it displays the results back on the form in a TListView box. It does not write to output files.


>ActiveX could be used, but it would only run on IE browsers, not on others. On top of that, users >would have to allow unsigned activex controls to run on their computer (which mostly they don't), >so there'd be a lot of issues.


I guess that wouldn't be very handy then if Firefox users (or others) couldn't use it.


>Another option is, if no form is required, CGI (console) program, run on web server.
>Yet another, to make regular ISAPI (dll) to run on web server.


What is ISAPI?


Thanks
    Shawn

0
 

Author Closing Comment

by:shawn226
ID: 35454487
Thanks, this got me on the right track, and I have continued to follow up on how to implement Intraweb via the discussion forum at www.atozed.com.

Thanks
    Shawn
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now