Jump to content

Embedded JavaScript

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by GhostInTheMachine (talk | contribs) at 07:50, 21 January 2026 (Changing short description from "templating language that allows HTML to be instrumented with simple JavaScript" to "Webpage templating language using JavaScript"). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
EJS (Embedded Javascript)
Original authorEdward Benson
Initial release2007
Repository
TypeWeb Template System, Templating language
LicenseMIT License
Websiteejs.co Edit this on Wikidata

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

EJS was first published in 2007 by Edward Benson[3] under the MIT license[4], allowing developers to embed JavaScript logic directly into HTML. EJS was written as a JavaScript port of the ERB templating system, which blended Ruby within HTML in a similar way. EJS was the first in-browser templating system to follow this pattern. It was quickly incorporated into projects such as Express[5], RabbitMQ[6], and Alpine Linux[7]. After publication, the project was quickly adopted by Bitovi, who became its primary maintainer as part of the DoneJS ecosystem of tools[8]. EJS has since been re-written and re-published by many different authors.

Present Day

In 2025, the most popular EJS implementation is by Matthew Eernisse[9], licensed under the Apache License, version 2.0[citation needed]. It include features such as subtemplates that can be included in other templates and caching to improve performance to make it run faster.[10][11]

References

  1. ^ 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. ^ "EJS Moving to Google Code".
  4. ^ "EJS License".
  5. ^ "Express Helpers License".
  6. ^ "RabbitMQ Federation Management License".
  7. ^ "Open Source used in Alpine Linux" (PDF).
  8. ^ "DoneJS".
  9. ^ "EJS".
  10. ^ "ejs-tj/README.md at master · TimothyGu/ejs-tj". GitHub. Retrieved 2024-11-15.
  11. ^ Klauzinski, Philip; Moore, John (2016-10-28). Mastering JavaScript Single Page Application Development. Packt Publishing Ltd. ISBN 978-1-78588-644-7.