1 | <html xmlns:saxon="http://icl.com/saxon"> |
---|
2 | <head> |
---|
3 | <link rel="stylesheet" type="text/css" href="doc.css"/> |
---|
4 | <link rel="stylesheet" type="text/css" href=""/> |
---|
5 | <meta author="The MathWorks Ltd."/> |
---|
6 | <meta copyright="2011 The MathWorks Ltd."/> |
---|
7 | <title>Scalability</title> |
---|
8 | </head> |
---|
9 | |
---|
10 | |
---|
11 | <body> |
---|
12 | <table class="header" width="100%" border="0" cellspacing="0" cellpadding="0"> |
---|
13 | <tr> |
---|
14 | <td bgcolor="#e4f0f8"><A href="User guide.html"><font face="Arial" bgcolor="#e4f0f8" size="+0" underline="0" color="#000000"><b>User guide</b></font></A></td> |
---|
15 | <td width="36" bgcolor="#e4f0f8"><A HREF="User guide8_5.html"><IMG SRC="Images/leftarrow.png" BORDER="0" ALT="previous page"/></A><A HREF="index.html"><IMG SRC="Images/rightarrow.png" BORDER="0" ALT="next page"/></A></td> |
---|
16 | </tr> |
---|
17 | </table> |
---|
18 | |
---|
19 | |
---|
20 | <br clear="all"/> |
---|
21 | |
---|
22 | <h2>8.6: Scalability <a href="User guide8.html"><img src="Images/uparrow.png" border="0" align="top" alt="Go back up one level"/></a></h2> |
---|
23 | |
---|
24 | <p>As applications get bigger the code gets more complex. The simple |
---|
25 | application structure used here does not scale well to large applications, |
---|
26 | however some small adjustments can make life much better:</p> |
---|
27 | <ul> |
---|
28 | <li>Convert the "data" structure into a <a href="matlab: doc handle">handle object</a>. This allows |
---|
29 | a single "data" object to be shared between mutliple graphical interfaces, and in turn means that the interface |
---|
30 | need not be built as a single monolithic entity.</li> |
---|
31 | <li>Use the <a href="matlab: doc event.listener">events system</a> to trigger updates |
---|
32 | to specific parts of the GUI in response to bits of the data object changing. This removes the need |
---|
33 | for a single large "UpdateInterface" function and reduces coupling between parts of the interface. For example, |
---|
34 | the "SelectedDemo" property would have an associated event such that when it is changed by a callback (or from the command-line) it |
---|
35 | notifies other interface components of the change. Each interface component (or group thereof) can |
---|
36 | just listen for the events that affect it.</li> |
---|
37 | </ul> |
---|
38 | <p>Advice on how to build large-scale applications is beyond the scope |
---|
39 | of this document. If you need help in this area, please contact your MathWorks |
---|
40 | account manager who will be able to put you in touch with a technical specialist.</p> |
---|
41 | |
---|
42 | |
---|
43 | <br clear="ALL"/> |
---|
44 | <table class="footer" width="100%" border="0" cellspacing="0" cellpadding="0"> |
---|
45 | <tr> |
---|
46 | <td width="18" height="15" bgcolor="#e4f0f8" align="left"><a href="User guide8_5.html"><img src="images/leftarrow.png" border="0" alt="previous page"/></a></td> |
---|
47 | <td width="40%" height="15" bgcolor="#e4f0f8" align="left"><a href="User guide8_5.html"><font face="arial" bgcolor="#e4f0f8" size="normal" underline="0" color="#000000">Running it</font></a></td> |
---|
48 | <td width="20%" height="15" bgcolor="#e4f0f8" align="center"><a href="index.html"><font face="arial" bgcolor="#e4f0f8" size="normal" underline="0" color="#000000">[Top]</font></a></td> |
---|
49 | <td width="40%" height="15" bgcolor="#e4f0f8" align="right"><a href="index.html"><font face="arial" bgcolor="#e4f0f8" size="normal" underline="0" color="#000000">Front page</font></a></td> |
---|
50 | <td width="18" height="15" bgcolor="#e4f0f8" align="right"><a href="index.html"><img src="images/rightarrow.png" border="0" alt="next page"/></a></td> |
---|
51 | </tr> |
---|
52 | </table> |
---|
53 | <font face="Arial" bgcolor="#e4f0f8" size="normal" underline="0" color="#000000">© 2011 The MathWorks Ltd</font> |
---|
54 | <TT>• </TT><a href="matlab: helpview([matlabroot,'/license.txt'])">Terms of Use</a> |
---|
55 | <TT>• </TT><a href="matlab: helpview([matlabroot,'/patents.txt'])">Patents</a> |
---|
56 | <TT>• </TT><a href="matlab: helpview([matlabroot,'/trademarks.txt'])">Trademarks</a> |
---|
57 | |
---|
58 | </body> |
---|
59 | </html> |
---|
60 | > |
---|