From: Michael Neumann Date: 2005-01-27T11:34:19+09:00 Subject: [ANN] Wee 0.5.0 Hi, Wee 0.5.0 is out. Have fun! Major changes are: * Support for live-updates (see examples/live-update.rb). Only client-side is missing (javascript). * Factored out all continuation-dependent code into wee/continuation. By default Wee uses no continuations until you require 'wee/continuation'. This has the nice effect, that non-continuation-based application now run a little bit faster and uses less memory. * Added an OgScaffolder class (see examples/og-test.rb). You can create/update/delete Og domain-objects. This was just a test for using Wee+Og. It's not a very advanced scaffolder. Nemo[1] can do better. * Added an experimental property system, which can make your components more independent of external resources (e.g. image-path). * Changed the status from alpha to beta ;-) I consider Wee now as pretty stable (run-time wise). Few code will probably change. For the full list of changes (since I started the ChangeLog) see [2]. == The Ultimate Hello World require 'wee' class HelloWorld < Wee::Component def click @clicks = (@clicks || 0) + 1 end def render r.h1.onclick_callback(:click).with("Hello World!") r.text "#{ @clicks || 'No' } clicks" end end # And start the WEBrick web-server require 'wee/utils' require 'wee/adaptors/webrick' app = Wee::Utils.app_for { c = HelloWorld.new c.add_decoration(Wee::PageDecoration.new(title="Hello World")) c } Wee::WEBrickAdaptor.register('/app' => app).start Make sure you run this application with the -rubygems option. Then point your browser to http://localhost:2000/app and click on the h1-header. Every time you click on it, you should see that the number of clicks increases. Have fun! == Future Work I am currently implementing Cookie-support and Page-less sessions (no backtracking). It's already done and works well, but needs some further refactoring. This let's you write dynamic web-sites whose URL looks like "http://blah.net/app" all the time. If you want you can change the URL after /app to whatever you want, but note that it's model is completely different that e.g. Rails. Wee does not has multiple controllers, it has exactly one root-component with as many sub-components and sub-sub-components as you like. A simple tutorial is also on my todo list ;-) == Documentation Look here [3]. Regards, Michael --------------------------------------------------------------------- [1] http://rubyforge.org/projects/nemo [2] http://www.ntecs.de/viewcvs/viewcvs/Wee/trunk/ChangeLog?view=auto [3] http://www.ntecs.de/viewcvs/viewcvs/*checkout*/Wee/trunk/doc/rdoc/index.html