3 Answers
3

This is a perfectly reasonable question, and with a bit of care it is possible to write GUI code that is easy to maintain. Some suggestions:

Put the GUI layout code and the "business logic" in different m-files. (see this FileExchange submission for example code). Relatedly, use nested functions to maintain GUI state instead of passing of using setappdata and getappdata or passing around a structure.

In general, use nested and anonymous functions for callbacks. Nested function are similar to inner classes in Java, and anonymous functions implement lexical closures (like blocks in Ruby).

Give each GUI object (e.g., slider, axes) a unique and meaningful tag. For example, "frequencySlider" or "dataAxes". This helps reinforce the separation between GUI layout and the logic.

The gui controls provided by GUIDE are fairly low-level, but you can implement reusable higher-level components by choosing systematic tag names for the various controls (e.g., 'frequencySlider' for a slider and the 'frequencyLabel' for the associated text label). The component initialization routine can use findobj to look up the various parts of the component and initialize them. E.g.

I assume that you (Dan Vinton) have some knowledge in sw engineering and in design patterns an you are looking for the common practice in the MatLab world. For this purpose I would take a look at the GUI packages MatLab toolboxes such as optimization, curve fitting, etc. The GUI's of all these toolboxes come with their source code (they are regular MatLab scripts). You can also take a look at it or at the source code of several high-ranked GUI packages from MatLab Central. These will give you a good representation of common practice in MatLab.

I don't have experience with creating GUI's in matlab but if your company will spend mony on it matlab for .net may be a quicker option. It will allow you to write matlab code that will be rapped in a com component that can be called from .net which means you could write your GUI in any .net language you wanted. The link for it is below.
http://www.mathworks.com/products/netbuilder/