Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As I have already asked here, I have to implement a Multi-Platform Map application. Now I have Mapstraction as an option which uses Javascript to implement the desired functionality. My question is, "Is there any reason/benefit to implement such a library (let say, Adapters) in Server-side (in my case, PHP)?"

As these maps are all based on Javascript, there is a big reason to use Javascript again to make the adapter also, so it would not be dependent to PHP, Java, or .NET for example. But is that all?

share|improve this question
up vote 1 down vote accepted

As far as I can see, there are no benefits to implementing your adapters on the server-side rather than in JavaScript. In fact you would be better off with JavaScript because it is the ubiquitous language of the web; if in the future you decide to re-write your backend using another technology, you wouldn't have to re-write the adapters.

If you're hesitant to go with JavaScript because you don't have enough experience with it, even then my suggestion would remain unchanged, because every modern, client-heavy web application demands that you be comfortable with it.

Besides, you're getting a mature, tested JavaScript adapter library - with a fairly permissive BSD license - in the form of Mapstraction, which I mentioned in my answer to your linked question, so that's a very good option if you can use it. Either way, I think JavaScript is the way to go for you.

share|improve this answer
thanks man! we're already off to the JS solution. :) – Mahdi Oct 25 '12 at 14:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.