Skip to main content

Jargon

API Endpoint​

source

An API endpoint is a URL that acts as the point of contact between an API client and an API server. API clients send requests to API endpoints in order to access the API’s functionality and data.

A typical REST API has many endpoints that correspond to its available resources. For instance, an API that powers a social media application would likely include endpoints for users, posts, and comments. Requests to API endpoints must include a method, which indicates the operation to be performed, as well as the necessary headers, parameters, authentication credentials, and body data.

Static Site vs Dynamic Site​

source

What Is a Static Website?​

A static website is a website that serves pages using a fixed number of pre-built files composed of HTML, CSS, and JavaScript.

A static website has no backend server-side processing and no database. Any “dynamic” functionality associated with the static site is performed on the client side, which means the code is executed in visitors’ browsers rather than on the server.

In non-technical terms, this means that your hosting delivers the website files to visitors’ browsers exactly as those files appear on the server.

What’s more, every single visitor gets the same static file delivered to their browsers, which means largely having the exact same experiences and seeing the exact same content.

What Is a Dynamic Website?​

A dynamic website is a website that’s controlled on the server side and relies on some type of scripting language (e.g. PHP). Every time someone visits the site*, the server processes its code and/or query the database to generate the finished page.

This allows the server to display different content for each visit. For example, someone who’s logged in to the site might see one version of the page, while someone who’s not logged in might see completely different content when they visit the page.

It also means that any changes you make in your site management dashboard is visible right away because the content management system automatically starts delivering the page with the latest content/changes. Info

info

*Using techniques like page caching can eliminate the need to do this for every page load by storing the finished HTML version of a page for a certain amount of time.

Http Server, Web Server, Application Server, Servlet Container​

slightly modified from: stackoverflow

Http server only implements the Http standard: it means accepting a Http request and sending a Http response. Support for php and other languages can be added via plugins to it (apache and so on). A raw Http server only support static resources nothing else but statics.

But in Java EE world Http server have to implement Java EE specifications too. Java EE is a set of specifications.

If Http server implements all specifications we have application server like glassfish.

If Http server only implements servlet and JSP specifications we have servlet container (also called web server in general) like apache tomcat (from apache foundation. it's not apache web server. its another server), jetty from eclipse foundation.

Any java compatible server is a raw Http server plus some implemented specification.

Servlet Container​

Servlet Container (Examples)​

  • Catalina is Tomcat's servlet container., Wikipedia

Servlet Container (History)​

stackoverflow

Once upon a time the web was static. It means webservers were able to serve files from a filesystem via http, much like FTP servers serve files via FTP. First attempts to go dynamic were CGI scripts, which were good for small projects but for bigger ones they would still hurt - in performance and in code maintenance.

One of the alternatives was to have the webserver forward requests to applications running elsewhere/in other processes. One such example is JServ, which was the first servlet container. It was able to run servlets but not serve static files. So you would use it to process dynamic content only.

There you go: You have a webserver for static files, and an application (server) to care about dynamic content.

It did not take long until someone created a servlet that would serve static files - yet a lot of websites still make the distinction as serving static files would cost less resources with a plain webserver.

The resource overhead is not that painful today, and thus you can use application servers as replacements for webservers. And still webservers are commonly used before application servers, simply to reduce the facade on the web and thus possible attack vectors

Application Server (Examples)​

Tomcat​

Wikipedia

Apache Tomcat (called "Tomcat" for short) is a free and open-source implementation of the Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. It provides a "pure Java" HTTP web server environment in which Java code can also run. Thus it is a Java web application server, although not a full JEE application server.

  • Catalina is Tomcat's servlet container.
  • Coyote is a Connector component for Tomcat that supports the HTTP 1.1 and 2 protocol as a web server. This allows Catalina, nominally a Java Servlet or JSP container, to also act as a plain web server that serves local files as HTTP documents.

stackoverflow

Tomcat is an app server

Apache Tomcat is indeed an application server, providing a small subset of technologies included in other servers.

Tomcat implements several Java EE (now known as Jakarta) specifications including:

  • Java Servlet
  • JavaServer Pages (JSP)
  • Java EL
  • WebSocket

Tomcat also includes Coyote, a high-performance HTTP web server.

For many people, these technologies are all they need to deploy their web app. If all you need is a Vespa, don’t buy a Harley.

JBoss​

Wikipedia

The JBoss Enterprise Application Platform (or JBoss EAP) is a subscription-based/open-source Java EE-based application server runtime platform used for building, deploying, and hosting highly-transactional Java applications and services developed and maintained by Red Hat.