Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am new to web development and just started exploring the things. I read about how web page is processed and sent to client by a web server but I got confused with application server. what is the difference between them ? why app. server is needed ? and few examples of both of them .

share|improve this question

closed as not a real question by Jim G., Walter, Glenn Nelson, dietbuddha, Yusubov Jan 15 '13 at 4:29

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
What problem are you trying to solve? –  Jim G. Jan 15 '13 at 1:21
    
@JimG. Likely "the reduction of confusion of the author regarding two types of servers." There is a real answer to the question that is not subjective or opinion. –  MichaelT Jan 15 '13 at 14:59
add comment

2 Answers

up vote 10 down vote accepted

Web Server Definition

A web server is a service that handles specifically requests in the HTTP protocol format. The server responses to requests made using the HTTP format, and in turn responds using a valid HTTP response. All responses from a web server follow the W3 standards for HTTP protocols. Including, and not limited to, server 500 errors, redirects and various content types.

A web server may respond with a content type that supports non-HTML formats. Such as PDF files, binary files, and even JSON/XML responses. The key factor in understanding that these requests came from a web server is understanding that response is a HTTP response. The content in the response is just an application specific content type.

A web server may run multiple CGI languages to provide the HTTP responses. These can include Python, PHP, Java and ASP (among others). These languages operate under the web server, but in turn provide valid HTTP responses. There for, it's still a web server.

Application Server Definition

An application server is a service that handles specifically requests for business operations, and performs business logic. It is not limited to the HTTP protocol, but can operate using that protocol if it fits the business requirements.

Application servers tend to operate in TCP/IP communications. Including sockets, and other Internet low-level communications. It's possible for an application to use a web server as it's hosting environment.

Examples of tools that would require an application server could be, a gaming server, a chat server, a video conferencing server, a cloud-based accounting application, etc.. etc..

In most cases application servers wrap their business logic under an API layer. That API layer can be access via a common protocol the client supports, or via custom socket communication. There are multiple development platforms that have all these things built-in for the developer. They include platforms like J2EE or .NET

share|improve this answer
    
I can see people still take both of them as same, as now a days all severs are application servers. Am I right ? –  Captain Code Jan 17 '13 at 20:26
    
I think an application server is anything that has an IP address, where that IP address is used to process a protocol that causes the server to perform operations. Where as a web server is purely about getting an HTTP response. FTP for example would be an application server, because you enter it's IP into an FTP client and the client requests the server to perform some file tasks. –  Mathew Foscarini Jan 17 '13 at 20:33
add comment

Technically, they mean the same thing. In colloquial use, however, a "web server" generally means a server that produces web pages that are meant to be consumed by people with web browsers.

An "application server," on the other hand, uses HTTP as a transport layer for one program to communicate with another, generally using data exchange formats such as JSON or XML that aren't meant to be rendered as a document.

Of course, if the same server provides both HTML pages and an API to programatically access the underlying data, the distinction can get a bit blurry...

share|improve this answer
2  
I don't feel that the term "application server" implies HTTP as a transport layer. –  Carson63000 Jan 15 '13 at 4:35
add comment

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