KHIS 2 Proposed Application Structure

Folder Structure

  • model
    • entity.cfc
    • "functionalarea".cfc (project.cfc etc. extends entity.cfc)
    • security.cfc
    • config.cfc
  • controller
    • entity.cfc
    • "entity".cfc (project.cfc etc. extends entity.cfc)
  • library
    • display.cfc
    • element.cfc
    • menu.cfc
    • utils.cfc
  • view
    • "functionalarea"
      • list.cfm
      • show.cfm
  • http
    • index.cfm
    • welcome.cfm
    • "functionalarea"
      • index.cfm
      • handler.cfm
    • images
    • css
  • log
  • config
    • display
      • global
      • "account"
        • "entity"
    • templates
      • global
      • "account"
  • docstore
    • "account"

Folder Usage

Coldspring - 3rd party library - do not touch

Congfig - Coldspring configuration - object dependencies

Controller - !important doing things place, all logic for processing actions (forms, archive, unarchive etc)

- where docs store, contains documents uploaded to individual accounts on the system.

HTTP - Folder is the visible part of the application. Each functional area has its own folder. The index.cfm and handler.cfm files direct the "event" to the appropriate controller. Contains html code inc style sheet, should have very little or no server side code.

Library - store for utility functions, DTO calc, DTO Assembler, display

log - contains log files for email processing and error capture.

Model - representation of db. DAO (talking to db) DTO (data container) bean / service (set of methods for accessing DAO). Folder is for get/set/init functions in the application

- custom method, customer coldfusion tags

View -
Config - action (verb, doing things)- list all actions e.g. show form, call method (Archive, save, unarchive etc.) contains the application config files and any generic and account specific content templates. See Display XML Structure?
Display -

  • all about main pages
  • Sets configuration for what tabs go where
  • Also stores redirects for forms.
  • where access permissions are set for each display element. two types of roles:
  • function roles - this object has X property
  • Security roles - this user has X property

Example: action may only appear if object has the write access property and user has permission to perform action the general
Template - defines data to be called by the tags to be shown in a view View - Lego kit. little blocks to build pages, folder contains form element display cfcs and entity layout displays. Example: forms, panels, search, tab lots of fragments pulled together by the xml file config/display/*.xml)

Base - used by multiple pages, e.g. access rights, collections


Possibility of using ColdSpring? to manage dependancies between "functionalarea" cfcs.
generic database functions based on entityname to call stored procedures

Last modified 3 years ago Last modified on 17 Sep 2015 10:06:16