[m-dev.] Mercury UI framework proposal

Ian MacLarty maclarty at cs.mu.OZ.AU
Mon Jan 23 10:13:59 AEDT 2006


Hello,

I've managed to implement the UI framework Julien and I were designing 
without constructor classes.

The framework is in the attached file ui.m and should be self 
explanatory.  The basic idea is that the application developer has to 
define two predicates:  one mapping the state of their program to a UI 
and another that transforms the state of their program in response to 
events from the UI.  The main design goal is to completely separate 
application logic from presentation and to be able to reuse the same 
application logic with multiple UIs (e.g. native GUI, html, voice menu 
system, etc).

I've also included an example UI implementation (menu.m which 
implements a simple, text-based menu system) and an example application 
(plusminus.m which displays two menu options, one to increment a 
counter and another to decrement the same counter).

Julien, won't you have a look and see that the framework does actually 
achieve our design goals.  Any other comments would also be most 
welcome.

Cheers,

Ian.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: plusminus.m
Type: application/octet-stream
Size: 1207 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20060123/16600700/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ui.m
Type: application/octet-stream
Size: 1837 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20060123/16600700/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: menu.m
Type: application/octet-stream
Size: 1806 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20060123/16600700/attachment-0002.obj>


More information about the developers mailing list