Search code examples
phpweb-serviceswebdynamic-html

What are the advantages of Web Services over dynamic HTML?


I was wondering what the advantages are of using an application server (e.g. glassfish) instead of providing content via a dynamic html page (e.g. PHP). I'd like to understand the advantages of a 'web service', rather than simply a website, as I'm developing an online commerce site, and I am wondering what some rules of thumb might be for switching from straight Apache to something like glassfish.


Solution

  • Application Servers like Glassfish in the Java world usually refers to a software that additionally to just implementing a webserver runs your Java (or other JVM based language) web application in the context of the Java Enterprise Edition specification. So it basically just a fancy Apache for web applications written in Java. Rule of thumb: If you decide to use Java or another language that runs on the Java Virtual Machine and need or want to use any of the J2EE APIs you use an application server.

    As a HTML page is normally a human readable representation of information a webservice provides information in a machine readable format so that machines can interact with each other by using the HTTP protocol. Instead of the general webservice concept, the term Webservice is mostly used for a communication using the SOAP protocol. Since webservices are not language specific it doesn't matter if you are using PHP or Java or Ruby On Rails or whatever to implement the webservice. The decision if you want to provide a way to interact with an your web application other than just via a user operated webbrowser.