Question

I am building a website with 100K users daily average. I am using Angularjs as front end framework, using fully RESTFul APIs. For the backend I am having hard time deciding java/spring Vs PHP.

I have team with expertise on both languages so learning curve is not an issue. Please suggest.

Was it helpful?

Solution

This is always a tricky question, normally the answer would be "stick with the language/ecosystem your team and company are more familiar with". However, your team can work with both, so this is "extra tricky" or simply a "luxury".

Java with Spring (e.g. Spring Boot for API development) or Java with a JAX-RS framework (e.g: Jersey, Resteasy) for API development (plus Spring for other things, e.g.: database management, etc.) are very popular... actually JVM is very strong for web services (backend APIs) development, so this may be something to consider as a strong point for Java.

PHP seems to be used (most of the times) for complete web application development (including views), but several people also use for API only too. Facebook uses a lot of PHP, apparently Java too, it seems to work for basically any "server-side" development.

I personally am more inclined and experienced on JVM and java API development, it is very easy to develop java-based APIs nowadays. A java-based solution gives you a lot of possibilities in terms of frameworks and also languages you can eventually use (other JVM-based languages), etc., and it is very performant! However, I have little experience with PHP, so maybe there are some incredible points on PHP that make it very attractive...

Performance wise there are some comparisons (Java seems to be more performant, but most people seem to agree PHP is "easier to develop"):

HTH

OTHER TIPS

I would suggest using a ballot box and making the developers choose anonymously. The answers you're going to get for this question will in all likelyhood be extremely opinionated so just go with your gut. Both scale easily to a 100k users so you won't run into trouble there. In essence this is a decision you have to make for yourself, based on your preferences.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top