ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My company is about to embark on a long term development effort (2 years) to create a new client/server + web application. Since a few hundred clients are using our existing Microsoft VC++ front-end, we need to maintain a thick-client Microsoft GUI application. However, I'd like to develop much of the new business logic to be cross-platform. This way we could port the server side code to Linux when we rollout a web-based version of the software.
So here's my 2 questions (we're traditionally a Microsoft shop, but prefer to migrate all in-house servers to Linux, so excuse my ignorance):
1. Given that we must use Microsoft for our client, what language and middleware would best enable us to utilize the same server-side code on both Linux and Windows?
2. Can we get php/apache to interface with our database using the cross-platform server code we developed for our Microsoft application? Would we use CORBA/COM/OTHER?
It depends what should the server do. If it's possible to write it in something like PHP or Python, great. Will work on both Linux and Windows. If it's a 'standard' shop+database, go for Apache+MySQL( or PostgreSQL if you need more advanced stored procedures etc, but AFAIK Postgres doesn't have a Windows version, so database server should be separate if you choose it)+PHP.
The server may also run a kind of wrapper translating requests from front-ends (but it depends on the front-end, if it can be modified to work as a web browser, it should be the way to go).
PHP has commands to connect, issue commands etc to the database. No extra layer is added. But if the database is custom it's possible to write an Apache module that will handle the database.
We're planning on using PostgreSQL for the database (particularly since v8 has a win32 port), but I'm not sure what to do for the application layer (e.g. middleware/business logic). We are planning to write this all in standard C++ to enable cross platform capabilities when we decide to go with the web. I'm not sure what our options for getting this C/C++ code running as the application layer in Linux between the web and database layers. Would we use CORBA or COM, or something else? Does anyone have experience with a 3-tiered architecture where the application layer was compiled for multiple platforms?
Well, you can use C/C++ program as one of the layers and it's even possible to write it in such a way that it compiles on both platforms. But it must be strict ANSI then.
It may also use Corba. I'd recommend to make a project of your application (libraries to do which tasks you need) and then try to find cross-platform ones. You'll be able to find them, IMHO.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.