Posted by yrashk
Lilu got another public git repo
I’ve uploaded some slides about recent Lilu updates I was talking about in Oslo few days ago. I have crafted it in the train heading to Oslo, just few hours before actual presentation, so it is far from being perfect :)
Have a good weekend!
Posted by yrashk
I have decided to announce some news that were happening in trunk
recently.
- Major Rails helpers problem/bug was fixed (thanks to Nicholas
Faiz), now error_messages_for() and friends works just fine
- I’ve extended possibilities of at() syntax, now you can do things
like:
update('#username').with text => at('a').text
which converts
<div id="username"><a href="#">john doe</a></div>
to
<div id="username">john doe</div>
or
update(:all,'.user/a').with text => at('..')[:id]
which converts
<div id="yrashk" class="user"><a href="#">username goes here</a></div>
to
<div id="yrashk" class="user"><a href="#">yrashk</a></div>
The main point is that at() got some methods like (#[] and #text) and
could now be used as value. Previously you was required to use
lambdas for such kind of functionality.
This is quite new and experimental functionality, though I already
make use of it and find it interesting.
- Now when integrated with Rails, Lilu makes use of .erb.html templates as
well (if .html was not found)
What was the reason for this? Well, quite simple. I just felt sick typing those stylesheet links, forms, ajax stuff in plain HTML. If
you or your designers could use these little nice Rails helpers, then why not? The main thing is to understand what to use and what to not to use. Also it could be helpful for transitioning from ERB to Lilu.
At the moment, mockup_server does not support this feature though. I think I will prepare some workaround soon (it is in progress)
Posted by yrashk
I’m reorganizing my development hosting stuff, and Lilu subversion got new home.
Subversion repository is located at http://svn.verbdev.com/lilu
You can also browse it with Warehouse
Lilu’s issue tracker will probably change its address (and most likely, software) soon.
Posted by yrashk
As some of you (mostly those that I have met in Oslo/Copenhagen) may know, I’m going to attend RailsConf Europe in Berlin this year. Despite of the sad fact that I will not present anything on Lilu (I was too late submitting my papers), I still would like to meet with ruby hackers, talk on interesting things, arrange some short hack sessions, etc.
Though visiting RailsConf Europe is somewhat expensive, I expect it to be something like 1500-2000EURO. That’s why I’m announcing that I’m going to provide Ruby/Rails consultation services until I will earn 2000EURO (lets assume that this will be enough). My hourly rate is roughly 40-50 EURO, depending on what I will be supposed to do.
You can also fund Lilu or, say, Caches.rb futher development, there are lots of things to do still. This money will be spent on visiting RailsConf Europe as well.
If you are interested, feel free to contact me at yrashk at verbdev dot com.
Thank you in advance!
Posted by yrashk
I’ve just released Lilu 0.1.3.
IT IS NOT BACKWARD COMPATIBLE WITH 0.1.2.
The changes are:
update('#blog-entry').with :id => "blog-#{@blog.id}", 'a' => { :href => @blog.url }
you will need to rewrite it to something like
update('#blog-entry').with :id => "blog-#{@blog.id}", at('a') => { :href => @blog.url }
or
update('#blog-entry').with 'id' => "blog-#{@blog.id}", at('a') => { 'href' => @blog.url }
That means that now you can use both String and Symbol to refer attributes
update('#blog-entry').with at('a') => { :href => @url, self => @title }
you will need to rewrite it to:
update('#blog-entry').with at('a') => { :href => @url, text => @title }
You can use Lilu either as a plugin at svn://dev.railsware.com/lilu/lilu/tags/0.1.3 or svn://dev.railsware.com/lilu/lilu/trunk (be cautious when on trunk!) or from gem (lilu, -v 0.1.3 or just the latest version).
If you need to stay on an old syntax for some reason, please use 0.1.2 (svn://dev.railsware.com/lilu/lilu/tags/0.1.3 or gem install lilu -v 0.1.2).
Posted by yrashk
I’ve found that there are already some discussions about Lilu going on around on the internets so I’ve decided to launch a mailing list for it. Ok, here it is: Lilu Google Group
Posted by yrashk
I will be talking about Lilu (and may be about some other things as well) at Oslo’s Ruby Tuesday. Can’t wait to meet you all, Oslo Rubyists :)
Posted by yrashk
I’ve released Lilu 0.1.0.
You can use it as plugin: svn://dev.railsware.com/lilu/lilu/tags/0.1.0 (or svn://dev.railsware.com/lilu/lilu/trunk for the latest version) or just install a ‘lilu’ gem (should be available through RubyForge mirrors soon).
I’m going to work on documentation and improvements soon.
Posted by yrashk
I’ve commited initial Rails support for Lilu. Now you can try to install a plugin (svn://dev.railsware.com/lilu/lilu/trunk) and use the following naming schema:
app/
layouts/
application.html
application.lilu
views/
blog/
post.html
post.lilu
Typical application.html should contain complete HTML mockup where some element content should be replaced with actual data:
1
2
3
4
5
6
7
8
9
10
|
<html>
<head>
<title>Hello world</title>
</head>
<body>
<div id="main">
Body goes here
</div>
</body>
</html> |
application.lilu is pretty simple:
|
update('#main').with yield |
or even
|
replace('#main').with yield |
post.html could contain either full page with blog post or blog post design itself. in first case, you should prepend your post.lilu with something like use(’#post’).
1
2
3
4
|
<div id="post" class="post">
<div id="title">Hello, world</div>
<div id="text">I'm Lilu!</div>
</div> |
1
2
3
4
5
|
# Uncomment this if you have full page design in your post.html
# use('#post')
update('#post').with :id => @post.id,
'#title' => { :id => "title-#{@post.id}", self => @post.title },
'#text' => { :id => "text-#{@post.id}", self => @post.text } |
That’s it, first Lilu + Rails experience. The above code is just from my head (too lazy to check exactly this code right now), so it can contain some minor bugs.
And yes, current Lilu implementation most probably contains bugs and problems. It’s quite young—it’s only few days old. I hope it will be getting better and better each day. I’m working on this.
Posted by yrashk
Before: this and this
I’ve posted some Lilu examples on project’s wiki. It looks pretty nice for me now and it actually seems to be implemented already!
Source code is not well polished yet, some specs are definitely missing yet, couple of thoughts and ideas are around
But anyway it was a short path from idea to something working.