All Projects → subchen → Jetbrick Template 2x

subchen / Jetbrick Template 2x

Licence: other
Template Engine for Java

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Jetbrick Template 2x

thera
A template engine for Scala
Stars: ✭ 49 (-86.04%)
Mutual labels:  template-engine
Cookie
A Template-based File Generator. Like cookiecutter but works with file templates instead of project templates.
Stars: ✭ 261 (-25.64%)
Mutual labels:  template-engine
Rivets
Lightweight and powerful data binding.
Stars: ✭ 3,221 (+817.66%)
Mutual labels:  template-engine
essential-templating
A set of templating libraries.
Stars: ✭ 21 (-94.02%)
Mutual labels:  template-engine
Hunt Framework
A Web framework for D Programming Language. Full-stack high-performance.
Stars: ✭ 256 (-27.07%)
Mutual labels:  template-engine
Docpad
Empower your website frontends with layouts, meta-data, pre-processors (markdown, jade, coffeescript, etc.), partials, skeletons, file watching, querying, and an amazing plugin system. DocPad will streamline your web development process allowing you to craft powerful static sites quicker than ever before.
Stars: ✭ 3,035 (+764.67%)
Mutual labels:  template-engine
tonic
Super fast and powerful PHP template engine
Stars: ✭ 48 (-86.32%)
Mutual labels:  template-engine
Pug
Pug template engine for PHP
Stars: ✭ 341 (-2.85%)
Mutual labels:  template-engine
Jinja2cpp
Jinja2 C++ (and for C++) almost full-conformance template engine implementation
Stars: ✭ 257 (-26.78%)
Mutual labels:  template-engine
Email Templates
📫 Create, preview, and send custom email templates for Node.js. Highly configurable and supports automatic inline CSS, stylesheets, embedded images and fonts, and much more!
Stars: ✭ 3,291 (+837.61%)
Mutual labels:  template-engine
bh-php
PHP port of https://github.com/bem/bh. It's cool thing but better use this:
Stars: ✭ 33 (-90.6%)
Mutual labels:  template-engine
bart
A compile time templating language for Rust inspired by Mustache
Stars: ✭ 29 (-91.74%)
Mutual labels:  template-engine
Microwebsrv2
The last Micro Web Server for IoTs (MicroPython) or large servers (CPython), that supports WebSockets, routes, template engine and with really optimized architecture (mem allocations, async I/Os). Ready for ESP32, STM32 on Pyboard, Pycom's chipsets (WiPy, LoPy, ...). Robust, efficient and documented!
Stars: ✭ 295 (-15.95%)
Mutual labels:  template-engine
Contemplate
Contemplate: Fast, extendable object-oriented and light-weight Template Engine for PHP, Python, Node.js, Browser and XPCOM/SDK JavaScript
Stars: ✭ 15 (-95.73%)
Mutual labels:  template-engine
Slime
Minimalistic HTML templates for Elixir, inspired by Slim.
Stars: ✭ 315 (-10.26%)
Mutual labels:  template-engine
katapult
Kickstart Rails development!
Stars: ✭ 21 (-94.02%)
Mutual labels:  template-engine
Doxyrest
A compiler from Doxygen XML to reStructuredText -- hence, the name. It parses XML databases generated by Doxygen and produces reStructuredText for the Python documentation generator Sphinx.
Stars: ✭ 265 (-24.5%)
Mutual labels:  template-engine
Thymeleaf Spring
Thymeleaf integration module for Spring
Stars: ✭ 349 (-0.57%)
Mutual labels:  template-engine
Mikado
Mikado is the webs fastest template library for building user interfaces.
Stars: ✭ 323 (-7.98%)
Mutual labels:  template-engine
Http Rpc
Lightweight REST for Java
Stars: ✭ 298 (-15.1%)
Mutual labels:  template-engine

QQ Group Maven Build Status Coverity Scan Build Status JDK License

概述 Overview

jetbrick-template 是一个新一代 Java 模板引擎,具有高性能和高扩展性。 适合于动态 HTML 页面输出或者代码生成,可替代 JSP 页面或者 Velocity 等模板。 指令和 Velocity 相似,表达式和 Java 保持一致,易学易用。

  • 支持类似于 Velocity 的多种指令
  • 支持模板热加载
  • 支持强类型/弱类型切换
  • 支持静态方法/字段
  • 支持可变参数方法调用
  • 支持方法重载
  • 支持扩展方法
  • 支持扩展函数
  • 支持自定义标签 #tag
  • 支持宏定义 #macro
  • 支持布局 layout
  • 支持安全管理器

文档 Documentation

http://subchen.github.io/jetbrick-template/

简单易用的指令

jetbrick-template 指令集和老牌的模板引擎 Velocity 非常相似,易学易用。

#define(List users)
<table>
  <tr>
    <td>序号</td>
    <td>姓名</td>
    <td>邮箱</td>
  </tr>
  #for (User user : users)
  <tr>
    <td>${for.index}</td>
    <td>${user.name}</td>
    <td>${user.email}</td>
  </tr>
  #end
</table>

基本开发 API

public class JetxTest {

    @Test
    public void test() {
        // 0. 准备一些 Model 数据作为测试
        List<User> users = Arrays.asList(
            new User("张三", "[email protected]"),
            new User("李四", "[email protected]"),
            new User("王五", "[email protected]")
        );

        // 1. 创建一个默认的 JetEngine
        JetEngine engine = JetEngine.create();

        // 2. 获取一个模板对象 (从默认的 classpath 下面)
        JetTemplate template = engine.getTemplate("/users.jetx");

        // 3. 创建 context 对象
        Map<String, Object> context = new HashMap<String, Object>();
        context.put("users", users);

        // 4. 渲染模板到自定义的 Writer
        StringWriter writer = new StringWriter();
        template.render(context, writer);

        // 5. 打印结果
        System.out.println(writer.toString());
    }
}

Maven Dependency

Release 版本已发布到 Maven 中央库: http://central.maven.org/maven2/com/github/subchen/

<dependency>
    <groupId>com.github.subchen</groupId>
    <artifactId>jetbrick-template</artifactId>
    <version>2.1.10</version>
</dependency>

Thirdpart Webmvc Integrations

<dependency>
    <groupId>com.github.subchen</groupId>
    <artifactId>jetbrick-template-web</artifactId>
    <version>2.1.10</version>
</dependency>
<dependency>
    <groupId>com.github.subchen</groupId>
    <artifactId>jetbrick-template-jetbrickmvc</artifactId>
    <version>2.1.10</version>
</dependency>
<dependency>
    <groupId>com.github.subchen</groupId>
    <artifactId>jetbrick-template-springmvc</artifactId>
    <version>2.1.10</version>
</dependency>
<dependency>
    <groupId>com.github.subchen</groupId>
    <artifactId>jetbrick-template-jfinal</artifactId>
    <version>2.1.10</version>
</dependency>
<dependency>
    <groupId>com.github.subchen</groupId>
    <artifactId>jetbrick-template-jfinal3</artifactId>
    <version>2.1.10</version>
</dependency>
<dependency>
    <groupId>com.github.subchen</groupId>
    <artifactId>jetbrick-template-jodd</artifactId>
    <version>2.1.10</version>
</dependency>
<dependency>
    <groupId>com.github.subchen</groupId>
    <artifactId>jetbrick-template-struts</artifactId>
    <version>2.1.10</version>
</dependency>
<dependency>
    <groupId>com.github.subchen</groupId>
    <artifactId>jetbrick-template-nutz</artifactId>
    <version>2.1.10</version>
</dependency>

下载 Downloads

http://subchen.github.io/jetbrick-template/2x/download.html

范例 Demos

https://github.com/subchen/jetbrick-template-2x-samples

开源许可 License

Copyright 2013-2018 Guoqiang Chen, Shanghai, China. All rights reserved.

  Author: Guoqiang Chen
   Email: [email protected]
  WebURL: https://github.com/subchen

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].