branaway / Japid

A Java-based statically-typed fast template engine that can be used in any Java code. It has special adapter for use with the Play! Framework.
113 stars 18 forks source link

About name conventions #34

Closed freewind closed 12 years ago

freewind commented 12 years ago

I found when japid convert a template to a java class, it always uses the file name directly. For example:

SampleLayout.html =======> SampleLayout.java
hello.html =======> hello.java
ask_question.html =====> ask_question.java

This will force us to use template names as "Hello.html", "AskQuestion.html", but I prefer to use "hello.html" and "ask_question.html" for file names.

Will japid make a convertion when generate file names? Automatically convert "abc" to "Abc" and "ab_cd" to "AbCd" ?

branaway commented 12 years ago

Japid does not do any name mangling. I think it's wiser to keep it straightforward. It's totally possible that one has Hello.html and hello.html in the same folder. A simple one-one mapping will take care of this smoothly.

2011/9/21 freewind < reply@reply.github.com>

I found when japid convert a template to a java class, it always uses the file name directly. For example:

SampleLayout.html =======> SampleLayout.java hello.html =======> hello.java ask_question.html =====> ask_question.java

This will force ask to use template names as "Hello.html", "AskQuestion.html", but I prefer to use "hello.html" and "ask_question.html" for file names.

Will japid make a convertion when generate file names? Automatically convert "abc" to "Abc" and "ab_cd" to "AbCd" ?

Reply to this email directly or view it on GitHub: https://github.com/branaway/Japid/issues/34

freewind commented 12 years ago

You are right. Since the generated java code is not important, we don't need to follow the Java convention