Article Preview
Buy Now
FEATURE
Refactoring a Controller Module, Part 2
Modifying the module for medication alerts
Issue: 16.5 (September/October 2018)
Author: JC Cruz
Author Bio: JC is a freelance writer based in British Columbia. He was a regular contributor to
Article Description: scription>No description
Article Length (in bytes): 46,838
Starting Page Number: ag
Article Number: 16505
Resource File(s):
project16505.zip Updated: 2018-08-31 11:10:01
Related Link(s): None
Excerpt of article text...
In part one of this article, I described how I split the
medsLib
module into two controller modules: one for alerts, another for data entry. I also described how I used the custom classesModelSQL
andModelPred
in the new data-entry module.Now in part two, I turn my attention to the alerts module. My goals are still the same: incorporate
ModelSQL
andModelPred
, modify the workflow routines, and remove all extraneous code and resources.Readers must have a working knowledge of REALbasic, SQLite and object-oriented design. The updated version of the demo project FooHealth (Mk131) is available from the magazine's website.
Examining the Controller Module
In Figure 1 is the "new" controller module
medsAlert
. This module was the originalmedsLib
module, minus the parts that make up the data entry domain. What remains are those four parts that make up the alerts domain.In the first part are the
static resources , all of them constants. Some of the constants have a protected access state, others a private state.
...End of Excerpt. Please purchase the magazine to read the full article.