How to develop GUI applications in Squeak
Last updated at 5:48 pm UTC on 31 October 2006
Question: How to develop GUI applications in Squeak
Answer: From: Hannes Hirzel Sent: Tuesday, December 30, 2003 11:08 AM
- There are efforts in Squeak to do traditional GUI design (e.g. BobsUI) in Squeak.
- But for your intended application (e-learning) the direct use of Morphic is surely more appropriate. ( Morphic ).
- You start in the main project and you add subproject.
- In the projects you do layouts and arrangements of the things you want to show (think of Powerpoint or Impress).
- You place morphs on the desktop. The morphs may be animated by the tile-based scripting language 'e-toys' or you may directly program them in Smalltalk. A simple example of a button which jumps to another project you find under Morph mouse up action (Smalltalk expression)
- A useful morph might as well be the PlotMorph and Microcosms
- There are quite some examples on the web how to set up Morphic projects for e-learning. However there could be more ....
- An interesting page to visit is surely the Kyoto school project http://www.squeakland.org/images/news/news.htm (I know there is a better link - one with larger screenshots of actual projects but I do not have it handy.)
Question I've noticed that Smalltalk/V, Smalltalk-80 and Squeak use different Model-View-Controller (MVC) models.
Answer From: Boris Gaertner Sent: January 23, 2004
Yes, this is true. The View-Controller classes of Squeak are closer to Smalltalk-80 than to Smalltalk/V, but there are some subtle differences to Smalltalk-80.
Question Is it necessary to learn older MVC models before progressing to newer MVC models? Or can one just start with, let's say, Morphic (A newer model).
Answer It is not necessary to learn the older models first. Morphic and MVC are independent. It is entirely possible to begin with Morphic. (and it is equally possible to never use Morphic, but I think that Morphic is here to be used. It has a lot of interesting features that are not part of MVC.) Morphic uses some features of MVC and some classes (PluggableListMorph, PluggableTextMorph are protocol compatible to the View classes)
Question For example: Should I learn the Smaltalk/V Model-Pane-Dispatcher model before learning the Smalltalk-80 MVC version. Then after learning the Smalltalk-80 MVC version, learn the Morphic version?
Answer This is a posible way to do it, but it is not necessary. Fairness requires that I say that Smalltalk/V is not actively maintained anymore, Smalltalk-80 MVC differs a lot from what you find in the current version of VisualWorks for Smalltalk. The great advantage of the Smalltalk/V MVC is that it is so very small. It is possible to completely understand it in short time.
Arguments in favour of Morphic:
Arguments in favour of MVC:
- It is innovative and powerful
- It is actively supported, and on this list your questions about Morphic will be answered
- Some very interesting applications are implemented for Morphic only
It is possible to create a MVC-only image that is only 1.5 Mbytes large. This is an option for very small computers and when you need to use Squeak on very small computers you are perhaps best served with MVC. The size of the smallest Morphic images is about 6 MBytes.
- It is fast
- It is small
- It is one of the really important achievements of computer science and it was done in Smalltalk