Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 16.5 ('Spreadsheet Databases')
Instant purchase and download via GumRoad!

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 MacTech Magazine and Dr Dobb's Journal. Away from the writing pile, JC spends quality time with his nephew, as a proper uncle should.
Article Description: scription>No description
Article Length (in bytes): 46,838
Starting Page Number: ag
Article Number: 16505
Resource File(s):

Download Icon 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 classes ModelSQL and ModelPred 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 and ModelPred, 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 original medsLib 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.