프로덕션 환경에서 클라이언트 사이드 렌더링을 고집하기란 힘든 일입니다. 서버를 통해 웹사이트를 제공하면서도 React의 편리함을 누리려면 서버 사이드 렌더링(SSR)을 구현해야 하는데요. Create-React-App을 그대로 유지하면서 SSR을 구현하는 과정을 보여드리고자 합니다. TypeScript로도 가능합니다!
This document describes a system for delivering personalized live video streams with advertisements to multiple devices. It involves the following key components:
1. AWS Elemental MediaLive is used for live video processing.
2. AWS Elemental MediaPackage delivers the personalized manifests.
3. AWS Elemental MediaTailor manipulates the manifests to insert personalized ad markers from various ad servers.
4. Amazon CloudFront delivers the video segments and ads to devices from multiple CDNs.
React JS is a JavaScript library for building user interfaces. It uses a virtual DOM to efficiently update the real DOM and render user interfaces from components. Components are reusable pieces of UI that accept input data via properties but maintain private state data. The lifecycle of a component involves initialization, updating due to state/prop changes, and unmounting. React uses a single-directional data flow and the concept of components makes code modular and reusable.
State is managed within the component in which variables declared in function body. State can be changed. State can be accessed using “useState” Hook in functional components and “this.state” in class components. Hook is a new feature in react. To use this expression it’s essential to have good understanding of class components. State hold information that used for UI by browser.
https://www.ducatindia.com/javatraining/
This document contains an agenda and slides for a React workshop presented by Bojan Golubovic. The workshop covers the history and basics of React, including components, JSX, the virtual DOM, and React data flow. It also discusses related tools like Redux and React Router. The goal is to provide basic knowledge of React and how to build real-world applications with it.
This document discusses Dynamic HTML (DHTML) and JavaScript. It defines DHTML as the combination of HTML, JavaScript, CSS, and the DOM to create animated and interactive web pages. It describes the DOM as a standard for accessing and manipulating HTML and XML documents as tree structures. The chapter then explains JavaScript and how it can be used with the DOM to dynamically access and update HTML content, structure, and style. It provides examples of common JavaScript methods and properties for manipulating the DOM, interacting with browsers, and displaying data.
취향기반의 개인화 서비스를 통한 이커머스 혁신 – 소성운 ZIGZAG 데이터사이언티스트, 강상원 마이셀럽스 대표:: AWS Cloud We...Amazon Web Services Korea
패션 테크 스타트업 지그재그의 AWS 기반 지속 가능한 AWS 데이터 분석 플랫폼 구축과 Personalize를 활용한 개인화 상품 추천 서비스 구축 경험을 공유드립니다. [마이셀럽스] MATS(Mycelebs AI Transformation Suite)를 이용한 Data 수집, 시각화, 자동화를 통해 고객 취향 기반의 추천 서비스를 제공한 사례를 공유합니다.
Next.js introduces a new App Directory structure that routes pages based on files, separates components by whether data is fetched on the server or client, and introduces a new way to fetch data using React Suspense. It also supports server-side rendering, static site generation, incremental static regeneration, internationalization, theming, accessibility and alternative patterns to Context API.
AWS 를 활용한 저지연 라이브 (Low Latency Live) 서비스 구현 - 류재춘 컨설턴트/에반젤리스트, GS Neot다 :: AW...Amazon Web Services Korea
라이브 방송의 성장과 더불어 최근 저지연 라이브 (Low Latency Live) 에 대한 관심이 높아지고 있습니다. 본 강연에서는 Low Latency Live 관련 기술적인 배경과 Latency를 줄이는 원리에 대한 설명을 하고, AWS 기반의 Low Latency Live 서비스를 구축하는 방법에 대해 소개합니다.
HTML5 Tutorial For Beginners - Learning HTML 5 in simple and easy steps with examples covering 2D Canvas, Audio, Video, New Semantic Elements, Geolocation, Persistent Local Storage, Web Storage, Forms Elements,Application Cache,Inline SVG,Document
This document provides an introduction to React.js, including:
- React.js uses a virtual DOM for improved performance over directly manipulating the real DOM. Components are used to build up the UI and can contain state that updates the view on change.
- The Flux architecture is described using React with unidirectional data flow from Actions to Stores to Views via a Dispatcher. This ensures state changes in a predictable way.
- Setting up React with tools like Browserify/Webpack for module bundling is discussed, along with additional topics like PropTypes, mixins, server-side rendering and React Native.
React JS is a JavaScript library for building user interfaces. It uses virtual DOM and one-way data binding to render components efficiently. Everything in React is a component - they accept custom inputs called props and control the output display through rendering. Components can manage private state and update due to props or state changes. The lifecycle of a React component involves initialization, updating due to state/prop changes, and unmounting from the DOM. React promotes unidirectional data flow and single source of truth to make views more predictable and easier to debug.
The document discusses microservice architecture using Spring Boot with React and Redux. It defines a microservice as a software development technique where an application is composed of loosely coupled services. It outlines characteristics of microservice architecture such as independent, loosely coupled services that communicate via APIs and can be deployed independently. The document provides an example portal application architecture broken into microservices and discusses components like API gateways, service discovery, configuration services, and client libraries.
This document provides an overview and introduction to React JS. It discusses that React JS is a JavaScript library developed by Facebook for building user interfaces and reusable UI components. It encourages creation of reusable components that present data that changes over time. The document also covers React JS features, architecture, components, best practices, pros and cons, and provides useful links for examples and environment setup.
React is a JavaScript library for building user interfaces. It uses a component-based approach where UI is broken into independent, reusable pieces called components. Components are like functions that return markup describing part of a view. React uses a virtual DOM to efficiently update the real DOM by only making necessary changes. This improves performance by avoiding expensive DOM operations and minimizing DOM access. Components receive data and callbacks through properties and local state is updated using setState(), triggering a re-render of changed parts of the UI.
The document discusses Node.js and Express.js concepts for building web servers and applications. It includes examples of creating HTTP servers, routing requests, using middleware, handling errors, templating with views and layouts, and separating code into models and routes.
[AWS Hero 스페셜] Amazon Personalize를 통한 개인화/추천 서비스 개발 노하우 - 소성운(크로키닷컴) :: AWS C...AWSKRUG - AWS한국사용자모임
Amazon Personalize is Amazon's machine learning service for generating personalized recommendations. It has over 3,700 customers and processes over 26TB of data daily using a machine learning stack of 33 DAGs and 200+ tasks in Airflow. Amazon Personalize offers rule-based, collaborative filtering, and deep learning models to generate recommendations and helps with cold start problems through feature engineering and unsupervised learning techniques. It provides an API endpoint and AutoML capabilities to build, train, tune and deploy machine learning models for recommendations.
CSS3 provides new features for layout, typography, visual effects and graphics. Some key features include multiple column layout, rounded corners, box shadows, opacity, gradients, reflections, transforms and animations. Browser support for CSS3 is evolving with many properties requiring vendor prefixes. CSS3 brings more powerful and flexible options for designing user interfaces beyond what is possible with CSS2.
React is a JavaScript library created by Facebook and Instagram to build user interfaces. It allows developers to create fast user interfaces easily through components. React uses a virtual DOM to update the real DOM efficiently. Some major companies that use React include Facebook, Yahoo!, Airbnb, and Instagram. React is not a complete framework but rather just handles the view layer. It uses a one-way data binding model and components to build user interfaces.
This document discusses Dynamic HTML (DHTML) and JavaScript. It defines DHTML as the combination of HTML, JavaScript, CSS, and the DOM to create animated and interactive web pages. It describes the DOM as a standard for accessing and manipulating HTML and XML documents as tree structures. The chapter then explains JavaScript and how it can be used with the DOM to dynamically access and update HTML content, structure, and style. It provides examples of common JavaScript methods and properties for manipulating the DOM, interacting with browsers, and displaying data.
취향기반의 개인화 서비스를 통한 이커머스 혁신 – 소성운 ZIGZAG 데이터사이언티스트, 강상원 마이셀럽스 대표:: AWS Cloud We...Amazon Web Services Korea
패션 테크 스타트업 지그재그의 AWS 기반 지속 가능한 AWS 데이터 분석 플랫폼 구축과 Personalize를 활용한 개인화 상품 추천 서비스 구축 경험을 공유드립니다. [마이셀럽스] MATS(Mycelebs AI Transformation Suite)를 이용한 Data 수집, 시각화, 자동화를 통해 고객 취향 기반의 추천 서비스를 제공한 사례를 공유합니다.
Next.js introduces a new App Directory structure that routes pages based on files, separates components by whether data is fetched on the server or client, and introduces a new way to fetch data using React Suspense. It also supports server-side rendering, static site generation, incremental static regeneration, internationalization, theming, accessibility and alternative patterns to Context API.
AWS 를 활용한 저지연 라이브 (Low Latency Live) 서비스 구현 - 류재춘 컨설턴트/에반젤리스트, GS Neot다 :: AW...Amazon Web Services Korea
라이브 방송의 성장과 더불어 최근 저지연 라이브 (Low Latency Live) 에 대한 관심이 높아지고 있습니다. 본 강연에서는 Low Latency Live 관련 기술적인 배경과 Latency를 줄이는 원리에 대한 설명을 하고, AWS 기반의 Low Latency Live 서비스를 구축하는 방법에 대해 소개합니다.
HTML5 Tutorial For Beginners - Learning HTML 5 in simple and easy steps with examples covering 2D Canvas, Audio, Video, New Semantic Elements, Geolocation, Persistent Local Storage, Web Storage, Forms Elements,Application Cache,Inline SVG,Document
This document provides an introduction to React.js, including:
- React.js uses a virtual DOM for improved performance over directly manipulating the real DOM. Components are used to build up the UI and can contain state that updates the view on change.
- The Flux architecture is described using React with unidirectional data flow from Actions to Stores to Views via a Dispatcher. This ensures state changes in a predictable way.
- Setting up React with tools like Browserify/Webpack for module bundling is discussed, along with additional topics like PropTypes, mixins, server-side rendering and React Native.
React JS is a JavaScript library for building user interfaces. It uses virtual DOM and one-way data binding to render components efficiently. Everything in React is a component - they accept custom inputs called props and control the output display through rendering. Components can manage private state and update due to props or state changes. The lifecycle of a React component involves initialization, updating due to state/prop changes, and unmounting from the DOM. React promotes unidirectional data flow and single source of truth to make views more predictable and easier to debug.
The document discusses microservice architecture using Spring Boot with React and Redux. It defines a microservice as a software development technique where an application is composed of loosely coupled services. It outlines characteristics of microservice architecture such as independent, loosely coupled services that communicate via APIs and can be deployed independently. The document provides an example portal application architecture broken into microservices and discusses components like API gateways, service discovery, configuration services, and client libraries.
This document provides an overview and introduction to React JS. It discusses that React JS is a JavaScript library developed by Facebook for building user interfaces and reusable UI components. It encourages creation of reusable components that present data that changes over time. The document also covers React JS features, architecture, components, best practices, pros and cons, and provides useful links for examples and environment setup.
React is a JavaScript library for building user interfaces. It uses a component-based approach where UI is broken into independent, reusable pieces called components. Components are like functions that return markup describing part of a view. React uses a virtual DOM to efficiently update the real DOM by only making necessary changes. This improves performance by avoiding expensive DOM operations and minimizing DOM access. Components receive data and callbacks through properties and local state is updated using setState(), triggering a re-render of changed parts of the UI.
The document discusses Node.js and Express.js concepts for building web servers and applications. It includes examples of creating HTTP servers, routing requests, using middleware, handling errors, templating with views and layouts, and separating code into models and routes.
[AWS Hero 스페셜] Amazon Personalize를 통한 개인화/추천 서비스 개발 노하우 - 소성운(크로키닷컴) :: AWS C...AWSKRUG - AWS한국사용자모임
Amazon Personalize is Amazon's machine learning service for generating personalized recommendations. It has over 3,700 customers and processes over 26TB of data daily using a machine learning stack of 33 DAGs and 200+ tasks in Airflow. Amazon Personalize offers rule-based, collaborative filtering, and deep learning models to generate recommendations and helps with cold start problems through feature engineering and unsupervised learning techniques. It provides an API endpoint and AutoML capabilities to build, train, tune and deploy machine learning models for recommendations.
CSS3 provides new features for layout, typography, visual effects and graphics. Some key features include multiple column layout, rounded corners, box shadows, opacity, gradients, reflections, transforms and animations. Browser support for CSS3 is evolving with many properties requiring vendor prefixes. CSS3 brings more powerful and flexible options for designing user interfaces beyond what is possible with CSS2.
React is a JavaScript library created by Facebook and Instagram to build user interfaces. It allows developers to create fast user interfaces easily through components. React uses a virtual DOM to update the real DOM efficiently. Some major companies that use React include Facebook, Yahoo!, Airbnb, and Instagram. React is not a complete framework but rather just handles the view layer. It uses a one-way data binding model and components to build user interfaces.
MEAN 스택을 사용한 IoT 개발 예제를 설명합니다.
* MEAN 스택 기본 내용 소개
* Node.js와 Express를 활용한 간단한 CRUD 서버 작성 방법(아주 단순하지만 (인증을 제외한 나머지) RESTful 서버의 기본 내용을 구현함)
* MongoDB와 Mongoose ODM를 사용한 영속적인 자료 저장 방법
* AngularJS를 사용한 아주 간단한 모니터링 도구 구현(하지만 의존성 주입, 양방향 자료 결합, 라우팅 활용 방법이 모두 들어 있음)
* 모든 예제는 bitbucket(git 호스팅 서비스)에 공개되어 있음
Golang Project Guide from A to Z: From Feature Development to Enterprise Appl...Kyuhyun Byun
This comprehensive presentation offers a deep dive into Go language development methodologies, covering projects of all scales. Whether you're working on a small prototype or a large-scale enterprise application, this guide provides valuable insights and best practices.
Key topics covered:
Distinguishing between small and large projects in Go
Code patterns for small, feature-focused projects
Comparison of Handler and HandlerFunc approaches
Enterprise application design using Domain Driven Design (DDD)
Detailed explanations of architectural layers: Presenter, Handler, Usecase, Service, Repository, and Recorder
NoSQL (DynamoDB) modeling techniques
Writing effective test code and using mocking tools like 'counterfeiter'
Essential tools for production-ready applications: APM, error monitoring, metric collection, and logging services
This presentation is ideal for Go developers of all levels, from beginners looking to structure their first projects to experienced developers aiming to optimize large-scale applications. It provides practical advice on code organization, testing strategies, and operational considerations to help you build robust, maintainable Go applications.
Whether you're starting a new project or looking to improve an existing one, this guide offers valuable insights into Go development best practices across different project scales and complexities.
3. • Server-Side Rendering?
• ImplementaDon
• Checklist
• 스파게티는 먹을 때에만 | 서버 코드를 분리하자
• asset-manifest.json | build 안에 담긴 보물
• 직선보다 빠른 굴절 | TypeScript를 사용하는 편이 좋은 이유
• Extra
• 필수 패키지 설치 이슈
13. render | hydrate
전체 HTML
렌더링
기존 HTML과 비교 후
부분 업데이트
ReactDOM.hydrate(<App />, document.getElementById('root'));
14. Checklist
스파게티는 먹을 때에만 | 서버 코드를 분리하자
asset-manifest.json | build 안에 담긴 보물
직선보다 빠른 굴절 | TypeScript를 사용하는 편이 좋은 이유
15. 스파게티는
먹을 때에만
renderToString() 함수가 서버 코드와 섞이기
마련
bootstrap.js 파일을 추가로 작성해 각자의 코드
를 따로 불러올 것
git submodule 운용 가능
Server Client
bootstrap.js
express app
객체
renderToString()
결과물
app.listen() ...
16. Bad
export default () => {
const app: express.Application = express();
const router: express.Router = express.Router();
router.use('^/$', (req, res) => {
const html = ReactDOMServer.renderToString(<App />);
...
});
...
};
서버 코드 안에서
React를 직접 호출
Front - Server
지나친 커플링
21. asset-
manifest.json
build 폴더에 생성된 모든 자산의 일람표
html string을 만들 때 staDc file의 참조를 가져다
쓸 수 있다
asset-
manifest.json
<img
src={logo}
className="App-logo"
alt="logo"
/>
+
"/static/media/logo.5d5d9eef.svg"
<img
src="/static/media/logo.5d5d9eef.svg"
class="App-logo"
alt="logo"
/>
31. Redux
서버 렌더링 단계에서 데이터를 미리 주입하고 싶을
때만 사용
index.html에 인라인으로 window 전역 store
객체 삽입 -> 클라이언트 코드가 읽어들임
(공식 문서에서 권하는 방식)
https://redux.js.org/recipes/server-
rendering
<script>
window.__PRELOADED_STATE__={}
</script>
+
32. React-
Router-
DOM
html 생성 단계에서 StaticRouter 를 App 위에
Wrapping
서버 또한'*' 경로 라우터를 추가해 react-router
가 만든 path로 접속되더라도 html을 반환하도록 처
리
// server/index.ts
router.use('*', htmlRenderer);
// src/html.tsx
const routerContext = {};
<StaticRouter
location={req.baseUrl}
context={routerContext}
>
<App />
</StaticRouter>
33. React-
Loadable
모듈 이름을 특정해줘야
서버 렌더링 시에 모듈 추적을 할 수 있음!
const Index = Loadable({
loader: () => import(/* webpackChunkName: "IndexChunk" */
'../components/view/index'),
loading: () => null,
modules: ['IndexChunk'],
});