GithubHelp home page GithubHelp logo

00mjk / closure-templates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/closure-templates

0.0 0.0 0.0 65.41 MB

A client- and server-side templating system that helps you dynamically build reusable HTML and UI elements

License: Apache License 2.0

Java 92.69% HTML 0.25% JavaScript 2.77% Python 1.02% TypeScript 0.56% Starlark 2.67% Closure Templates 0.04% Shell 0.01%

closure-templates's Introduction

Closure Templates

Closure Templates are a client- and server-side templating system that helps you dynamically build reusable HTML and UI elements. They have a simple syntax that is natural for programmers, and you can customize them to fit your application's needs. In contrast to traditional templating systems,in which you must create one monolithic template per page, you can think of Closure Templates as small components that you compose to form your user interface. You can also use the built-in message support to easily localize your applications.

Closure Templates are implemented for both JavaScript and Java, so that you can use the same templates on both the server and client side. They use a data model and expression syntax that work for either language. For the client side, Closure Templates are precompiled into efficient JavaScript.

What are the benefits of using Closure Templates?

  • Convenience. Closure Templates provide an easy way to build pieces of HTML for your application's UI and help you separate application logic from display.
  • Language-neutral. Closure Templates work with JavaScript or Java. You can write one template and share it between your client- and server-side code.
  • Client-side speed. Closure Templates are compiled to efficient JavaScript functions for maximum client-side performance.
  • Easy to read. You can clearly see the structure of the output HTML from the structure of the template code. Messages for translation are inline for extra readability.
  • Designed for programmers. Templates are simply functions that can call each other. The syntax includes constructs familiar to programmers. You can put multiple templates in one source file.
  • A tool, not a framework. Works well in any web application environment in conjunction with any libraries, frameworks, or other tools.
  • Battle-tested. Closure Templates are used extensively in some of the largest web applications in the world, including Gmail and Google Docs.
  • Secure. Closure Templates are contextually autoescaped to reduce the risk of XSS.

Getting Started

Support and Project status

Closure Templates is widely used and well maintained internally at Google but does not currently have staffing to support the open source release. As such this project is mostly a 'code dump' and support is minimal. For certain issues, like build integration we are in an especially bad position to offer support.

To get assistance you can use any of the following forums

  1. Look through the documentation.
  2. Post a question to the closure-templates-discuss mailing list.
  3. File a bug on github

Though, given our support staffing, we may not be able to help.

Using Closure Templates with other open source frameworks

There are many Closure Template integrations with other popular open source frameworks. Here are a few options for getting started:

closure-templates's People

Contributors

lukesandberg avatar iteriani avatar emspishak avatar vrana avatar jesse-good avatar sameb avatar davidcphillips avatar slaks avatar cpovirk avatar mknichel avatar smkarwa avatar cushon avatar nreid260 avatar kluever avatar mbrukman avatar ubehebe avatar shicks avatar mikesamuel avatar nathancomstock avatar mprobst avatar orischwartz avatar sumitbhagwani avatar szabodabo avatar fejesjoco avatar concavelenz avatar nanaze avatar atul-bhouraskar avatar nicks avatar pcj avatar viridia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.