Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak docs #313

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Tweak docs #313

merged 1 commit into from
Jan 25, 2024

Conversation

MariusVolkhart
Copy link
Contributor

Fix some Kotlin code, correct an indent level, and provide some more info on how model code generation replaces precompiled templates.

@casid
Copy link
Owner

casid commented Jan 8, 2024

Welcome @MariusVolkhart and thanks for your contributions!

IMHO this note is a bit misleading:
This replaces the process of [precompiling templates](pre-compiling.md).

jte-models generates an additional facade so that templates can be called through that facade. But behind the scenes it either calls the templates dynamically and compiles them on demand (good for development, bad for production), or it calls the previously generated/precompiled template methods (bad for development, good for production).

@MariusVolkhart
Copy link
Contributor Author

Fair point! I was trying to convey that when using the generate stage at build time, you can't also use the pre-compile stage. I found myself spending a fair bit of time trying to wrap my head around the relationship/tradeoff between binary encoding, precompile on-disk, precompile in classpath, and generated models. I'll work on the wording for this.

@@ -52,7 +52,7 @@ Example usage with `HttpServletResponse`:
=== "Kotlin"

```kotlin linenums="1"
val output = new Utf8ByteOutput()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

I'm actually trying to find the time to externalize the code samples in .java/.kt files that are compiled. It is supported by MkDocs, and it would be easier to maintain. We can also externalize the template examples.

Fix some Kotlin code, correct an indent level, cross-reference the various combinations of pre-compiling, binary encoding, and facade generation.
@MariusVolkhart
Copy link
Contributor Author

@casid I took another stab at this, this time linking more liberally between the strategies (binary encoding, pre-compiled, and facade). I would appreciate you giving this another look and any feedback you might have.

@casid casid merged commit 0081c0c into casid:main Jan 25, 2024
2 checks passed
@casid
Copy link
Owner

casid commented Jan 25, 2024

Looks good, thank you so much!

@MariusVolkhart MariusVolkhart deleted the mv/docs branch January 25, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants