Hi all,

I was getting ready to announce this anyway when Brian asked about it.

I have converted Weblocks to work with jQuery and Bootstrap.  Well, there's
quite a bit of work left to do, but I've done enough on it to convert my
site, BountyOSS (https://bountyoss.com/).  Have a look!  I think it's a
clear improvement, though there's still a lot that could, and eventually
should, be done to it.  But, I think a lot of those things will be a lot
easier now.

(Note that the color scheme on my site is not the Bootstrap default.)

So while it has to be considered work in progress, I think it's to the
point that others could give it a try.  Things to be aware of:

() I started with Olexiy's jQuery patches, but forms didn't work.  I have
fixed them.  For reasons I don't recall at the moment, this involved adding
in the jQuery-Seq and jQuery-BBQ libraries.

() The amount of jQuery functionality actually being used at the moment is
just the bare minimum I needed to get my site working.  There are lots and
lots of jQuery and jQuery-BBQ features that are not being used and which
Weblocks has as yet no interface to invoke.  I'm not very familiar with
jQuery, and haven't even started to explore the possibilities here.

() Bootstrap uses the Less CSS compiler.  This had to be integrated into
Weblocks somehow.  At first I thought I could use the Weblocks dependency
system, which loads selected script files based on what widgets are
currently on the page.  This doesn't work well for Less, though, because
Less uses the C compilation model: top-level files are independent and must
import all the other files they refer to.  If it had used the Lisp
compilation model, where top-level files are loaded into a shared session,
it would have been easy.  Perhaps I could have hacked Less into doing what
I wanted, but I went in another direction.  I noted that the full compiled
CSS file produced by Bootstrap is quite large -- some 200k -- and that
large CSS files compress very well, and better than small ones.  So I
decided to give up on the dependency system, and just compile all the Less
source into a single CSS file, which is then referenced by every page.
This required installing Node.js to run the Less compiler, and the creation
of a small makefile.  So, when developing an app, when you change the Less
sources, you just have to run 'make' in that directory to get the CSS
updated.

() As with jQuery, there are also lots of Bootstrap features that don't yet
have a Weblocks interface.

() I did all this work on my Weblocks fork, which has a few incompatible
changes from the official version.  The one you're most likely to run into
is that function-widget functions are invoked with the widget as the first
argument.

Despite all these caveats, I recommend it for new projects.  You can find
it here, in the "bootstrap" branch: https://github.com/slburson/weblocks

-- Scott

-- 
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en.

Reply via email to