Brian,
In layman terms (and I’m sure some could consider this an over-simplification, as there are much more complex explanations to be had), the Lucee servlet is the “app" that runs within the servlet container, which is the “app" that runs within the “app" that is the JRE.
Your CFML code is the smallest “doll” in the Java Russian nesting doll, if you will. Each “doll” introduces shared language, classes and conventions along the way that the nested applications/servlets can take advantage of. You wouldn’t want those all in the language, itself, because their purposes, classes and conventions are not universal to all of the potential use-cases of the language.
This is not uncommon in any programming languages. Though they are not called such and differ in their implementation, NodeJS effectively functions as a “JRE" for Javascript, with each dependency in the chain (e.g. ExpressJS) becoming a “container” of sorts that introduces new language and conventions. Rails the same for Ruby - along with its framework ( aka - the Rails "container” ). PHP for the web requires a “container” in the form of FastCGI or some other middleware that can speak to a web server. Building apps with Go, Python, or any other language often requires (or is made easier by) the inclusion of “containers” along the way.
In short, Lucee introduces, via the JRE first and then the servlet container, the shared conventions through which a translation from CFML to the top-level language is possible. Without the nested “doll” the final step of translation is impossible.
HTH,
JonOn April 1, 2016 at 4:32:50 PM, Brian FitzGerald (@Brian_FitzGerald) wrote:
I realize this probably sounds like a ridiculous question, but I’m going to ask it anyway. For the layman (aka cfml/lucee-script developer), leaving buzzwords aside, why is the “servlet container” necessary in the world of lucee (and other languages built on top of Java)?
If the JVM process java bytecode, and Lucee compiles lucee script into java bytecode, then why do we need Tomcat? I realize that it “implements several Java EE specifications,” but that doesn’t help my understanding (as a layman). Could Tomcat (and the specifications it implements) be considered an “extension” of the Java, much like the Lucee 5 “core” will only implement a subset of language features, with additional features (i.e. image processing, or pdf processing, or whatever) only available as “extensions” to that core?
In plain English, what exactly does Tomcat provide that Java itself doesn’t already offer, and why doesn’t Java implement those specifications on its own?? Help me wrap my melon around this please. Google seems to offer very little beginner friendly content to “introduction to tomcat.” Thank you Java/Tomcat/Lucee enlightened warriors.
You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/66032e04-2be9-4064-aaf8-fb59b2e49852%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.