Stand-alone to client/server application (how to run stand-alone app on local network)

I have all ready done stand-alone Accounting Application. I am using Paradox databases and Delphi enviroment. Which is easiest way to run (convert) stand-alone as a client/server (or how to run my application on local network - 5 users)?  
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Wim ten BrinkSelf-employed developerCommented:
There is no easy way. Certainly not with Paradox because the BDE isn't performing very well in a multi-user environment.
It is nice that you now have a stand-alone application but a C/S application often requires a redesign from the ground up. Why? Because the required techniques are different if you still want to keep a high performance. You see, in a stand-alone application it's not a real problem opening tables with large amounts of records. In a C/S environment 5 users who all look at the same huge table will put quite a lot of stress on the server. And of course they could get in each others way by having a record locked that another user also wants to access. (And the BDE is quite bad in locking records.)

So, for C/S applications you'll need a better database. MySQL or InterBase (Firebird) are the cheapest solutions since both are free. Access is an alternative if you already use MS Office. Or perhaps a more industrial database system like MS SQL, DB2 or Oracle. Anyway, you'll have to move to using SQL in your application.
The connection to the database will also have to change. You could use the native InterBase components for InterBase, DBExpress for MySQL and a few other databases or ADO for almost every database system. ADO is very useful if you want to connect to Access or MS SQL, btw.
Next will be the number of tiers you want to use. If you just want one database-tier and the client-tier then all you have to do is upgrade the database. But in many cases a middle-tier is introduced that can perform some preparations on the data you want to exchange with the database. It can also be used for user validation and other purposes and best of all, it makes sure users don't have a direct connection to the database. (Which requires them to use your application instead of opening a Database Explorer tool instead. If you want to create such a middle-tier then you will have to redesign from the ground up. Otherwise you could just change the BDE components into e.g. the ADO components and still keep your application as it is right now.

With a middle-tier you have to think about the communication methods between the middle-tier and your client application. And perhaps you want to cash some information from the database on the middle-tier so you don't have to access the database all the time. Cashing can increase the performance quite well, btw. Now, about those communication methods... You have DCOM, CORBA, COM+, SOAP, Midas and of course just raw TCP/IP sockets available for all this communications. Actually, there are so many techniques that it's better to just study on them first before starting on creating a middle-tier. Better move your database over to a better database system first.

Good luck.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
agim_bekajAuthor Commented:
What about: Apollo Database Server, Advatage Database Server or NexusDB
I agree with Alex's recommendation.  Start by moving to a real DBMS first.  Hone your database skills, then take on the additional task of communications and n-tier operations.
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Wim ten BrinkSelf-employed developerCommented:
Don't know much about Apollo, Advantage or NexusDB since I'm not that fond on those kinds of third-party database connection providers. I still have nightmares because of QuickReports, a report generator, because it just contained too many bugs to be really useful and the creators of this component set had their own view on component design and forgot about backwards compatibility... There are quite a lot of third-party tools that seem to be useful but most of them still have some nasty flaws.

Now, the database servers might be very useful but consider this: ADO is a very well-proven technology right now. Lots of people use ADO and ADO isn't limited to just Delphi. ADO is available on all W2K systems and better and has a pretty good performance. If you have a database that comes with an ADO driver, you could use that database quite easy in your application. You could consider ADO the more enhanced version of the BDE. Only difference is that it was created by MicroSoft, not Borland. Now, if Apollo, Advantage or NexusDB can be accessed through ADO then I don't see any problem with them. But if they require their own API calls or components then you might have some troubles if you ever want to migrate to another database system.

Borland comes with several default database connection methods. ADO is the most popular at this time, next to the BDE. Actually, my previous projects rely mostly on the BDE while I only use ADO for any new projects. (And I try to upgrade my BDE projects to ADO.) Then there is dbExpress which is useful when you want to create cross-platform applications. (Meaning that you could compile your application with Kylix too, probably.) If I'm not mistaken, the Interbase components are also platform-independant but they will limit you to a single database system: InterBase. But I don't need to develop cross-platform applications and I know that ADO is quite reliable at this moment. Besides, ADO is free. You only have to get some database server to work with it.

Btw. I do know there's an ODBC driver for Paradox. You could use ADO to connect to an ODBC source and let the ODBC connect to your Paradox tables. Not very pretty but perhaps  nice alternative. But I would still suggest to move to a real DBMS system instead. Something that supports SQL and preferably transactions. Perhaps even a DBMS that supports things like views and stored procedures.
ADO is not scalable, and is not portable to linux systems.

BDE is deprecated and slated for retirement.

I concur with Alex - move to Firebird or mySQL at least.  

I like the dbExpress components.  They provide a thin abstraction layer between you app and the native database drivers supplied by the vendor.  

I also like the precompiler approach which takes embedded SQL and generated native API calls.  This tends to require a bit more work during builds, but you can't get much better performance or compatibility.  Unfortunately, most inline SQL precompilers do not support Pascal (aka Delphi), and the programming techinques are a bit lower level than many Delphi programmers are confortable with.  Firebird's precompiler does support Pascal (fancy that - Interbase is a strategic Borland product, and when they released the source code to kick off the Firebird effort, they made sure that Delphi was supported).

Firebird is the open source version of the comercial Interbase product.  It is free at  it appears to be good  for smal lto medium installations.

With mySQL, you have to watch your versions since only a few support two phase commit for transactions.  I haven't actually used the product, but it appears aimed at the small to tiny installation market.

If you want to spend money for something really scalable, Oracle and DB2 have some real oompf and can be scaled from desktop to mainframe sysplexes.
You can put your paradox tables on to a file server (NT etc0 and your application will work multi user at an acceptable speed for the number of users you are considering.
Wim ten BrinkSelf-employed developerCommented:
  What do you mean with "ADO is not scalable"? ADO has been made to be scalable and is in use by many companies already. Quite a few webservers even depend on ADO to be scalable... And from personal experience I know that ADO combined with either Oracle or MS SQL Server can easily handle 20 to 100 users. More even if required. Keep in mind though that ADO isn't a database system but a database connector like the BDE.

  What you suggest is not very reliable. The company I work for had some very bad experiences with Paradox tables in shared environments. The biggest problem is scalability. But there is also the problem that Paradox tables can get corrupt if one of the users doesn't close his application correctly. Even with 5 users there is a high risk of getting corrupt tables with a possible huge data-loss. And then there's the nasty way that Paradox locks records. When a user is using a single record, Paradox doesn't just lock this record but also other records that are located close to this record in the file. This makes it quite hard to have multiple users update the tables.
I'm talking 1000 to 20000 users ... I have a different definition of scalable.  My "small" is ten time the size of your "large".
agim_bekajAuthor Commented:
Can you give more details about Paradox tables on file server, because I tried but without success.

I definitely second the RDBMS choice.
My opinion is based on few facts:

1) Lots of companies require RDBMS
2) Using file servers can lead to security problems( who can stop
anyone from deleting a table? )
3) File servers are outdated in most cases( except MySql )
4) BDE applications can have huge problems if they're installed in
systems which already have a BDE installed or BDE-like applications
installed( Corel any1?  )

Thus, my choice is RDBMS.

I would also like to point out that n-tier architectures can be quite
handy in the moment you choose to change the application structure
( client-side software to web-based one, for example ) or if you want to
add a layer( for example: client application AND web based app ).


You definitely want to have two phase commit also, which is not supported by Paradox.

The two phase commit means that records are locked only for the duration between your "startTransaction" and "Commit" (or "Rollback" on errors), so even when the DBMS locks an entire page there is a minimum of contention.  It also means that your data model always has either all of the required changes for the transaction or none.  No more partial updates where one table has updated data and the other one does not.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.