I am starting to use .cfs files with Lucee 6 now (6.2.1.122), after a fresh install to update Tomcat as well.
I had to change my web.xml settings, but I expected that this “*.cfs” configuration would be default in Lucee 6 setup.
Couldn’t it be that way? Or is there something against it?
1 Like
Ha! let me work some magic, problem is the installer code still supports 5.4 which doesn’t support .cfs
files
I’ll add some conditional logic, this will also benefit the express builds which now all use the same code
https://luceeserver.atlassian.net/browse/LDEV-5574
3 Likes
merged, next installer release will include support
2 Likes
I like the ability to have .cfs
files, but the only use I’ve found for them so far is for chunks of script logic that I want to include, for example as “mixins” to a component.
component{
include "maybeSomeLargeStruct.cfs"
}
Otherwise all scripted logic goes directly in .cfc
files.
Including a .cfs
file (as opposed to requesting it directly) doesn’t require any change to your servlet/web server handler mappings.
I personally believe that .cfs should be the new default for urls:
https://www.foo.com/example.cfs
Borrowing from the MVC paradigm, the .cfs is the cfscript-based controller.
And then the page output (view) is included from a tag-based .cfm template.
That forces separation of business logic vs presentation.
Mixing CFML tags with HTML tags was the original awesome idea of ColdFusion, but that also became the curse when too many developers (myself included) mixed business logic into presentation. That is one of the primary reasons why CFML eventually got a bad reputation within the industry.
Perhaps ironically, I’m not a fan of the rigidness of MVC frameworks when we already have other means of organizing our code. However, I do appreciate the fundamental idea of MVC, which is another reason why I love the combination of .cfc, .cfm, and .cfs!
1 Like