Tuesday, March 2nd, 2010p>Marcus Westin has created a new templating language called fin. It is an interesting beast, and he gave us a run down:
Since this past November I’ve been working on a realtime templating system I call “fin”. I’d love to get some eyes on it, and hope that you’ll find it exciting. There is no demo, but quite a bit of information and if you’re on OS X it’s trivial to get the system set up on your own machine.
The basic idea is this… Rather than describing your data, you describe how you want your data to be viewed. Fin takes it from there in terms of persisting new data as it gets created. In addition, all views of any piece of data is globally synchronized. If one computer makes changes to a user’s name for example, then those edits are reflected for anyone viewing that user’s name as well, keystroke by keystroke. The way you create value views and input views goes likeHTML4< view plain text >
- <div> User name: (( Value user.name )) </div><div> Edit user name: (( Input user.name )) </div>
More detailed examples can be found here.
You can also chain references to items, for example
(( Value user.friend.name )). Now, if user.friend.name changes, then the Value view is instantly updated. Even cooler, if the user’s friend reference changes to a new friend, then the value view will accurately reflect the new friend’s name.
To get started on OS X 10.6 is as easy asgit clone git://github.com/marcuswestin/fin.git cd fin sudo make install-node make deps make run-couchdbx
And voila! Just navigate to localhost/path/to/fin/examples/from-html.html and you’re good to go.
Posted by Dion Almaer at 11:35 am