Article Preview
Buy Now
FEATURE
Building a Controller
Designing and Implementing a Data-Entry Controller Class
Issue: 16.6 (November/December 2018)
Author: JC Cruz
Author Bio: JC is a freelance writer based in British Columbia. He is 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: n>No description availabl
Article Length (in bytes): 46,602
Starting Page Number: r>
Article Number: 16605
Resource File(s):
project16605.zip Updated: 2018-11-01 11:15:54
Related Link(s): None
Excerpt of article text...
Up to now, I built my controllers as code modules. But a module is not an object. It "violates" the MVC design paradigm and it lacks the many advantages that come from a real object. It is high time I correct this.
In today's article, I shall show how I designed a data-entry controller. I shall describe the three subclasses that are the basis for that controller, describe how I implement the controller and how it compares to the original module.
The revised version of the FooHealth demo project (Mk2) is available from the magazine's website.
Readers must have a working knowledge of Xojo and object-oriented design.
The MVC Paradigm, Revisited
As I have often stated in previous articles, I designed and developed the personal health solution, FooHealth, according to the
model-view-controller (MVC) paradigm (Figure 1). The models archive, manages and transforms the user-patients' health data. The views present the data and interact with user-patients. And the controllers regulate the flow of data between models and views, or between models and other controllers.
...End of Excerpt. Please purchase the magazine to read the full article.