Git Product home page Git Product logo

Comments (4)

jjlauer avatar jjlauer commented on August 28, 2024

That's not really a goal of Rocker. Rocker is designed to be efficient,
compiler-checked, and lightning fast. A Rocker template is compile to a
normal Java class, thus the template must exist on the classpath when its
finally used.

You're free to use the rocker-compiler in your project to get it to spit
out a .java file, then use Rocker's hot reloading feature to load it as it
changes. That would essentially work like you're asking for, but you'd
need to wire up the String -> parser -> generator -> hot reload. However,
I wouldn't recommend that for production use since reloading classes
on-the-fly is not normally something you want to do in production.

If you are looking for extremely dynamic templates, reload on the fly, you
probably should use a different template framework. You essentially trade
dynamic for performance -- and Rocker is 100% focused on performance.

On Wed, Sep 28, 2016 at 3:38 PM, Igor Savin [email protected]
wrote:

Currently Rocker only supports working with templates on a classpath; you
cannot just pass him a template String, map of variables and say "Render
this for me".


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#39, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjwAoBIbRBLDEyOPGh3nD83CeC1q7IXks5qusIugaJpZM4KJOYk
.

from rocker.

kibertoad avatar kibertoad commented on August 28, 2024

Thank you for detailed explanation. Maybe it would be useful to include similar explanation in the official documentation to explain what Rocker is and what is not intended to be and used for?

from rocker.

rockswang avatar rockswang commented on August 28, 2024

Since rocker-compiler is called "compiler", so does it really compiles templates into bytecode? or it's actually a "transpiler"?

from rocker.

jjlauer avatar jjlauer commented on August 28, 2024

It's hard to 100% classify it as a compiler vs. transpiler. I'd say its
currently more of a transpiler than a compiler. It parses templates into a
working AST/model, generates .java files for them, but also can invoke the
java compiler to get those into bytecode.

On Fri, Oct 14, 2016 at 5:25 AM, Rocks Wang [email protected]
wrote:

Since rocker-compiler is called "compiler", so does it really compiles
templates into bytecode? or it's actually a "transpiler"?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#39 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAjwAtp7cO-z4riYHGofxaSZHvclap3Cks5qz0p9gaJpZM4KJOYk
.

from rocker.

Related Issues (20)

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.