views:

177

answers:

11

I'd like to use C#, Java and PHP in an upcoming project. What potential pitfalls should I watch out for? Are there advantages to using multiple platforms for a project? The target development team is people with varying backgrounds working over the internet on this project.

Edit: Please be specific and let me know what possible problem I could face...please don't be too generic with your answers that it is not good,it will cause problems,etc.Please be specific.

My plan for integration would be to to use 2 methods.

1.) WebServices (Common in php,.Net and JAVA)

2.) MYSQL Database (commonly accessible by PHP,.Net and JAVA)

My project is an ERP + CRM project for enterprises where developers can have the freedom to code in whatever platform they like to integrate and develop modules/plugins.

+5  A: 

Advantages:

Some technologies are good for some things and bad for others. Using multiple technologies allows you to play to the strengths of multiple technologies.

Disadvantages:

Complexity. Combining multiple systems can cause a large blow-up in complexity. (This will generally out weigh the benefits)

jjnguy
A: 

Of course there are good reasons to do so. If you like WPF MMI - you will develop using MSVS c#... but if you need a lot of servers, there is no reason to use c# there as well. you can develop using Java/Eclipse, deploy on linux and save a lot of money on licenses...

Dani
+19  A: 

you'll be in a mess. choose one platform and stick to it.

irreputable
+1 I agree 1000 percent.
Byron Whitlock
+2  A: 

You should use 1 platform. Those 3 platforms are more or less equal in terms of functionality. As jjnguy said you will have a huge complexity blowup for not much return. You will have enough problems and issues without making it artificially difficult!

Byron Whitlock
+2  A: 

Hmm. If not managed properly, this sounds like a recipe for disaster :)

Why three technologies? Are there technical facts requiring it (e.g. that PHP is too slow for some parts) or is it just because of preferences of the people taking part? In the latter case, I would seriously reconsider. Too many pitfalls and problems along the way integrating a team with three technologies.

Pekka
+2  A: 

I would mix these technologies only if it is absolutely necessary. Otherwise you spend a lot of time implementing the same parts of the problem in different languages and fixing bugs that have their roots in the technology.

dwo
+1  A: 

I would have to say that PHP might be a fine choice to use along with C# since you didn't say ASP.NET. I've never tried to work with interoperability of that but if you use PHP for your UI presentation logic and do backend/data access in C# that should still be relatively maintainable.

Chris Marisic
A: 

One problem you will certainly run into is state and session management; each platform has its own ways of doing that, and they won't talk to each other very well, if at all.

In general, the only way to stay sane in this kind of environment is to switch between platforms only at the points where interoperability is an obvious requirement, such as service interfaces. If it's truly a multi-tier environment (where "tier" means going across boundaries between machines), then you have a clean line you can draw. Otherwise, I concur with the rest of the advice here; pick one platform and stick with it.

Cylon Cat
+2  A: 

Getting code reuse right is already a problem with code as-is, you are making it impossible by choosing three different languages. You are also ensuring that someone working on one part of a project will not be able to be shifted to working on a different part easily, unless they also know that language...

And then what about interactions with the system running, how do you plan to debug calls that span across three languages?

Insanity. I agree with the most upvoted question, it doesn't matter which you pick but pick one, and one only.

Kendall Helmstetter Gelner
+3  A: 

The scenario I would think of using those three technologies together would be a distributed system with a rich GUI (C# on Windows) a robust back end (EJB or similar Java Framework) and a web front end for remote users (PHP).

Although a reasonable argument could be made for those being best in each case, the problem with such an arrangement is duplication. Every data structure has to be duplicated in the database, in the back end, on the GUI and in PHP. In addition, the integration testing and debugging problem is made much more complex. Everything will have to be boiled down to primitives to transfer data between the tiers, hard to change protocols that decode messages will be built up in three languages, and things go down hill from there.

A better approach would be to have the core functionality of the product (your code) in one platform throughout. Then provide integration points in the form of web services and buffer tables in MySQL that allow communication over defined paths with your application, and let developers who want to write plugins use those integration in the language of their preference. Regarding the integration with the database, a reasonable approach can be to use defined tables for this purpose, plus stored routines that are written to map these tables to your internal data structure. This will give you much better encapsulation than having modules write to your data model directly.

Yishai
+1  A: 

For the web services portion I do think that would be a very nice feature to offer native support for each languages' web services since for the C# side you can expose WCF services along with already generated WSDLs using svcutil and a data contract dll that avoids all of the problems that tend to arise with common classes that exist in more than one service host.

Chris Marisic