1

Let's forget scaling or cloud configuration for a second.

Think of an application with a few platforms:

  1. Mobile (iOS, Android)
  2. Desktop (Windows, OS X)
  3. Web (HTML/CSS/JS)

The question is regarding the back end.

Obviously the backend has to include a web server to handle the web traffic. And if there wasn't a need for Mobile or Desktop application support, i'd say the web server would probably be PHP and talk directly with the database, keeping the "Application Logic" in PHP.

But as Desktop and Mobile support is needed. According to my understanding there has to be another layer where the "Application Logic" lies. the Web Server, Mobile, and Desktop would be talking to that application layer using something like REST and the database access would be handle from there.

  1. Should Web Servers use REST to speak to the application logic? I know it's normal for mobile and desktop applications.
  2. Is there a better pattern for what I described?
  • 2
    It's unclear to me what your question is. – Robert Harvey Nov 4 '14 at 18:07
  • I'm asking should I have a separate "Application" server to handle the REST traffic, or just one server to handle both browser and API (REST) traffic – JasonGenX Nov 4 '14 at 18:19
  • I've edited the title of your question accordingly. – Robert Harvey Nov 4 '14 at 18:28
  • I won't officially answer here, but you can have a single server for both. You want to have your API a separate layer from where you query your data since you would only be returning data and not structure or display as you would with a web request. – Richard Testani Nov 4 '14 at 22:16
  • so, an HTTP request to the web server (which needs data) would yield another request to the application server to obtain that data? or would the database be access separately from two different entities? web server and app server? what's more common? – JasonGenX Nov 4 '14 at 22:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.