Can JavascriptMVC work with an alternative library to jQuery?

230 Views Asked by At

Specifically, I'm looking at the recently released qMobi and wondered if anyone has had any luck getting JavascriptMVC to work with it.

I'm assuming Zepto doesn't work with it?

Has anyone tried either?

For context, I'm currently creating mobile (and mobile web) apps using Backbone + Zepto but I like JMVC's build environment and built-in testing tools. I'm not however, a big fan of being tied in to jQuery which IMHO is a little too heavyweight for mobile web app development.

2

There are 2 best solutions below

0
On

I think JavaScriptMVC is modular enough to use its ecosystem (StealJS, FuncUnit, ...) in your building process without using jQueryMX. The building system will depend on jQuery, but the released application will not.

0
On

As has been said, you could leave out jQueryMX and just use steal, etc. to build test and document, but that's kind of like buying a car without an engine.

In theory, it's possible that another library with a jQuery compatible syntax could drive jQueryMX. Try replacing jquery/jquery.js with qMobi and see if it works. I'm guessing that it wont though. The controllers in particular leverage jQuery pretty heavily, and most plugins are going to assume it's the real jQuery.