

Jquerymy.js – Purely declarative apps with complex two-way data-binding - fiatjaf
http://jquerymy.com/

======
wiremine
Kudos on the landing page:

\- Simple, interactive example at the top.

\- Short, ~150 word technical explication.

\- Five detailed demos that are all different.

\- Detailed list of controls.

Obviously, not every project lends itself to this type of information
architecture, but I'd love to see more projects think as hard about their
presentation as this one does.

------
kristopolous
I find the description of this confusing. I feel like there's a number of
people who talk about programming in a way that I'm not familiar with. Where
do people learn verbiage like this? Is it popular among some universities? Is
there something beyond code complete and gof?

For example, I've never gotten a good handle on what _other_ people see as
declarative. I know the definition and I know my interpretation - but other
people's interpretations seem to lead to very slightly different sets of
declarative things. Is the term really not strongly defined?

I think my main grappling with this (such as "two way data binding") is that
they are generally things that aren't that hard, I just didn't know there was
a name behind it. Then when I see someone describe it, it takes me
embarrassingly long to figure out that it's something I've done for a decade.

Do other people experience this?

edit: I noticed a downvote. I don't intend this to be off-topic or irreverent.
My apologies.

~~~
afandian
Yes. People seem to form communities, isolate themselves, and rename things.

In my (not that long) career I've used .Net, Cocoa, Python + Django, Go, Ruby
+ Rails, Clojure, JavaScript. The same things crop up again and again, with
quite a variety of different names.

Truth is, if you've understood a named concept you'll see that it's the
concept as something differently named elsewhere. You just have to tell
yourself that humans will be humans.

Some of these things, like Apple's Class Clusters in Core Foundation are
understandable because they were probably pioneering uses / rediscoveries of
particular design patterns which got named before the Gang of Four came along.

And some of them are just plain ridiculous. The Ember people refer to
JavaScript objects as hashes (presumably because of their Ruby background) and
that's particularly annoying.

~~~
kristopolous
I'm glad you brought up ember! I found it very confusing (and I have 5 years
of ruby). I don't know what kind of approach I need for success there.

I met people who had only been programming under a year who were more
successful with it ... and I have been doing Javascript since the 90s.

I wish I could unlearn all the things that create this mental blockage for me
... but I've been unable to overcome them. I don't know what to do - I feel
like I'm missing out on a pretty lively movement.

I feel like I need to approach ember, angular et al as if "ok pretend that
this isn't javascript. Pretend that it's something new." Because honestly they
don't treat the language like the scheme-self hybrid I've become so familiar
with.[1]

I think that approach will help, but I just don't have the discipline to be
successful at it.

\----

1\. It's like with C++ how there's basically two kinds of devs ... the
C-programmer who discovered some nifty organizational techniques, and then the
C++ programmer. The second C++ programmer writes code that the other one finds
very odd and confusing and the first one doesn't understand why anyone would
go through all that trouble to do something that ought to be so simple, in her
mind.

~~~
afandian
I had a good go at Angular. I felt like it as a decent framework with
interesting concepts. I built an app with it.

Next project I thought I'd try Ember. It's very much my way or the highway.
Huge amounts stuff learn. Not only concepts, but all those conventions. Very
narrowly scoped models to which the whole world will conform (it doesn't, not
without tying yourself in knots). The same thing that really puts me off
Rails.

I ditched Ember for the project and now I'm using React which I picked up in
an hour and it's brilliant.

YMMV. But I can't stand arrogance, and, to my mind, Ember drips with it. That
includes renaming things that already have names.

~~~
kristopolous
One thing that many of these techs do is take one primitive, such as a
function, and then call it half a dozen different things - making it look like
there's a difference.

I understand the goals of such an exercise, but I'm not convinced that it
leads to quicker to deploy, easier to maintain, simpler to modify software.

I think they must have different goals in mind when they write code - a lot of
people clearly love the stuff. I just don't know what these goals are.

------
gdrulia
I've used knockout.js for a few years now on multiple projects. As knockout
grows, I started to dream of a library that would provide me with a two-way
data binding. But not only between data object and DOM, but between data
objects itself, like ko.computed does.

This seems like a nice solution, although like other commentators mentioned,
the lag seems to be quite unbearable. So it might be just something towards
right path and hopefully it will be maintained and updated to work more
smoothly, but wont grow into full framework.

~~~
muraiki
I use knockout.js at work and like it quite a bit. But I think that I've found
what you're looking for, or something close to it, in Reactive Extensions.
It's a free library available for many languages including JS. With it you can
compose UI interactions, promises, and other arbitrary events in an FRP-like
way using observers. An example probably explains it best:
[http://jsfiddle.net/nmd88wum/](http://jsfiddle.net/nmd88wum/)

If that piques your interest, check out:
[https://gist.github.com/staltz/868e7e9bc2a7b8c1f754](https://gist.github.com/staltz/868e7e9bc2a7b8c1f754)

------
mechazawa
Looks great but I feel like there is quite a bit of latency

~~~
fredley
Especially on the drag+zoom map. There was terrible lag. It seems like the way
you were doing this before is still the better way to do it, at least for now.

Promising project though. If they can fix the latency issues, it'd be
something I'd use.

~~~
ermouth
Well, it‘s a DOM animation lag mostly. Thanks for your point althouth.

------
Roritharr
This looks really neat, as it allows me to use this feature for small parts of
my project, instead of forcing me into a whole framework and changing every
aspect of my application accordingly.

------
j_s
My two questions for all JavaScript libraries as an enterprise LoB dev are:

(1) What browser versions are supported? (Translation: are you willing to
do/accept help with the work to support business users?)

Edit: answered at the bottom, IE9+

(2) How well is deep nesting supported? (Translation: can my parent-child-
grandchild-greatgrandchild piles of data entry forms use this?)

Thanks for the time invested in creating this library and the associated
documentation!

~~~
ermouth
1) In fact, versions up to 1.0 supported IE8. Think current version also
support, although it was not tested in IE8. To mention – $.my is heavily and
primarily used in biz environment for very complex backends.

2) Forms can even be recursive. [http://cloudwall.me/etc/json-
editor.html](http://cloudwall.me/etc/json-editor.html) – you can check youself
how deep source json and associated forms can go and find out when it will
stall )

------
tmikaeld
I really like this one, but i am concerned by performance. Have tests been
done on that?

~~~
fiatjaf
I don't know, but probably not.

Anyway, you can see some basic apps in action at
[http://cloudwall.me/](http://cloudwall.me/)

------
nck4222
What's the advantage of using this over something like angular.js?

~~~
ermouth
You can not use one Angular app inside other without side effects and tuning.
So Angular app in general can not be a control (like input or select) for
another app.

$.my apps behave like complex controls – you can enclose one $.my app into
other, you even can make this enclosure recursive (for example
[http://cloudwall.me/etc/json-editor.html](http://cloudwall.me/etc/json-
editor.html)).

Also since $.my manifests are JSON docs, you can combine them just attaching
one manifest as a property of another manifest – so app of nearly any
complexity can exist as a single JSON.

------
emodendroket
This looks kind of neat, although I'm pretty happy with Angular for this
purpose for now.

