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.6 ('Munich 2018')
Instant purchase and download via GumRoad!


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):

Download Icon 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.