source: trunk/source/examples/cocoa/currency-converter/HOWTO.html @ 8441

Last change on this file since 8441 was 8441, checked in by mikel, 12 years ago

final edits to currency-converter examples

File size: 5.7 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <title>CurrencyConverter HOWTO</title>
6    <link rel="stylesheet" type="text/css" href="HOWTO_files/stylesheets/styles.css" />
7  </head>
8
9  <body>
10
11    <div class="title">
12      <h1>CurrencyConverter HOWTO</h1>
13    </div>
14
15    <div class="subtitle">
16      <h2>Creating Apple's <a
17      href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/index.html">
18            Currency Converter</a> example<br/>
19          with Clozure CL
20      </h2></div>
21
22
23    <div class="body-text">
24      <p>This HOWTO guide explains how to use Clozure CL (formerly
25      OpenMCL) to create a Cocoa application that is functionally
26      identical to Apple's
27      <a
28      href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/index.html">
29        Currency Converter</a> example. The most important
30        difference between Apple's example and this one is that this
31        one is implemented in Common Lisp instead of Objective-C. It
32        uses Clozure CL's Objective-C bridge to provide communication
33        between the Lisp code that you write and Apple's Cocoa
34        frameworks. The resulting application looks and acts just
35        like any other Cocoa application.</p>
36
37      <p>This HOWTO doesn't discuss all the background information
38      that Apple's tutorial covers. Instead, we assume that you have
39      Apple's document handy for reference, and we just describe the
40      specific steps needed to build the example using
41      Apple's InterfaceBuilder application and Clozure CL.</p>
42
43      <p>An observant programmer will look at the code in this example
44      and say, "well, that's trivial! Why create all those classes and
45      connections and so forth just to perform a multiplcation?" That
46      observation is correct: the actual work done by the Currency
47      Converter application is trivial&mdash;both in the Lisp and the
48      Objective-C versions. The point of this example (and Apple's) is
49      not to show you how to perform a multiplication. The point is to
50      show you how Apple's frameworks implement and support the
51      Model-View-Controller paradigm, and how you can use that support
52      to build Cocoa applications. In fact, the work done by the
53      application is <em>intentionally trivial</em>, to emphasize the
54      frameworks rather than the particulars of the application.</p> 
55
56      <p>This HOWTO has the additional purpose of showing you how
57      Clozure CL makes it possible to do exactly the same thing in
58      Lisp that you can do with Objective-C, so that you will
59      understand how to use Lisp with Apple's frameworks.</p>
60
61      <p>The current version of the Clozure CL Objective-C bridge
62      includes code that was formerly distributed separately as the
63      "Bosco" application framework. Because that framework has been
64      integrated with Clozure CL proper, it no longer exists as a
65      separate project.</p>
66    </div>
67
68    <div class="section-head">
69      <h2>Apple's Currency Converter Example</h2>
70    </div>
71
72    <div class="body-text">
73      <p>It will be helpful in understanding this example if you can
74      easily refer to
75      Apple's <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/index.html">
76      Currency Converter</a> tutorial while working through this
77      HOWTO. You might consider opening a separate window or tab, and
78      keeping the Apple example handy while you work.</p>
79
80      <p>In some ways, the Lisp version of the example is simpler
81      than the Objective-C example, but the basic concepts are the
82      same. In particular, the Lisp example follows the same
83      <a
84      href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/02Essence/chapter_2_section_4.html#//apple_ref/doc/uid/TP40000863-CH3-DontLinkElementID_6">
85        Model-View-Controller</a> paradigm that the Apple tutorial
86        uses. If you are new to Cocoa programming, or if you are not
87        familiar with how it uses the Model-View-Controller paradigm,
88        it's probably a good idea to read through the Apple example in
89        full, paying special attention to the Model-View-Controller
90        section. Once you've done that, keep the Apple pages handy in
91        a window for easy reference.</p>
92
93      <p>This Common Lisp version of the Currency Converter example
94      uses Apple's InterfaceBuilder application to build a window and
95      main menu, and then uses Common Lisp code to load and operate
96      that user interface. The Common Lisp code relies on Clozure CL's
97      Objective-C bridge to provide communication between the running
98      Lisp code and Apple's Cocoa frameworks. Once the code is
99      complete, we use the BUILD-APPLICATION function to save a
100      working Cocoa application bundle. That bundle looks and acts
101      just like any other Cocoa application.</p>
102
103    </div>
104
105    <div class="section-head">
106      <h2>Requirements Before You Start</h2>
107    </div>
108
109    <div class="body-text">
110      <p>In order to build this example you will need:</p>
111
112      <ul>
113        <li><p>Mac OS X Leopard (version 10.5.x) or Mac OS X Tiger
114        (version 10.4.x)</p></li>
115        <li><p>Apple's XCode development tools</p></li>
116        <li><p>Apple's InterfaceBuilder application (included with XCode)</p></li>
117        <li><p>A recent version of Clozure CL</p></li>
118        <li><p>The Apple <a
119      href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/index.html">
120        Currency Converter</a> example, for reference</p></li>
121      </ul>
122    </div>
123
124    <div class="nav">
125      <p><a href="HOWTO_files/pages/making_project.html">next</a></p>
126    </div>
127
128  </body>
129</html>
130
Note: See TracBrowser for help on using the repository browser.