1 / 14

FW/1 - Framework One

FW/1 - Framework One. An introduction to the ColdFusion framework created by Sean Corfield. Presented by Ben Ellefson. About Me. ColdFusion developer for 9 years Twin Cities CFUG Manager Framework enthusiast

brede
Télécharger la présentation

FW/1 - Framework One

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FW/1 - Framework One An introduction to the ColdFusion framework created by Sean Corfield. Presented by Ben Ellefson

  2. About Me • ColdFusion developer for 9 years • Twin Cities CFUG Manager • Framework enthusiast • Experience with Fusebox, Model-Glue, Mach-ii, ColdBox, ColdSpring, Reactor and now FW/1 • Disclaimer: Mach-ii fan

  3. What is FW/1? • ColdFusion MVC Framework • Lightweight – single CFC file (1700 lines) • Convention based instead of configuration based • Flexible code organization

  4. Why Sean made FW/1 • Dissatisfied with current application frameworks • Too bloated • Too complex • Requires XML • Dependent on configuration • Too much overhead for simple apps

  5. Simple Application • org • Contains single framework file • views • Contains section folders • View cfm files within each folder • Application.cfc • Extends org.corfield.framework • Index.cfm • Blank

  6. Standard Application • controllers • Contains cfc for each section • layouts • Contains cfm for each layout • services • Contains cfc for each service

  7. FW/1 URLs • All links direct to /index.cfm • Pages access using ?action=section.item • Section = name of folder within views folder • Item = file within views/section folder • SES URLs available • /index.cfm/section/item/name/value

  8. Controllers • ?action=section.item looks for the method item() in /controllers/section.cfc • Passes the request collection “rc” as a single argument. Struct containing url and form variables, plus more. • Automatically calls before(), startItem(), Item(), endItem(), after() • Controllers are cached, cleared with ?reload=true

  9. Layouts • Multiple layouts are available • View Layout: /layouts/section/item.cfm • Section Layout: /layouts/section.cfm • Site Layout: /layouts/default.cfm • Layouts cascade from view to section to site • Cancel cascading by setting request.layout = false • #body# contains current rendered view

  10. Services • Services called from controller by fw.service(“cfc.function",“variable") • Results placed in requet collection “rc” with variable name stated in the call

  11. Views • Receive the request collection “rc” from the controller to display variables populated by the service. • View file called is automatically determined by the action (i.e. section.item) • View file can be changed by calling setView() or setLayout() to call a new action.

  12. Critique • Hard to find information • No framework website • Documentation only found through Corfield’s Blog • No community around FW/1 • Very little found via Google search • Framework not compatible with CF previous to 9.0.1 • Conventions assume small app and do not allow for deep nesting of folders.

  13. Critique • Sample and Skeleton apps are poor • Filled with bugs • Too simple to understand how a full app would be built with FW/1 • No comments in code • In 6 hours testing for this presentation, I was unable to build one page that had a query in the service passed to the view to display.

  14. More Information • Available for download at http://fw1.riaforge.org/ • Free for use under the Apache 2.0 License • Latest version requires ColdFusion 9.0.1 • Documentation at https://github.com/seancorfield/fw1/wiki

More Related