# About Minibar

Minibar is an alternative implementation of the Fridge Poetry web app. It doesn't do everything the original Fridge Poetry does (e.g. drag-and-drop is missing), so I refer to it as a minibar rather than a full refrigerator :-)

Some implementation details:

- It is implemented directly in JavaScipt. It does not use Google Web Toolkit or any big JavaScript libraries.
- It has been tested and found to work in the following browsers:
  - On the Mac: Firefox 3.5 & 3.6, Safari 4.0, Opera 10.10 and Google Chrome 4.0.249.49.
  - On Linux: Firefox 3.0.18 & 3.5, Opera 10.10.
  - On the Android Dev Phone: Android Mobile Safari 3.0.4 & 3.1.2 and Android Opera Mini 4.2.
  It does not seem work in Internet Explorer 7 (there are both styling and scripting issues).
- The implementation consist of two JavaScript files: minibar.js (186 lines) and support.js (147 lines). The latter is also used in a small web app based on the SALDO web services.
- To access the GF web service, it uses the JSONP method mentioned in the GF web services paper, which allows the web app to be hosted on a different server from the GF web service. (To demonstrate this, I put the Minibar demo on www.cs.chalmers.se, while the GF server that it calls is on www.grammaticalframework.org.)
- As an experiment, it does no use the `grammars.xml` file, but instead calls a little CGI script, grammars.cgi which lists the .pgf in the directory, in JSONP format. (Note: if you want to install this on your own computer,
  - if you click on the link, the CGI script will be downloaded as `grammars.cgi.txt`, but it should be called `grammars.cgi` and stored on the server in the same directory as the grammar files.
  - for CGI scripts to work with lighttpd, `"mod_cgi"` needs to be included in the definition of `server.modules` in the `lighttpd.conf` file.)
- [Added 2010-02-16] There is a button for generating random sentences.
- [Added 2010-02-23] All translations are shown, not just the first one, if there are multiple parses.
- [Added 2010-02-25] Next to each translation, there is now a little tree icon that you can click on to see a drawing of an abstract syntax tree or a parse tree. If you click on a drawing it collapses back into a tree icon.

Last modified: Thu Mar 25 15:06:22 CET 2010