강의

멘토링

로드맵

인프런 커뮤니티 질문&답변

spring님의 프로필 이미지
spring

작성한 질문수

스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술

HTML, HTTP API, CSR, SSR

정적, 동적 리소스..

작성

·

1.3K

2

안녕하세요!

정적리소스는 그냥 파일에 있는 리소스를 말하는거고 동적리소스는 디비에 요청해서 가져온 리소스를 말하는건가요,,? 동적 리소스가 뭔가 정확히 와닿지가 않네요 ㅠㅠ 

퀴즈

Web Server vs WAS, what is the core difference?

Serving Static Resources

Dynamic Content Processing

HTTP Communication

DB Connection

답변 1

0

안녕하세요. potatoo님, 공식 서포터즈 OMG입니다.

정적리소스, 동적 리소스 용어에 대한 설명은 아래 링크를 참고해주세요:)

[Spring Boot] 정적자원(Static Resources, img; js; css 파일 등)에 대한 접근 설정 (tistory.com)

 

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <style type="text/css">
        .tg  {border-collapse:collapse;border-spacing:0;}
        .tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
          overflow:hidden;padding:10px 5px;word-break:normal;}
        .tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
          font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}
        .tg .tg-dvpl{border-color:inherit;text-align:right;vertical-align:top}
        .tg .tg-0pky{border-color:inherit;text-align:left;vertical-align:top}
        </style>
        <table class="tg">
        <thead>
          <tr>
            <th class="tg-dvpl">이름</th>
            <th class="tg-0pky">나이</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td class="tg-0pky">홍길동</td>
            <td class="tg-0pky">20</td>
          </tr>
        </tbody>
        </table>
</body>
</html>


위 html을 화면으로 나타내면 다음과 같은데요,

회원 1명의 데이터만 html로 작성하면 직접 html을 작성할 수 있습니다.

반면 DB에 있는 다수의 회원을 화면으로 데이터를 전달한다면 위와 같이 작성할 수 없겠죠?

JSP, Thymeleaf와 같은 템플릿 엔진은 화면(HTML)을 동적으로 그릴 수 있도록 기능을 제공합니다.

이러한 방식을 SSR(서버 사이드 렌더링)이라고 부릅니다.

 

EX) JSP

 

Ex) 타임리프

 

참고)

https://offbyone.tistory.com/368


감사합니다.

spring님의 프로필 이미지
spring

작성한 질문수

질문하기