You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We all know that cfinclude can create a "mixin" style environment for any component.
But cfinclude is not very elegant and doesn't lend itself well to modular development.
So my theory is, if we standardize cfm-based foundry modules, or possibly even not standardize it but just allow it, we can use require("module-id") and it would grab a cfm file and include it into a component or a page without the need of a file path or even care about that kind of thing.
cfinclude would always be more efficient when including your own files but require() just gives you one more option for modular development.
Components somewhat lock you down to a particular type of object or structure, with cfm-based modules, you could do different things.
The text was updated successfully, but these errors were encountered:
Not sure how familiar you are with cfmodule, but this might be helpful info:
cfmodule can be used to include arbitrary cfm files, not just just custom tags
cfmodule templates are executed within their own scope (as opposed to include, which executes within the same scope as the calling page)
cfmodule will call the template twice if you include the self-closing xml syntax <cfmodule ... /> or write the open/close tags <cfmodule ...> ... </cfmodule>, but only once if you don't self-close a single tag (<cfmodule ...>)
We all know that cfinclude can create a "mixin" style environment for any component.
But cfinclude is not very elegant and doesn't lend itself well to modular development.
So my theory is, if we standardize cfm-based foundry modules, or possibly even not standardize it but just allow it, we can use require("module-id") and it would grab a cfm file and include it into a component or a page without the need of a file path or even care about that kind of thing.
cfinclude would always be more efficient when including your own files but require() just gives you one more option for modular development.
Components somewhat lock you down to a particular type of object or structure, with cfm-based modules, you could do different things.
The text was updated successfully, but these errors were encountered: