开发者

Whats the best technology stack for supporting mobile apps and a website from the same back-end? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I will have native iPhone and Android apps, and later a mobile web site (for other mobile platforms) all talking to a back-end that manages users, settings, video, social graphs, etc. I will also have a dynamic web site with a lot of video, pictures, and social graph administration. The web site will basically be a more featureful version of the apps on the phones. The back-end consists of video storage, transcoding, a video recommendation engine, options to share the video with your network.

My thought is that I should build a common applications services layer that exposes a RESTful api that returns JSON, and have both the apps and the web site talk to this api.

My question is should I keep the web site and the services layer both in one technology or use Java for the services layer, and Rails or Python for the web site to take advantage of their purported faster dev time. Th开发者_StackOverflow中文版e site will have a lot of JavaScript and AJAX to support dynamic behavior. If I use Rails or Python, should they also talk REST/JSON to the services layer? In terms of deployment and scaling management, it would seem like sticking with one technology like Java for all back-end pieces might be better; but on the other hand Rails and Python promise faster development and maintenance times for the web layer. If I use Rails for the web tier, would it make sense to deploy it in JRuby within the same JVM as the services layer to have fewer moving parts to manage on the web/app server?

The site may grow to millions of users and videos. The development team are experienced at Java, with some Python, but are smart and can quickly learn other technologies.

Feel free to suggest the technology stack of your choice.


Here are some advice based on my experience:

  • create a separate API layer for your JSON api. Use Spring MVC or JAX-RS there
  • for the web front-end you can use grails - it combines the strengths of dynamic languages like ruby and python with the power of the JVM and the java stack.
  • you can choose to use only your API from your site, or expose only some of the features through the API and use the rest internally.
  • for internal communication try not to add overhead - you can start with simple service classes (spring beans, for example). Exposing them as web services is harmful, imo. Yes, it appears that your modules are decoupled, but it hampers flexibility. Since services are stateless they can be invoked from any place, so you can easily make them live and be invoked in the same JVM as the grails app.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜