carousel with Flapjax

10 views
Skip to first unread message

therac25

unread,
Jul 13, 2009, 1:32:13 PM7/13/09
to Flapjax
Hi list,

Carrying on with my idea to discover Flapjax through useful 'real-
world' widgets, I've put together a carousel example:

http://la.di.da.free.fr/Flapjax/carousel/carousel.html

Any comment welcome

T25

(should work at least in FF3)

Artyom Shalkhakov

unread,
Jul 14, 2009, 1:57:45 AM7/14/09
to fla...@googlegroups.com
Hi,

2009/7/13 therac25 <th3r...@googlemail.com>:


> Carrying on with my idea to discover Flapjax through useful 'real-
> world' widgets, I've put together a carousel example:
>
> http://la.di.da.free.fr/Flapjax/carousel/carousel.html

Nice job, keep it up!

I think we need more widgets, so we can come with some cool
abstraction. I wonder how complex applications are to be composed
in FRP? It's straightforward with imperative MVC: just don't! :)

Can we break a widget down to basic building blocks and a few
ways of combining them? We could then provide flexibility as
well as composability and correctness, which would be a win.

For example, I've written a simple RPN calculator [1] (actually, I've
translated an example from Fudgets, taking styling from a JS calculator).
What is unusual (compared to native JS implementations I've seen) is
the "combinational" style as well as separation of "business logic"
and "presentation".

Cheers,
Artyom Shalkhakov.

[1] http://www.sound-city.kz/fj/tabs.html#tab-content-1
(yes, I've taken your example as a starting point, thanks.)

therac25

unread,
Jul 14, 2009, 8:20:38 AM7/14/09
to Flapjax


On Jul 14, 6:57 am, Artyom Shalkhakov <artyom.shalkha...@gmail.com>
wrote:

> Can we break a widget down to basic building blocks and a few
> ways of combining them?

funny you mention this, because while doing these widgets,
I needed a basic building block (BBB ?) often : a "toggle", a button
which has two mutually exclusive states
it would be interesting to identify what these BBBs are...
I guess the empirical approach is to code more widgets and see which
elements crop up again and again...
I've mentioned tabs, carousel and progress bar already, another one
would be a calendar...

here are some examples: http://flowplayer.org/tools/index.html
and: http://jqueryui.com/

> We could then provide flexibility as
> well as composability and correctness, which would be a win.

I find that automatic propagation of reactive values is a big win
already...
I wonder if some DOM helper functions should be added to Flapjax, for
instance a function selecting DOM elements from a CSS selector, so one
could avoid using jQuery (or similar), which would shave 50KB off the
page.
Or maybe this is the wrong approach, maybe Flapjax should leave the
DOM abstraction to another third party library, maybe I should look
for a minimal DOM manipulation library (JSLite ?)

>
> For example, I've written a simple RPN calculator [1] (actually, I've
> translated an example from Fudgets, taking styling from a JS calculator).
> What is unusual (compared to native JS implementations I've seen) is
> the "combinational" style as well as separation of "business logic"
> and "presentation".
>

that's cool :)

T

Shriram Krishnamurthi

unread,
Jul 16, 2009, 10:40:43 PM7/16/09
to fla...@googlegroups.com
To me, it makes more sense to try to work at integrating Flapjax with
other DOM utilities like jQuery, which do simple things really well,
and could quite likely compose very nicely with Flapjax's automatic
propagation. That would avoid reinventing the wheel, and if you folks
ran into hard problems doing this integration, we'd love the challenge
of trying to understand why and figuring out solutions to that.

Does that make sense?

[Btw, T25, that demo was tres cool.]

Shriram

Artyom Shalkhakov

unread,
Jul 16, 2009, 11:51:15 PM7/16/09
to fla...@googlegroups.com
Hi Shriram,

2009/7/17 Shriram Krishnamurthi <s...@cs.brown.edu>:

Yes it does. On the one hand, I wonder what an FRP widget library would look
like? What benefits would it give?

For example, with Fudgets it's easy to compose widgets to get other
widgets (BTW, can Fudgets be considered FRP or not?). It's hard to do this
kind of thing with common widget toolkits, both desktop and web, and you
have to write too much code for even the simplest tasks.

On the other hand, bringing the best of both worlds seems to be the most
reasonable way.

Cheers,
Artyom Shalkhakov.

therac25

unread,
Jul 20, 2009, 5:35:50 AM7/20/09
to Flapjax
yes it does, what prompted that remark is that both Flapjax and jQuery
clock at 50KB minified, and I hardly use jQuery (only to select DOM
element and to animate. Flapjax supersedes the whole 'Events' section
of jQuery.)

But yes, it makes sense, I guess I should look out for a very
minimalistic DOM abstraction library (maybe http://sizzlejs.com/).
It'd be great to be able to use FLAN for animations...

>
> [Btw, T25, that demo was tres cool.]
>

Thanks Shriram, feel free to reuse for the Flapjax demos if you think
it's worth it :)

I am trying (time permitting) to come up with simple implementations
of common widgets, like the one provided by jquery UI and jQuery
TOOLS, for didactic purposes (for me and others).

T25
Reply all
Reply to author
Forward
0 new messages