SlideShare une entreprise Scribd logo
1  sur  15
Java Script
Template Engine
최성식
template engine?
• static(html)서비스에서 dynamic(JS)
서비스의 기능을 사용 할 수 있도록
도와주는 도구
템플릿 엔진 계열비교
Embedded JavaScript Templates 계열 Logic-less Templates계열
특징 • JS로직을 사용 할 수 있다.
• Syntax가 간단하고 직관적이다.
• 다소 보기가 어려울수도 있다.
• 배우기 쉽다.
• 프로젝트 사이즈가 크지 않을 경우 추천
• JS로직이 없다.
• 반복문이나 조건문 같은 로직을 템플릿 자체 문
법을 가지고 해결한다.
• 비교적 간결한 템플릿을 만들 수 있다.
• 프로젝트 사이즈가 어느정도 있고 템플릿을 적극
활용할 경우 추천
종류 • underscore.js
• Jade
• haml-js
• jQote2
• doT
• Stencil
• Parrot
• Eco
• EJS
• jQuery templates
• node-asyncEJS
• mustache
• dust.js
• handlebars
• Google Closure Templates
• Nun
• Mu
• kite
템플릿 엔진을 선택할 때 고려요소(LinkedIn)
Don't Repeat Yourself
Top Rank 10 templating engines
(2017.03.14 Alex Ivanoves)
1. Mustache
2. Handlebars
3. doT
4. Dust
5. EJS
6. Underscore
7. Pug(Jade)
8. ECT
9. Template7
10. jTemplates
1. Handlebars
Mustache와 비교해서..
• Helper를 이용해 간단한 JS로직 구현가능
• 대략적인 성능테스트에서 렌더링 시간이
Mustache의 절반
Handlebars is a close successor to
Mustache, and both can actually be used
at the same time, with the ability to swap
out tags where necessary.
2. EJS
The last of the most popular JavaScript
template engines is going to be Embedded
JavaScript Templates (EJS)
a lightweight solution towards creating HTML
markup with simple JavaScript code.
3. Underscore
Underscore provides over 100
functions that support both your
favorite workaday functional helpers
Underscore is an external
JavaScript library that enables
developers to take advantage of
functional helpers that keep the
code base intact.
Underscore solves the problem of
having to open your code editor and
not knowing where to start.
4. Pug(Jade)
The Pug template engine (for Node.js) is
literally enabling developers to write code
that looks like paragraphs straight out of
a book
Not only does this improve the overall
code productivity, it can help to
streamline the work on a project that
consists of multiple team members.
https://www.slant.co/topics/51/~best-javascript-templating-engines
#1 Pug
• Clean syntax
• Indentation reflects nesting
• Easy to read, powerful mix-ins
• Logic done in JavaScript
• Easy sub layouts using block and extends
• Compiles to JavaScript
• Allows writing inline JavaScript
• Preprocessor support
• Use Markdown for readable markup
• High performance on the server and client side
• Reuse code in other languages
• Interactive documentation
• No HTML syntax
• Unforgiving in case of indentation
errors
• Performance is not great compared
to other popular templating engines
#2 Handlebars
• Clean syntax
• Multiple implementations
• Mustache compatible
• Compiled rather than interpreted
templates
• Good global helpers support
• Logic-less
• Good paths support
• Clear separation of logic and markup
• Does not play well with Angular.js
• Not much editor support
• Hard to use documentation
• Using partials is cumbersome
#4 EJS
• Cryptic syntax
• No support for block by default
• Complete JavaScript logic
• Same language before and after
rendering
• Consistently scores rather well in
benchmarks
• Powerful error handling
#7 Underscore
• For micro templating
• Pre-compilation
• Not a true templating engine
Reference
• template system image
https://en.wikipedia.org/wiki/File:TempEngWeb016.svg
• 템플릿 엔진 랭킹colorlib(Alex Ivanoves)
https://colorlib.com/wp/top-templating-engines-for-javascript/
• Handlebars
 http://handlebarsjs.com
 http://blog.naver.com/PostView.nhn?blogId=tmondev&logNo=220398995882
 http://sailboat-d.tistory.com/40
• EJS
http://ejs.co
• Underscore
http://underscorejs.org/#template
• 자바스크립트 템플릿 엔진 비교
http://miconblog.com/archives/2013/06/자바스크립트-템플릿-엔진-비교/
• 템플릿 엔진평가
https://www.slant.co/topics/51/~best-javascript-templating-engines

Contenu connexe

Tendances

TypeScript Jump Start
TypeScript Jump StartTypeScript Jump Start
TypeScript Jump StartMostafa
 
SPA, Scalable Application & AngularJS
SPA, Scalable Application & AngularJSSPA, Scalable Application & AngularJS
SPA, Scalable Application & AngularJSMitch Chen
 
The Tale of a React Native Contribution
The Tale of a React Native ContributionThe Tale of a React Native Contribution
The Tale of a React Native ContributionJanic Duplessis
 
Lessons in Open Source from the MongooseJS ODM
Lessons in Open Source from the MongooseJS ODMLessons in Open Source from the MongooseJS ODM
Lessons in Open Source from the MongooseJS ODMValeri Karpov
 
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?MarkupBox
 
Introduction to require js
Introduction to require jsIntroduction to require js
Introduction to require jsAhmed Elharouny
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS LimitationsValeri Karpov
 
MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015Valeri Karpov
 
Typescript overview
Typescript overviewTypescript overview
Typescript overviewThanvilahari
 
Using Javascript in today's world
Using Javascript in today's worldUsing Javascript in today's world
Using Javascript in today's worldSudar Muthu
 
Benefits of Typescript and Javascript Limitations
Benefits of Typescript and Javascript LimitationsBenefits of Typescript and Javascript Limitations
Benefits of Typescript and Javascript LimitationsSrinivasa Perumal
 
A walkthrough of JavaScript ES6 features
A walkthrough of JavaScript ES6 featuresA walkthrough of JavaScript ES6 features
A walkthrough of JavaScript ES6 featuresMichal Juhas
 
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)Hyun-woo Park
 
Tech Talk Tokyo #2 tetsuya matsuzawa
Tech Talk Tokyo #2 tetsuya matsuzawaTech Talk Tokyo #2 tetsuya matsuzawa
Tech Talk Tokyo #2 tetsuya matsuzawaRarejob
 
Resftul API Web Development with Django Rest Framework & Celery
Resftul API Web Development with Django Rest Framework & CeleryResftul API Web Development with Django Rest Framework & Celery
Resftul API Web Development with Django Rest Framework & CeleryRidwan Fadjar
 
Reusability is the goal
Reusability is the goalReusability is the goal
Reusability is the goalRed Pill Now
 
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.comWhen to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.comPerfomatix Solutions
 

Tendances (20)

Require.JS
Require.JSRequire.JS
Require.JS
 
TypeScript Jump Start
TypeScript Jump StartTypeScript Jump Start
TypeScript Jump Start
 
SPA, Scalable Application & AngularJS
SPA, Scalable Application & AngularJSSPA, Scalable Application & AngularJS
SPA, Scalable Application & AngularJS
 
The Tale of a React Native Contribution
The Tale of a React Native ContributionThe Tale of a React Native Contribution
The Tale of a React Native Contribution
 
Lessons in Open Source from the MongooseJS ODM
Lessons in Open Source from the MongooseJS ODMLessons in Open Source from the MongooseJS ODM
Lessons in Open Source from the MongooseJS ODM
 
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
AngularJS vs React JS vs Node JS: Which is Best For Web Development ?
 
Introduction to require js
Introduction to require jsIntroduction to require js
Introduction to require js
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS Limitations
 
MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015
 
Typescript overview
Typescript overviewTypescript overview
Typescript overview
 
Spa with angular
Spa with angularSpa with angular
Spa with angular
 
Using Javascript in today's world
Using Javascript in today's worldUsing Javascript in today's world
Using Javascript in today's world
 
Benefits of Typescript and Javascript Limitations
Benefits of Typescript and Javascript LimitationsBenefits of Typescript and Javascript Limitations
Benefits of Typescript and Javascript Limitations
 
A walkthrough of JavaScript ES6 features
A walkthrough of JavaScript ES6 featuresA walkthrough of JavaScript ES6 features
A walkthrough of JavaScript ES6 features
 
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
WHAT / WHY / HOW WE’RE ENGINEERING AT SMARTSTUDY (English)
 
Tech Talk Tokyo #2 tetsuya matsuzawa
Tech Talk Tokyo #2 tetsuya matsuzawaTech Talk Tokyo #2 tetsuya matsuzawa
Tech Talk Tokyo #2 tetsuya matsuzawa
 
Resftul API Web Development with Django Rest Framework & Celery
Resftul API Web Development with Django Rest Framework & CeleryResftul API Web Development with Django Rest Framework & Celery
Resftul API Web Development with Django Rest Framework & Celery
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
Reusability is the goal
Reusability is the goalReusability is the goal
Reusability is the goal
 
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.comWhen to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
When to use and when not to use AngularJS - Liju Pillai, www.perfomatix.com
 

Similaire à Java Script Template Engine 비교하기

Skillwise Dust JS Template
Skillwise Dust JS TemplateSkillwise Dust JS Template
Skillwise Dust JS TemplateSkillwise Group
 
Swagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierSwagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierMiroslav Resetar
 
Design Patterns In Scala
Design Patterns In ScalaDesign Patterns In Scala
Design Patterns In ScalaKnoldus Inc.
 
Selecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkSelecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkRajitha Pathiraja
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang YoonJesang Yoon
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Reviewnetc2012
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Adam Mokan
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?Balajihope
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overviewJesse Warden
 
React js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREReact js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREnearlearn
 
React js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREReact js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREnearlearn
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
JS - The Unknown Basics.pptx
JS - The Unknown Basics.pptxJS - The Unknown Basics.pptx
JS - The Unknown Basics.pptxParveenSoni21
 
Autoframework design
Autoframework designAutoframework design
Autoframework designForge Events
 
Internship softwaretraining@ijse
Internship softwaretraining@ijseInternship softwaretraining@ijse
Internship softwaretraining@ijseJinadi Rashmika
 

Similaire à Java Script Template Engine 비교하기 (20)

Javascript best practices
Javascript best practicesJavascript best practices
Javascript best practices
 
Skillwise Dust JS Template
Skillwise Dust JS TemplateSkillwise Dust JS Template
Skillwise Dust JS Template
 
Swagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierSwagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlier
 
Design Patterns In Scala
Design Patterns In ScalaDesign Patterns In Scala
Design Patterns In Scala
 
Selecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkSelecting the Best Javascript Web Framework
Selecting the Best Javascript Web Framework
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoon
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Review
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
 
Java 9, JShell, and Modularity
Java 9, JShell, and ModularityJava 9, JShell, and Modularity
Java 9, JShell, and Modularity
 
Angular Js
Angular JsAngular Js
Angular Js
 
Welcome to React.pptx
Welcome to React.pptxWelcome to React.pptx
Welcome to React.pptx
 
Dust.js
Dust.jsDust.js
Dust.js
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
React js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREReact js TRAINING IN BANGALORE
React js TRAINING IN BANGALORE
 
React js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREReact js TRAINING IN BANGALORE
React js TRAINING IN BANGALORE
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
JS - The Unknown Basics.pptx
JS - The Unknown Basics.pptxJS - The Unknown Basics.pptx
JS - The Unknown Basics.pptx
 
Autoframework design
Autoframework designAutoframework design
Autoframework design
 
Internship softwaretraining@ijse
Internship softwaretraining@ijseInternship softwaretraining@ijse
Internship softwaretraining@ijse
 

Plus de SeongSik Choi

W8(체중관리 챗봇)
W8(체중관리 챗봇)W8(체중관리 챗봇)
W8(체중관리 챗봇)SeongSik Choi
 
Ubuntu & C9(node.js) with AWS
Ubuntu & C9(node.js) with AWSUbuntu & C9(node.js) with AWS
Ubuntu & C9(node.js) with AWSSeongSik Choi
 
Kakao Bot(Plus friend)
Kakao Bot(Plus friend)Kakao Bot(Plus friend)
Kakao Bot(Plus friend)SeongSik Choi
 
Firebase Database 둘러보기
Firebase Database 둘러보기Firebase Database 둘러보기
Firebase Database 둘러보기SeongSik Choi
 
리눅스를 이용한 Nas만들기
리눅스를 이용한 Nas만들기리눅스를 이용한 Nas만들기
리눅스를 이용한 Nas만들기SeongSik Choi
 

Plus de SeongSik Choi (13)

W8(체중관리 챗봇)
W8(체중관리 챗봇)W8(체중관리 챗봇)
W8(체중관리 챗봇)
 
Ubuntu & C9(node.js) with AWS
Ubuntu & C9(node.js) with AWSUbuntu & C9(node.js) with AWS
Ubuntu & C9(node.js) with AWS
 
Kakao Bot(Plus friend)
Kakao Bot(Plus friend)Kakao Bot(Plus friend)
Kakao Bot(Plus friend)
 
Linebot
LinebotLinebot
Linebot
 
RokSeoul
RokSeoulRokSeoul
RokSeoul
 
AR tool - Vuforia
AR tool - VuforiaAR tool - Vuforia
AR tool - Vuforia
 
Din9talk(beta0.3.1)
Din9talk(beta0.3.1)Din9talk(beta0.3.1)
Din9talk(beta0.3.1)
 
Din9talk(beta0.2.0)
Din9talk(beta0.2.0)Din9talk(beta0.2.0)
Din9talk(beta0.2.0)
 
Firebase Database 둘러보기
Firebase Database 둘러보기Firebase Database 둘러보기
Firebase Database 둘러보기
 
FCM알아보기
FCM알아보기FCM알아보기
FCM알아보기
 
GCM demo on Android
GCM demo on AndroidGCM demo on Android
GCM demo on Android
 
HTTPS, 원격제어
HTTPS, 원격제어HTTPS, 원격제어
HTTPS, 원격제어
 
리눅스를 이용한 Nas만들기
리눅스를 이용한 Nas만들기리눅스를 이용한 Nas만들기
리눅스를 이용한 Nas만들기
 

Dernier

Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Anthony Dahanne
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 

Dernier (20)

Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 

Java Script Template Engine 비교하기

  • 2. template engine? • static(html)서비스에서 dynamic(JS) 서비스의 기능을 사용 할 수 있도록 도와주는 도구
  • 3. 템플릿 엔진 계열비교 Embedded JavaScript Templates 계열 Logic-less Templates계열 특징 • JS로직을 사용 할 수 있다. • Syntax가 간단하고 직관적이다. • 다소 보기가 어려울수도 있다. • 배우기 쉽다. • 프로젝트 사이즈가 크지 않을 경우 추천 • JS로직이 없다. • 반복문이나 조건문 같은 로직을 템플릿 자체 문 법을 가지고 해결한다. • 비교적 간결한 템플릿을 만들 수 있다. • 프로젝트 사이즈가 어느정도 있고 템플릿을 적극 활용할 경우 추천 종류 • underscore.js • Jade • haml-js • jQote2 • doT • Stencil • Parrot • Eco • EJS • jQuery templates • node-asyncEJS • mustache • dust.js • handlebars • Google Closure Templates • Nun • Mu • kite
  • 4. 템플릿 엔진을 선택할 때 고려요소(LinkedIn) Don't Repeat Yourself
  • 5. Top Rank 10 templating engines (2017.03.14 Alex Ivanoves) 1. Mustache 2. Handlebars 3. doT 4. Dust 5. EJS 6. Underscore 7. Pug(Jade) 8. ECT 9. Template7 10. jTemplates
  • 6. 1. Handlebars Mustache와 비교해서.. • Helper를 이용해 간단한 JS로직 구현가능 • 대략적인 성능테스트에서 렌더링 시간이 Mustache의 절반 Handlebars is a close successor to Mustache, and both can actually be used at the same time, with the ability to swap out tags where necessary.
  • 7. 2. EJS The last of the most popular JavaScript template engines is going to be Embedded JavaScript Templates (EJS) a lightweight solution towards creating HTML markup with simple JavaScript code.
  • 8. 3. Underscore Underscore provides over 100 functions that support both your favorite workaday functional helpers Underscore is an external JavaScript library that enables developers to take advantage of functional helpers that keep the code base intact. Underscore solves the problem of having to open your code editor and not knowing where to start.
  • 9. 4. Pug(Jade) The Pug template engine (for Node.js) is literally enabling developers to write code that looks like paragraphs straight out of a book Not only does this improve the overall code productivity, it can help to streamline the work on a project that consists of multiple team members.
  • 11. #1 Pug • Clean syntax • Indentation reflects nesting • Easy to read, powerful mix-ins • Logic done in JavaScript • Easy sub layouts using block and extends • Compiles to JavaScript • Allows writing inline JavaScript • Preprocessor support • Use Markdown for readable markup • High performance on the server and client side • Reuse code in other languages • Interactive documentation • No HTML syntax • Unforgiving in case of indentation errors • Performance is not great compared to other popular templating engines
  • 12. #2 Handlebars • Clean syntax • Multiple implementations • Mustache compatible • Compiled rather than interpreted templates • Good global helpers support • Logic-less • Good paths support • Clear separation of logic and markup • Does not play well with Angular.js • Not much editor support • Hard to use documentation • Using partials is cumbersome
  • 13. #4 EJS • Cryptic syntax • No support for block by default • Complete JavaScript logic • Same language before and after rendering • Consistently scores rather well in benchmarks • Powerful error handling
  • 14. #7 Underscore • For micro templating • Pre-compilation • Not a true templating engine
  • 15. Reference • template system image https://en.wikipedia.org/wiki/File:TempEngWeb016.svg • 템플릿 엔진 랭킹colorlib(Alex Ivanoves) https://colorlib.com/wp/top-templating-engines-for-javascript/ • Handlebars  http://handlebarsjs.com  http://blog.naver.com/PostView.nhn?blogId=tmondev&logNo=220398995882  http://sailboat-d.tistory.com/40 • EJS http://ejs.co • Underscore http://underscorejs.org/#template • 자바스크립트 템플릿 엔진 비교 http://miconblog.com/archives/2013/06/자바스크립트-템플릿-엔진-비교/ • 템플릿 엔진평가 https://www.slant.co/topics/51/~best-javascript-templating-engines

Notes de l'éditeur

  1. 정보의 중복을 줄이는 것 다중 언어를 지원하는가 변경사항이 즉시 적용되는지 또는 컴파일/디플로이 사이클이 있는지 브라우저와 서버에 렌더되는게 얼마나 오래걸리는지 배우기 쉬운지 한번 배우면 얼마나 빠르게 적용할 수 있는지 클라이언트 및 서버사이드에 같은 템플릿을 사용하여 렌더링 할 수 있는지 활동적인 관련 커뮤니티가 있는지 다른 js라이브러리에 의존하는지 테스트하기 쉬운지 단계적 디버깅이 가능한지 에디터를 지원하는 지 얼마나 안정적인지 메뉴얼 정리가 잘 되어있는지 템플릿의 문서화를 장려하는지 혹은 주석을 요구하는지
  2. Mustache의 중첩괄호방식을 차용 {{ }} *Helper 개념을 도입하여 **Mustache의 제약사항을 상당히 덜어냄 서버에서 받아온 JSON 데이터를 필요에 따라간편하게 가공하여 사용할수 있다는 점이 가장 큰 매력 Precompiling Templates?? *if, unless 등의 기본 헬퍼와 사용자 정의 헬퍼를 이용해서 간단한 로직을 구현할 수 있다.  **Codelss를 지향하는 Mustache는 코드의 중간 가공에 제약이 많음.
  3. <%= %>를 이용하여 구분 html파일에 JS를 직접 사용가능 비교적 배우기가 쉬움 디버깅 가능
  4. 개발자가 코드 베이스를 그대로 유지할 수 있는 기능 도우미를 이용할 수 있는 외부 자바 스크립트 라이브러리. < % 자바스크립트 코드 %>  < %= 치환될 데이터 변수 %> < %- escaped 데이터 변수 %> jQuery를 좀 알아야할 것 같음.
  5. indentation errors 들여쓰기 오류 mixin 기존에 있던 객체의 기능을 그대로 가져가면서 다른 객체에 추가할 때 주로 사용(이벤트에 유용)
  6. EJS는 다양한 파일에 걸쳐 템플릿을 재사용할 수 있는 블록 기능을 지원하지 않습니다.