modularity - Needing suggestions for modular Coldfusion app development -


I am starting a new application, and I want to focus on making it modular. What I mean is that in my head I want to be able to log on to some basic features, user roles, layout etc., but then I want to be able to add myself to the "chunks" of functionality. Document repository and upload, diary and reminder service .. whatever.

How am I still laying the apple, everything is in the root, different subfolders for images and cfcs, naming related names of variables etc., all database interactions through CFCS, All of my processing is done at the top of the page, then a comment row is displayed on it / page layout displayed below.

I have tried and have various structures around my head out there, but I just get confused about indecision and confused that I am doing it "right". Is there any way to work that is the acceptance of the entire official "framework" without any useful functioning?

Honestly, frameworks can easily be analyzed paralysis. You can easily think of things That's what you do, keep it simple and just keep the back on the keyboard. Use your "own" structure It may not be beautiful, but you will eventually get it and you will see why other frameworks exist

How do you start:

Create folder layouts and view layout layouts all your page layouts in the layout folder (you probably will only be few and maybe even a layout)! Keep all your visual stuff in the footage folder (this will probably show you are doing a bunch of files that are not very well organized). The main thing is that you will not have any page to process the "top of page" code in your visual files.

Use the URL variable "Event" = Action to get your index.cfm to go to your framework, only the .cfm root should be.

In your index.cfm, use a huge cfswitch, to determine which page is to execute the "code top" code (it will be a huge "controller").

mysite.com/index.cfm?event=contactInfo

  & lt; Cfswitch expression = "# url.event #" & gt; & Lt; Cfcase value = "contact information" & gt; & Lt; Top of Page Code & gt; & Lt; Cfset structLayoutInfo ["pagetital"] = "xyz contact info" /> & Lt; Cfmodule template = "/ layout / mainlayout.cfm" attribute = "# structLayoutInfo #">    

Add it with the cfmodule tag to load your layout. Therefore, all your page request index Come through .cfm Index.cfm do all the top page content and then do a cfinclude for the proper view in your thoughts folder. Use the cfmodule tag (tags for headers and footers. View excacion mode content).

Adding features and adding features to your framework. You can probably index.cfm code in a controller folder in CFC Taken with a group that calls your database CFC.


Comments