Comments (4)
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.
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.
Since rocker-compiler is called "compiler", so does it really compiles templates into bytecode? or it's actually a "transpiler"?
from rocker.
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)
- GraalVM compatibility HOT 4
- Warnings in Gradle Plugin (@Input annotation used on property of type 'File') HOT 6
- call java function in template HOT 1
- rocker-maven-plugin templateDirectory
- With block invalid: multiple equals symbols found for assignment String href = "/abc?x=y"
- [Doc] it's unclear how to instantiate Rocker
- Loading templates from classpath / jar ? HOT 1
- Parentheses right after variable HOT 2
- Compile time include postprocessor
- support Java 11 HOT 1
- Github latest release points to outdated release.
- Unable to get hot-reload working with tomcat server HOT 3
- Question about formatting
- Generation crashes with NPE if a non-normal file is present in the template directory HOT 1
- Global default null value rendering to avoid NPEs
- it's abandoned? HOT 1
- How to configure Rocker to use GuavaHtmlStringify? HOT 4
- Support Java 17 HOT 2
- Why rocker dont import List class? HOT 2
- Gradle 7 support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocker.