Implementing GluJs on other javascript frameworks

78 views
Skip to first unread message

David Moshal

unread,
Jun 7, 2014, 6:57:45 PM6/7/14
to gl...@googlegroups.com
Hi, just wondering how difficult if would be to implement GluJs on other javascript frameworks, eg: Webix ?

David

Michael Gai

unread,
Jun 9, 2014, 1:20:01 PM6/9/14
to gl...@googlegroups.com
Hi David:

It would be very possible, and in fact was one of the original intentions of GluJS to work with any widget set that could be defined using JSON. In fact, we wrote a pre-GluJS MVVM variant to work on Titanium for mobile development (we really should have released that one, as it makes Titanium development much, much simpler). 

Sencha ExtJS/Touch comes with JSON config blocks so is a natural fit for the GluJS approach. It looks like Webix uses clean JSON definitions as well (I didn't know about the framework until you pointed it out), so at first glance it's a very good candidate.

The only minor blocker is that somewhere along the way our view model implementation did pick up some dependencies on Sencha core basics. These are fairly straightforward to cleanup (by taking a dependency on underscore instead, for example). I just haven't had any reason to because so far everyone has been using GluJS with Sencha products.

The view  binder and its adapters were built to be per-framework. A cursory look again at Webix shows that it is roughly similar to Sencha, so it could be very straightforward to make the binder work with it. However, (like Sencha originally) Webix does seem to suffer from a programmatic API without config binding in mind. For instance, a quick check shows me that at least some "setters" of a config property are named differently from the methods that modify it;  "disabled" is the name of the config property, but the setter is not "setDisabled", but two: enable() and disable(). 

Sencha used to suffer from the same problem but has cleaned it up over the years (they heard that feedback from me and GluJS users loud and clear:-). So in any case we built GluJS with an adapter approach that lets you smooth all of that out. What that means is that you would spend some time "normalizing" those discrepancies using GluJS adapters, and it would take some time before GluJS plus Webix had the same polish as GluJS plus Sencha. But certainly doable, since the best way (what we did) was just add to the adapters incrementally as you go along and run into things.

Assuming that I was able to provide a branch of GluJS without the Sencha dependencies (no promises on that), would you be interested in taking it from there with Webix (of course I would help with advice, etc.)?

--Mike

David Moshal

unread,
Jun 9, 2014, 1:54:18 PM6/9/14
to gl...@googlegroups.com
Michael, thanks for the quick response.

We have a reactive web application which needs to be migrated off Flex.
As you know, Flex has binding concepts in it's MXML, which we use extensively.
There are no references from our viewmodels to our views for example.
(in my view, the minute you have a non-view component referencing a
view, e.g. by 'id', you don't have an MVVM application).

We have decided on Webix over ExtjS for these reasons:

1) Webix has better widgets, particularly for grids.
2) the Webix JSON config is much cleaner than Extjs's.
3) ExtJs looks extremely bloated, at almost 2 Mb (vs around 360k for webix).
4) Webix seems easier to skin.
5) Webix seems to work better on mobile devices, with one code base
(try out the Webix and Extjs demos from a mobile device).

As you note, Webix has JSON based config system similar to ExtJS.

Also, as you note, Webix has no current concept of View binding, or
any other reactive concepts.

I've been building reactive web applications since 1999, and have
probably investigated every reactive framework out there (and
contributed to a few). GluJs seems to be a very well thought out MVVM
framework, probably even better than Flex or Silverlight.

Your offer of providing an Extjs-free version of GluJs is very exciting.
I'd be willing to try and integrate it both with Webix, and Firebase,
which is a very interesting reactive-capable backend.

Best

David
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GluJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/glujs/qQjW_ByL5LU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> glujs+un...@googlegroups.com.
> To post to this group, send email to gl...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/glujs/405967da-d5b0-4652-a44d-e53f2bac4f1d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages