WEB vs WAS, What's the differences?

서동희·2023년 10월 11일
0
post-thumbnail

A. What Is a Static Website?‌‌
B. What Is a Dynamic Website?‌‌
C. What is WEB
D. What is WAS
E .What are the differences?

when we start to learn about differences web and was,
frist of all you should know about static page and dynamic page

A.Static Website

a static website has its content fixed or hard-coded on a page. It also has a defined number of pre-rendered web pages with specific layouts usually cached and delivered via a content delivery network.

A static website's structure is built using HTML and CSS to add colors and other visual elements without being connected to a database.

  1. Strong features of a static website
    a) Quick to build
    b) Easy to duplicate
    c) Design flexible
    d) Cost-effective
    e) More secure
    f) Fast load times

I want to elaborate on the reasons for d being cost-effective and e being more secure, excluding the obvious factors among them.

d) Cost-effective
Costs are typically lower when building a static website since you don’t have to connect the pages to a database for generating content and rendering the view.

e) More secure
In comparison to dynamic websites, static websites have a lower internet exposure and reduced vulnerability to malicious attacks. The absence of database connections minimizes the risk of malicious requests, enhancing security.

  1. Drawbacks of a static website
    a) Tough to scale
    b) No customization
    c) Difficult to update

"difficult to customize for users" means that it's challenging to modify or adjust a website or application to suit individual preferences or requirements.

Static websites provide pre-created content, limiting the flexibility for users to change the appearance or functionality of the website. Each page is pre-built and served directly to the browser, so users cannot directly edit or personalize the pages. It's difficult for users to alter the design of the pages or add/remove specific features.

Dynamic site

Compared to static websites, a dynamic website changes based on a user’s request, customizing their experience on the page. These websites rely on both client-side (executed by the browser) and server-side (executed by the server) coding languages such as JavaScript, PHP, or ASP, generating real-time HTML pages with which users can interact.

When a user enters a dynamic website, it changes through the code from the browser and on the server. As in the case of static websites, the result is the same for the users, who will see a page displayed on a web browser, but the dynamic websites process requests and get information from an external database .

  1. Strong features of a dynamic website
    a) Database fueled
    b) Low maintenance cost
    c) Better user interaction
  1. Drawbacks of a dynamic website
    a) Design limitations
    b) Expensive to build
    c) Caching difficulties

what does it by Caching ... let talk about next step...

WEB vs WAS, What are the differences?

Web Server (Web Server) and Web Application Server (WAS) are both integral components of web-based applications, but they serve different purposes and functionalities within the architecture.

What is a web server

Let's take a closer look at the web server portion in the diagram above.

A web server receives HTTP requests and sends back an HTTP response as you can see that diagram. Depending on what was requested, the response could be anything from HTML, a video, an image, or a message redirecting the HTTP client to another URI.

Concept of WEB
A computer program that receives HTTP requests from web browser clients and provides static content (.html, .jpeg, .css, etc.).

What Is an Application Server?

If we look closely at the diagram of the WAS portion as well..

An Application Server created to provide dynamic content requiring database queries and various logic processing.

It is middleware (software engine) that executes applications on computers or devices through HTTP. It is also known as a "Web Container" or "Servlet Container." The term "Container" refers to software that can execute JSP and Servlet. In other words, WAS provides the execution environment for JSP and Servlet

Now that I understand that,,, why do we need this now? Huh?

Why is a Web Server needed?

Let's consider the process of sending image files (static content) to the client (web browser). Static files like image files are not sent together with the web document (HTML document) when it is sent to the client. The client first receives the HTML document and then requests the necessary image files from the server accordingly. Through the Web Server, static files can be quickly sent to the client without going all the way to the Application Server. Therefore, the Web Server can distribute the functionality to handle static content only, reducing the burden on the server.

Why is a WAS Server needed?

Web pages consist of both static and dynamic content. Dynamic content tailored to the user's request needs to be created and provided. In this case, if only the Web Server is used, all the results for the requests the user wants must be pre-created and serviced. However, this approach is inefficient due to resource constraints. Therefore, by using WAS, data that matches the request is retrieved from the database, and the results are dynamically created and provided based on the business logic, effectively utilizing resources.

WEB vs WAS, What's the differences?

Web Server handles static content and HTTP requests, while WAS processes dynamic content, executes application logic, and interacts with databases. Web Server serves HTML, images, and other static files directly, while WAS generates dynamic content using server-side technologies in response to client requests. Web Server focuses on handling client requests and managing static resources, while WAS manages application-level tasks and provides an execution environment for web applications. In summary, Web Server deals with static content and HTTP, while WAS manages dynamic content and application logic.


자 ~~ 이제 나의 사랑 나의 한글


A. 정적인 웹사이트
B. 동적인 웹사이트
C. WEB 란
D. WAS 란
E. WEB vs WAS 무엇이 다르죠?

우선 WEB과 WAS를 알기전에 정적인 웹사이트와 동적인 웹사이트 부터 알고 넘어가자

A.정적인 웹사이트

정적 웹사이트가 코딩되어 있는걸 보면 콘텐츠가 페이지에 고정되거나 하드 코딩되어 되어있는것을 볼수있다. 또한 일반적으로 콘텐츠 전송 네트워크를 통해 캐시되고 전달되는 특정 레이아웃이 포함된 사전 렌더링된 웹 페이지 수가 정해져 있다.

정적 웹사이트의 구조는 데이터베이스에 연결하지 않고도 HTML과 CSS를 사용하여 색상과 기타 시각적 요소를 추가하여 구축된다고 보면 된다.

정적인(static) 웹사이트의 강점

a) 빠른구축
b) 복제의 용이성
c) 디자인의 유연성
d) 비용 효율적
e) 보안에 더 강함
f) 보다 빠른 업로드

이중에 두가지 부분 d 비용효율적 e 보안에 더 강한 이유를 자세히 서술하고자한다

c. 비용효율적

콘텐츠를 생성하고 뷰를 렌더링하기 위해 페이지를 데이터베이스에 연결할 필요가 없으므로 일반적으로 정적 웹 사이트를 구축할 때 비용이 더 낮다

e.보안에 더 강함

동적 웹사이트와 비교할 때 정적 웹사이트는 인터넷 노출이 적다. 데이터베이스에 액세스할 필요가 없어 악의적인 요청의 가능성이 줄어들어 보안이 강화된다고 볼수 있다. 사용자는 HTML, CSS, JavaScript, 이미지, 오디오 또는 비디오 파일과 같은 것만 요청할 수 있다

정적(static) 웹사이트의 단점

a) 확장의 어려움
b) 사용자 정의 어려움
c) 업데이트의 불용이성

여기서 사용자 정의가 어렵다는 것은 웹사이트나 애플리케이션을 개인의 요구 사항이나 취향에 맞게 수정하거나 조정하는 것이 어렵다는 것을 의미한다

정적인 웹사이트는 미리 만들어진 컨텐츠를 제공하므로 사용자가 웹사이트의 외관이나 기능을 변경할 수 있는 유연성이 제한된다. 각 페이지는 미리 만들어지고 브라우저에 그대로 제공되기 때문에 사용자는 페이지를 직접 수정하거나 개인화(customization)할 수 없다. 사용자가 페이지의 디자인을 변경하거나 특정 기능을 추가하거나 제거하는 것은 어렵다고 볼수 있다

B.동적인 사이트

정적 웹사이트와 비교하여 동적 웹사이트는 사용자의 요청에 따라 변경되어 페이지에서의 경험을 맞춤화한다. 이러한 웹사이트는 JavaScript, PHP 또는 ASP와 같은 클라이언트측(브라우저에서 실행) 및 서버측(서버에서 실행) 코딩 언어를 모두 사용하여 사용자가 상호 작용할 수 있는 실시간 HTML 페이지를 생성한다.

사용자가 동적 웹사이트에 들어가면 브라우저와 서버의 코드를 통해 웹사이트가 변경되는데, 사용자에게 있어서 정적 웹 사이트와 마찬가지로 웹 브라우저에 표시된 페이지의 결과가 동일하지만 실질적으로 동적 웹 사이트는 요청을 처리하고 외부 데이터베이스 에서 정보를 가져온다.

동적(dynamic) 사이트의 장점

a) 데이터베이스 기반
b) 낮은 유지보수비
c) 유저와의 더나은 상호작용

  1. 동적(dynamic) 사이트의 단점

a) 디자인의 한계점
b) 초기비용의 문제
c) 캐싱의 어려움

캐싱의 어려움,, 뭘까...? 이건 다음장에서 공부하고 가겠다

WEB와WAS의 차이점

웹 서버(Web Server)와 웹 애플리케이션 서버(WAS)는 모두 웹 기반 애플리케이션의 중요한 구성 요소이지만, 아키텍처 내에서 각각 다른 목적과 기능을 수행한다.

우선 WEB과 WAS에 대해 알아보자

WEB server의 정의

자 위의 그림의 web 서버부분을 자세히 봐 보자

그림에서 보듯 웹 서버는 HTTP 요청을 수신하고 HTTP 응답을 다시 보낸다. 위의 요청된 내용에 따라 응답은 HTML , 비디오, 이미지 또는 HTTP 클라이언트를 다른 URI로 리디렉션하는 메시지 등 무엇이든 될 수 있다

다시말해 기본적인 개념은 웹 브라우저 클라이언트로부터 HTTP 요청을 받아 정적인 컨텐츠(.html .jpeg .css 등)를 제공하는 컴퓨터 프로그램이라고 볼수 있다

WAS server의 정의

이것도 WAS 부분의 그림을 자세히 보면..

DB 조회나 다양한 로직 처리를 요구하는 동적인 컨텐츠를 제공하기 위해 만들어진 Server구나 하고 알수 있다
자세히 말하면
HTTP를 통해 컴퓨터나 장치에 애플리케이션을 수행해주는 미들웨어(소프트웨어 엔진)이다.
“웹 컨테이너(Web Container)” 혹은 “서블릿 컨테이너(Servlet Container)”라고도 불린다.
Container란 JSP, Servlet을 실행시킬 수 있는 소프트웨어를 말한다.
즉, WAS는 JSP, Servlet 구동 환경을 제공한다

아니 알겠구,,, 이제 이거 왜 필요한데? 어?

WEB 필요성

클라이언트(웹 브라우저)에 이미지 파일(정적 컨텐츠)을 보내는 과정을 생각해보자.
이미지 파일과 같은 정적인 파일들은 웹 문서(HTML 문서)가 클라이언트로 보내질 때 함께 가는 것이 아니다.
클라이언트는 HTML 문서를 먼저 받고 그에 맞게 필요한 이미지 파일들을 다시 서버로 요청하면 그때서야 이미지 파일을 받아온다.
Web Server를 통해 정적인 파일들을 Application Server까지 가지 않고 앞단에서 빠르게 보내줄 수 있다.
따라서 Web Server에서는 정적 컨텐츠만 처리하도록 기능을 분배하여 서버의 부담을 줄일 수 있다.

WAS 필요성

웹 페이지는 정적 컨텐츠와 동적 컨텐츠가 모두 존재한다.
사용자의 요청에 맞게 적절한 동적 컨텐츠를 만들어서 제공해야 한다.
이때, Web Server만을 이용한다면 사용자가 원하는 요청에 대한 결과값을 모두 미리 만들어 놓고 서비스를 해야 한다.
하지만 이렇게 수행하기에는 자원이 절대적으로 부족하다.
따라서 WAS를 통해 요청에 맞는 데이터를 DB에서 가져와서 비즈니스 로직에 맞게 그때 그때 결과를 만들어서 제공함으로써 자원을 효율적으로 사용할 수 있다.

WEB ,WAS 의 차이점

웹 서버는 정적인 콘텐츠와 HTTP 요청을 처리하며, WAS는 동적인 콘텐츠를 처리하고 애플리케이션 로직을 실행하며 데이터베이스와 상호 작용한다. 웹 서버는 HTML, 이미지 및 기타 정적 파일을 직접 제공하고, WAS는 서버 측 기술을 사용하여 클라이언트 요청에 대한 동적 콘텐츠를 생성한다. 웹 서버는 클라이언트 요청을 처리하고 정적 리소스를 관리하는 데 중점을 두며, WAS는 응용 프로그램 수준의 작업을 관리하고 웹 애플리케이션을 위한 실행 환경을 제공한다. 요약하면, 웹 서버는 정적인 콘텐츠와 HTTP를 다루고, WAS는 동적인 콘텐츠와 애플리케이션 로직을 관리한다

Reference

https://teleporthq.io/blog/static-vs-dynamic-websites-learn-the-differences
https://www.openlogic.com/blog/web-server-vs-application-server
https://gmlwjd9405.github.io/2018/10/27/webserver-vs-was.html
https://www.freecodecamp.org/news/difference-between-a-website-and-a-web-application/

profile
백엔드개발자

0개의 댓글