views:

43

answers:

1

Sorry to ask a subjective question, but I would welcome some advice. I am an experienced programmer of embedded s/w, but haven't done much network programming, although I have done a fair bit of hobbyist PHP.

Anyway, I have to develop what is probably a fairly general type of app, as shown in this crude diagram

---------------------------------------------------------------------------------

| Browser / user interface Takes input from user form and writes data to d/b.    |
| Also gets data and updates browser contents when when d/b contents are changed | 
| because of info received over TCP/IP.                                          |

|________________________________________________________________________________|

|        ODBC                                                                    |

|_______________________________________________________________________________|

|      database                                                                 |

|_______________________________________________________________________________|

|        ODBC                                                                   |

|_______________________________________________________________________________|

|    Socket (TCP/IP)                                                            |

|  Send data out when d/b is updated from browser.                              |
| Also, update d/b when data are received over TCP/IP.                          |

|_______________________________________________________________________________|

As I say, I imagine this to be a fairly typical architecture? Am I right?

Then client is insisting on MSIE - unless I can show compelling technical reasons for FireFox or other then it will have to be MSIE (are there any compelling technical reasons?).

So, with MIE (almost) a given, I had though to use PHP, since I know it, but

  1. the client seems awfully keen on Java (which ought to be OK since I am conversant with C++)
  2. it woudl seem to make sense to use the same language for the "upper" interface between the web pages (which that app generates) and the d/b, and for the "lower" interface between the d/b and the socket. (a single language means a single set of tools since text approach, etc)

So, the (probably highly subjective) question is "which language shoudl I choose".

As I say, the client is keen on Java. Any compelling reason why not? Is it generally a good choice for the sort of thing described here?

Any other hints & tips gratefully appreciated (and up-voted): URLs, books, tool chain suggestions, etc, etc

+2  A: 

There's lots of questions here, most of which we can't answer:

1) are you capable of producing the code more cheaply in Java or PHP?

2) are you capable of producing more reliable/maintainable code in Java or PHP?

3) Why does the client have a preference for Java?

4) Why do you think that the browser is such a pivotal factor (in the absence of any mention of Microsoft-only technologies such as .net, activeX etc).

Despite the fact that Java is constantly being plugged as an easy transition from C[++] it's a very different language. Certainly if you already know C++ and PHP, then learning Java will not take as long as it would if you had no previous 3GL / OO programming experience, however its far from easy to learn, particularly if you need to implement the level of integraton described above.

A key question to answer is whether you need to push data from the server to browser (rather than pulling data using conventional HTTP). This can be simulated using technologies such as Comet (with PHP, Java, or just about anything server side) however using a java applet is the only way to get effective client push working - and this then prompts lots more questions about capacity and firewalls.

In the specific case of what is the best choice for you, then the answer is probably PHP. But to answer the question of what is the best language for the client - that's a different kettle of fish (IMHO, given the information available PHP has a number of advantages - but there's a lot I don't know the requirements).

I don't think you're asking us, nor your client the right questions.

C.

symcbean
Mawg
Mawg
(tried to answer but my browser went weird). Sounds like your client doesn't know what they want - but they want to have their cake and eat it. At this point I'd be either backing away carefully, or adding 0s to the end of my estimate and checking the terms of the contract very closely - if they can't state, up front, exactly what their requirements are then they're likely to keep changing them as they go along.
symcbean
their actual requirements are reasonably clear (as clear as any ever are). But don't worry, that's always my #1 priority - nail down the requirements absolutely and make sure that the client understands that any change will cost time and/or money.The things is that they are tendering to do the job for a 3rd party, and they are the ones who "prefer" Java, but don't really want to discuss it.
Mawg