links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Last updated at 6:09 pm UTC on 11 May 2016

What is Fabrik

To quote from the original Fabrik paper [1],

Fabrik in Squeak

Fabrik with wires allows one to assemble UI widgets and computational components into useful applications without the need for written programs. An application may be used while it is being assembled, and it may be shipped as soon as assembly is complete.

The goal of the Squeak Fabrik project is to construct a system similar in operation to the original Fabrik, but simplified in two respects: leverage off Morphic (the original Fabrik used a complex MVC/Mac Toolbox hybrid), and use simple structural propagation in place of compiled dataflow (Squeak's speed is adequate for most applications that would be built in Fabrik, and compilation could always be offered as a later capability).

Wireless Fabrik

We want to experiment with a wireless interface where connections are made through the more conventional model of linked expressions in a spreadsheet. Wireless Fabrik is a UI builder just like Fabrik, but you type little methods in more of a spreadsheet manner, rather than wiring up existing components in a typical Fabrik diagram. Two plusses of the spreadsheet approach are that it doesn't have wires (some people don't like them), and that the methods look like real ST methods (with the model var names) rather than functions, so it's a bit easier to identify it with normal Squeak programming. The downsides are that it doesn't have wires (some people like them ;-), and that expressions do not capture bidirectional relationships as well as wires.

The synergy we're looking for in wireless Fabrik is that people can start out with a UI builder, and just type little Squeak expressions in a control panel. They will be learning expression syntax, but won't have to do "real programming" yet. The topological sort will take care of triggering the methods appropriately whenever something changes.

Current Status

Dan Ingalls posted this news-update to the Squeak Mailing Lists by on 3/11/03 [bkv]

Another take on this that might interest you is my intention to revive a Fabrik-like system in Squeak. This is another thing that did not work out while we were at Disney. The idea is just to make it really simple to do little "computational sketches" in Squeak, whether with wires or with little spreadsheet-like tables, and with probably some overlap with Morphic Wrappers. My metaphor for this is to turn any pen computer into the proverbial "back of an envelope" for simple calculations. It could then be married to some of the very cool parts of eToys, or possibly into a cool web scripting system. For the latter I have in mind a different marriage to, eg, screen-scraping and Flash components, but this would require help from others.

At any rate, as soon as I have something that's at least fun to play with, I'll put it out for others to play with.

- Dan

The current Squeak release contains the sketch of a Fabrik implementation. Two classes, ComponentLikeModel and PinMorph provide most of the glue, and five other classes comprise the user library:

How to play with it

To build something from scratch, open a new ComponentLayout. If you drop three text components in, and wire them together (use shift-click on a pin to draw out a wire), POOF, you have a tri-directional 'Hello World' example. Type in any one of the textComponents, and type cmd-s for accept.

It should be possible to recreate the Browser example of PWM6 from scratch, but note that the top-left component is a printComponent. Also, as Rick Thomas says, "you did a good job of hiding the 'add pin' option for functioncomponents. It is on the halo menu alright but not reachable from the submorph option in the menu from a control click on the functionComponent."

Important Note
Please note that there are some code rot problems with Fabrik in 2.7. Most of these were fixed in update #1855, so try to use 2.8a or at least fileIn #1855 if you want to play with it.

Next Steps

Underlying Object Model

The first step in going forward is to formalize the underlying object model. Where are values, procedures, and other linkages stored in a Fabrik module.

Wired and Wireless Presentation

Specify the correspondence between the wiring and spreadsheet presentations and the corresponding alternate user gestures.

Integrate with Morphic UI

Provide a UserFrame object and integrate with Morhpic's SystemWindow. This will enable Fabrik to function as a UI Builder for Squeak.

Topological Sort

The toy implementation of Fabrik uses the MVC dependence mechanism for change propagation and it does not support bidirectional behavior in general. Topological sorting allows the logic of propagation to be computed once at edit time instead of constantly during execution.

Gateways and Encapsulation

Gateways (pin declarations) are needed to make Fabrik complete. The simple set of (input, output, inputOutput) are adequate to build Fabrik's entire library.


Iteration through structures is achieved in Fabrik with evaluation frames and a library of special gateways. An evaluation frame is a rectangluar scope analogous to a block in Squeak. It allows for processing multiple sub-elements without needing to introduce time into Fabrik's timeless dataflow diagrams. The many useful variants of structural interation are achieved by introducing appropriate (initialization, streaming, terminating, etc) gateways on an evaluation frame.

Widget Library

A widget library is the key to a successful UI builder. Much can be done with just a few more components, but much more can be done with serious attention to this area. The ability to compose properties will be important to achieve generality without an overwhelmingly large library.

Primitive Widgets

A project that I think would be fun (whether for now or later), and that is separable from the kernel work, is to think about how to build up a widget library from scratch in Fabrik. Imagine, for instance, a mouseSensor morph that doesn't really have any appearance other than a default rectangle. But it's a Fabrik component that emits a boolean value (and induces a model slot for that output). Now we allow mixing, so that if you imbed this in any other morph (or vice-versa?), then you end up with something that looks like the other morph, but works like a button. Et cetera. I haven't quite reconciled this with the widget construction i did in the original Fabrik. By the way, if you don't know Fabrik well, then understanding how the Fabrik slider works is a good challenge. It's an interesting dataflow topology, and it really illustrates how the Fabrik graphics model works.

Simple examples

We already have the multidirectional 'Hello World' and the browser example. A next simple example in the direction of effects and widgets would be a font editor. A next example in the direction of Fabrik's charter in Squeak would be the browser done as a wireless construction.

Looking a little ways down the road, it will be interesting to work a few examples of "scratch programming" done in wireless Fabrik. These can then be compared with similar examples in other frameworks.

Another important link to make with life-as-we-know-it is to work an Etoy example such as Drive-a-Car in Fabrik.

Some Fabrik History

... can be found at Fabrik History

Were can I find more info on Fabrik?

[1] Dan Ingalls, Scott Wallace, Yu-Ying Chow, Frank Ludolph, Ken Doyle:
"Fabrik - A Visual Programming Environment"
in OOPSLA 1988 Proceedings, ACM SIGPLAN series.

This is accessible on the web, thanks to the efforts of Dwight Hughes.
(wayback machine link; original URL was http://users.ipa.net/~dwighth/smalltalk/Fabrik/Fabrik.html, but this is now 404)

[2] Frank Ludolph, Yu-Ying Chow, Dan Ingalls, Scott Wallace, Ken Doyle:
"The Fabrik Programming Environment"
Proceedings of the IEEE Workshop on Visual Languages 1988.

A PDF of this is availble at the IEEE Computer Society website.
Search for it at http://ieeexplore.ieee.org/Xplores/VSearch.jsp
Use 'Fabrik' as the search term.
You will need to be a member of the Computer Society. Otherwise email patrickdlogan at attbi dot com and I can send it to you via email. (Until IEEE screams, but I shouldn't expect much traffic for this old document.)

Also reprinted in:
Ephraim P. Glinert (ed.):
"Visual Programming Environments - Paradigms and Systems"
[IEEE Comp. Soc. Press, ISBN 0-8186-8973-0]; (out of print)

The Glinert book is out of print, but with a bit of luck you'll find a used copy at Powell's or B&N. Make sure you get the right one, there's another volume with a similar title - I forget which, but not "Paradigms & Systems".

Back to Squeak Central project list