Jump to content

英文维基 | 中文维基 | 日文维基 | 草榴社区

Embedded Javascript

From Wikipedia, the free encyclopedia
EJS (Embedded Javascript)
Original author(s)Matthew Earnisse
Initial releaseFebruary, 2011
Repositoryhttps://github.com/mde/ejs
TypeWeb Template System, Templating language
Websitehttps://ejs.co

Embedded JavaScript (EJS) is a web templating system or templating language that allows developers to code HTML markup with simple JavaScript.[1] It mainly uses logic from JavaScript, which makes benefits for developers who already know JavaScript language before. EJS is frequently used in Node.js, it means that any platform that supports JavaScript language also supports EJS.[2]

History

[edit]

EJS was first published in February 2011 by Matthew Eernisse, also known as mde on GitHub. Eernisse designed EJS to be a simple, light, fast and flexible templating engine for Node.js,[citation needed] and it allows developers to embed JavaScript logic directly into HTML.[3] EJS is licensed under the Apache License, version 2.0.[citation needed] EJS was inspired by templating systems like ERB ( also known as Embedded Ruby) used in Ruby on Rails, which also allows code embedding within HTML.[4] ELS was created for JavaScript developers to create server-rendered HTML pages in an easy and familiar way, likely other templating engines available in other programming ecosystems.[5][1]

EJS include features such as subtemplates that can be included in other templates and caching to improve performance to make it run faster.[6][3]

References

[edit]
  1. ^ a b Oxley, Tim; Rajlich, Nathan; Holowaychuk, T. J.; Young, Alex (2017-08-16). Node.js in Action. Simon and Schuster. ISBN 978-1-63835-517-5.
  2. ^ "EJS -- Embedded JavaScript templates". ejs.co. Retrieved 2024-11-15.
  3. ^ a b Klauzinski, Philip; Moore, John (2016-10-28). Mastering JavaScript Single Page Application Development. Packt Publishing Ltd. ISBN 978-1-78588-644-7.
  4. ^ Powers, Shelley (2012-10-03). Learning Node. "O'Reilly Media, Inc.". ISBN 978-1-4493-2307-3.
  5. ^ "Google Code Archive - Long-term storage for Google Code Project Hosting". code.google.com. Retrieved 2024-11-15.
  6. ^ "ejs-tj/README.md at master · TimothyGu/ejs-tj". GitHub. Retrieved 2024-11-15.