How to integrate JayData with Knockout - html

I'm evaluating Knockout to use with JayData to create a standalone web application.
Following this tutorial (http://jaydata.org/tutorials/creating-a-stand-alone-web-application) it seems that I will be able to store my data on iPhone, Android and in HTML5 browsers...
I'm not sure how can I use JavaScript Query Language with Knockout. I've seen they will have some support it, but I probably you have an idea how can I do it myself.
I'm not sure if Knockout is the appropriate UI library for hybrid applications, hopefully you can share some know-how.
Thank you!

UPDATE:
From version 1.1.0 JayData has knockoutjs integration module. Include "jaydatamodules/knockout.js" in your html page, and have JayData provide Knockout observables with entity.asKoObservable(). With this module queryable.toArray() accepts ko.ObservableArrays as targets populating it with kendo observable entities.
Custom Bindings is just the way for the integration you are after. You have to connect the knockoutjs way of interacting with the JavaScript objects with the JayData entity metadata functions and its propertyChanged / propertyChanging events.
It shouldn't be difficult a task to do, as JayData supports simple property notation (object.property) and async property accessor pattern (get_property(cb), set_property(cb)) as well.

You can integrate Knockout with jQuery by way of Custom Bindings. That answers your question about integration. Custom bindings allow you to integrate with any JavaScript UI library, not just jQuery.
In regards to your second question... Knockout really isn't a UI library. It's more of a framework to facilitate data-binding between DOM objects and JavaScript objects. It is used to design web applications following the MVVM design paradigm.

Here is an example It is integrated in recent release probably

Related

The Simple way for the Polymer Backend

It is not clear to me how to use Polymer for implementing the backend. What is the natural way to process the backend for Polymer? Please show brief sample code to be clear.
As mentioned, Polymer.js is a front end library, specially to provide access to Web Components APIs as they are called.
There is no particular way to make a web request, in fact, though there are elements (iron-ajax) that can help, really you are on your own.
Given that polymer is mostly here to provide early access to Web Component development (and use), personally I decided to use fetch, the coming (low level, at least) standard for AJAX in Javascript.
Here is a link to a polyfill for the fetch API.
https://github.com/github/fetch
IOW: you are on your own making an ajax request, use the Fetch API or some other library of your choosing.
Then you build a RESTful back end and it doesn't matter what sort, though it's common to use Node.js with Express.

when to use moustache.js or backbone.js

I'm wondering when it is useful to use moustache.js (or something similar which do js templating), and when I can use backbone.js (which uses js templating inside it)
I've a web app with multiple pages, a json app, and the pages data are loaded via api calls, so I've tought about using moustache to clean up the rendering, but I'm wondering if backbone will improve something in my case
As already mentioned, they do serve completely difference purposes. Moustache being a templating engine, and Backbone bringing the MVC paradigm to Javascript. To quote from the Backbone homepage
When working on a web application that involves a lot of JavaScript, one of the first things you learn is to stop tying your data to the DOM. It's all too easy to create JavaScript applications that end up as tangled piles of jQuery selectors and callbacks, all trying frantically to keep data in sync between the HTML UI, your JavaScript logic, and the database on your server. For rich client-side applications, a more structured approach is often helpful.
So, if you find yourself writing a load of DOM manipulation calls etc. Or you simply prefer a structured approach to your code - you will find Backbone a godsend.
It is of course possible to use other templating solutions (other than the one bundled with Underscore) and integrate it into a client-side application created with Backbone.
Both cam be use together,
To build web application architecture you can use backbonejs.
and to render templates you can use mustachejs.
First of study basic knowledge about both.
You will well understand when to use what.

Ember.js widgets/components?

Ember.js is a well written micro architecture framework but how does it address the problem of using/configuring commonly needed widgets? (e.g a DataGrid or calendar flyout)
What approach are you using to integrate widgets with Ember.js ? Cherrypick from JQueryUI/roll your own then wrap them in a View ? etc.
Read http://yehudakatz.com/2011/06/11/using-sproutcore-2-0-with-jquery-ui/. There are some API changes you need to account for, but the general approach is valid.

What about sencha or Extjs?

i'm here to ask a general question about Extjs or any other web related technologies....
i found out that it is impossible to parse xml without the help of any webservice.....
so i would like to know about the pro's and cons about these kind of technologies specifically sencha.
whats the best feature you find intresting about this technology and also the worst thing...
ExtJS, SmartClient, YUI, MooTools, etc are all rich Internet application (RIA) frameworks that allow you to integrate at the JavaScript and/or Google Web Toolkit levels. I have generally seen ExtJS and SmartClient compared most frequently. I have used SmartClient myself and one reason I did was because of the licensing differences between the two.
The biggest advantage of something like ExtJS or SmartClient is that they allow you to focus on building a data-driven service that easily integrates with their rich set of widgets. This allows you to focus on your data and simply leverage their flexible, cross browser-ish, slick looking web GUI controls.
In my opinion, it's a great time saver and browser robustness advantage. You can combine these with things like JQuery, etc. In fact, you can use ExtJS and SmartClient together if you like. (although most people won't)
There's a data package in ExtJS & Sencha Touch that allows you to easily bind client apps to JSON, YQL, XML datasources.
You should probably take a look at the documentation for the data.* part of the ExtJS library: http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.XmlStore and this area is further improving in the forthcoming EXT JS 4

Web Application Framework - HTML5 with mobile devices JavaScript support

I searched for Java based web application frameworks the last few days. I have to build a Java EE backend and a HTML5/CSS3/JavaScript frontend which can be accessed with multi-touch capable devices. So I will need modern JavaScript frameworks like Sencha Touch.
My backend should be built upon with Java EE, Hibernate and MySQL. I have two kinds of data transfer: AJAX / JSON so the page does not need to be reloaded and pages and normal pages which reload the page by sending a form with POST (or do you think to have more the feeling as a application I should do all stuff with AJAX/JSON?).
I found several web application frameworks:
JavaSever Faces
Apache Wicket
Spring MVC
handle it only with jar files for JSON (and REST)
Google Web Toolkit
What do you think will fit best? Perhaps you can exclude one of them, that would also be great, so I can take a closer look at the remaining technologies.
Best Regards, Tim.
Interesting question.
Concerning exclusion: If you use a JS framework like Sencha Touch in the frontend I don't see the sense in using something like GWT which is for frontend-code generation.
I would probably stick with a more lightweight framework like http://www.playframework.org/.
You get your data from the backend and then hand it via JSON over to your frontend code i.e. sencha, sproutcore, cappuccino, gwt or what you choose to use.
Let me know what you choose :-)