It is currently Fri Mar 23, 2018 5:56 am

All times are UTC - 8 hours [ DST ]

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Unit 3 - Lesson 1: Application Design Issues
PostPosted: Wed Jun 29, 2011 8:24 am 
User avatar

Joined: Wed Nov 17, 2010 8:37 am
Posts: 136
Real Name: Terry L. Wiechmann
Began Programming in MUMPS: 0- 0-1971
Model View Controller

Note: Make sure you read the Wikipedia references.

Modern applications are build using design patterns ( where possible. One fundamental pattern that is used in building applications is the Model-View-Controller (

In the process of writing applications, you will notice that certain bodies of code start to look the same with some specific differences. It is at that point you should write a reusable ( body of code (routine or subroutine) that can be called, passing in the specific information via parameters. In many cases the reusable code is specific to your application. However, when you see patterns appearing across many applications, it generally regarded as universal and gets published for everyone to use. This is what happened back in 1995 when the Object Oriented paradigm swept the industry. Erich Gamma et. al. published a book titled Design Patterns: Elements of Reusable Object-Oriented Software. Since then, all these patterns have been published within Wikipedia.

When writing the workshop exercises for this course we will initially write what I call “literal” programs with no regard to reusability. As we do this, the patterns will start to jump out at you. At that point we will start writing reusable code. This is the iterative approach to software development, write and rewrite, evolving the functionality to what the user specified and creating a library of reusable code. In fact, the MUMPS Programming II course is dedicated to evolving the “literal” code base to a very generalized code base that can be reused. When finished, our application should be implemented using the M-V-C pattern so that any user interface can be applied.

Dealing with Errors

In Unit 2 – Lesson 6 we covered how to write a simple error processing routine. I made the statement that it is very important to have an error processing framework put in place to capture error information. It facilitates debugging. There are two tools available to you. The are:

  1. %ET utility
  2. Debugger

First, Cache and MUMPSV1 utility %ET permits you to trap errors and log them. They are extremely helpful. You simply enter this code in the first line of your routine:

Set $ETrap=”Do ^%ET”

To my knowledge GT.M does not have a utility like this. If you feel up to it, write one! :shock:

Second, each MUMPS system has a built in debugger. It is implementation specific and will not be covered here. However, take a detour and learn how to use it for the MUMPS system you are using. Trying to guess as to what causes an error is a huge waste of time.

Database Design

Database Design issues are extremely important when designing an application. However, at this point in the learning process we will not be concerned about them. We addressed the issue of packed record verses node storage previously. These issues will be addressed as we proceed.

Terry L. Wiechmann

Offline Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created