Fall 2011, David Matuszek
|36 lines, 796 characters (not counting whitespace), 48 parentheses, 2 brackets, 10 braces|
|26 lines, 747 characters (not counting whitespace), 68 parentheses, 10 brackets, 0 braces|
|11 lines, 234 characters (not counting whitespace), 2 parentheses, 6 brackets, 0 braces|
Use Clojure macros to create a DSL (Domain Specific Language) for GUIs, somewhat like REBOL/View.
Macros are harder to write than functions, so use functions where appropriate. Use macros as necessary; for example, you will probably need to use a macro when implementing an ActionListener, because that is code that should only be executed under certain conditions.
You should implement enough of the DSL to use it to write a working "Celsius to Fahrenheit Converter," which you will turn in with the DSL code. Your design of the DSL should be extendable to create much more complicated GUIs (using menus, radio buttons, etc.), but the assignment only requires enough to get the temperature converter working.
How similar should your DSL be to REBOL/View? I have a movie at home that is best described as "based on the title of a real book!!!" That close. The important thing is that it's briefer and easier than straight Clojure.
Work in a team of two to four people. Not less than two, not more than four. I'm not assigning the teams, that's up to you. Choose a name for your team! Send me email this week to tell me the name of your team, and who is on it.
Next Monday, one member of each team should give a very brief (< 5 minute) presentation to the class, describing your initial design. Show what the code is going to look like. Be prepared to use the projector. You have to have some kind of a design by Monday; after that, feel free to discard it and start over. If by any chance there is any time left over, use it to talk to other teams whose design you like.
You can have a small amount of class time (maybe 15 minutes?) next Wednesday to discuss the project with your teammates.
You should have a presentation ready by Monday, October 24.
Turn in the completed project via Blackboard by 6am Wednesday, October 31.