Spindle Web Framework

1,409
-1

Published on

Description of the Spindle web framework, which has a strong separation between view and controller (unlike many web frameworks), and utilises concepts such as widgets and form objects.

It also has a powerful full template language, instead of inventing a crippled and awkward second language.

Written in Tcl with the XOTcl OO extension.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,409
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Spindle Web Framework

  1. 1. The Spindle Web Framework Kristoffer Lawson, setok@scred.com Twitter: @Setok
  2. 2. Motivation • Experience with Django • Knowledge of Cocoa’s MVC • Love of the Tcl language
  3. 3. Features • Embedded web server • MVC with full separation of each part of framework • Simple, but powerful • No dumb invented template language • Based on Tcl + XOTcl
  4. 4. Tcl — Language of Kings • Script language, http://www.tcl.tk/ • Popular GUI: Tk • Ultra-dynamic • Extendable • Embeddable
  5. 5. Everything is a Command set a 5 puts “Hello, world” while {$a} { puts “Hi” incr a -1 }
  6. 6. Everything is a String set a “pu” set b “ts” $a$b “Hello, world”
  7. 7. Create new Constructs proc do {body while expr} { uplevel while $expr $body }
  8. 8. Everything is Dynamic rename while {}
  9. 9. Model-View-Controller actions View Controller rendered from building Model
  10. 10. MVC in Cocoa (sometimes) actions View Controller based on building Model
  11. 11. 1: Connecting Controllers to URLs /foo connected FooController uses connected FooView /foo call 'getHTML' getHTML
  12. 12. 2: Connecting sub-URLs to methods FooController /foo/bar call 'bar' bar uses FooView /foo connected getHTML
  13. 13. 3: Passing forms FooNameForm name Creates Gets passed as arg FooController /foo call 'enterName' bar enterName With form 'enterName' uses FooView /foo connected getHTML
  14. 14. 4: Widgets is datasource for FooController ListWidgetController /foo connected' bar Attribute enterName Attribute gets info from uses uses FooView ListWidgetView /foo connected getHTML calls 'getHTML' getHTML
  15. 15. 5: Templates <html> <body> Hello, [$controller name] [widget UserList] </body> </html>
  16. 16. Templates contd. <ul> [foreach name [$controller names] { <li> Hello, $name </li> }] </ul>
  17. 17. Models? • No forced model framework • Use whichever one you like • Been developing an experiment called Storm
  18. 18. Want to try? • http://github.com/Setok/Spindle/ • http://github.com/Setok/Storm/
  19. 19. Contact Kristoffer Lawson setok@scred.com Twitter: @Setok

×