3

I'm looking for a javascript framework to help me with mobile website front-end programming.

The perfect solution would be a js file that, when included in my project, will give me basic mobile helper functions/event handling such as drag and drop, tap-hold, swipe WITHOUT forcing me to create a mobile specific version of my existing website.

I looked at jQuery Mobile and jQtouch but both forces me to create a mobile specific version of my website.

Is there any framework that could help me?

Gabriel
  • 2,720
  • 4
  • 28
  • 36
  • 1
    Any single source file you find is likely to be considered a 'framework'. Why not just pick and choose the features you need from one of the ones you mentioned? – scottm Feb 06 '12 at 15:01
  • 1
    ummm... that WOULD still be a framework. – Diodeus - James MacFarlane Feb 06 '12 at 15:02
  • Maybe my personal vision of framework is not right... but what I meant is that I don't want anything that will force me to code in a specific manner for it to work because I do not want to have 2 websites (one for browsers, and another one for mobile). As an example: jQuery mobile will modify the structure of the page when it starts. I don't want that. – Gabriel Feb 06 '12 at 15:12
  • I edited my question according to @Jonathan's suggestion to make it more accurate. :) – Gabriel Feb 06 '12 at 15:38

3 Answers3

1

I think a better way to say it might be: "Is there a lightweight framework for mobile apps that will also leave my existing site mostly alone." Does that state it well, or, did I misunderstand?

You should be able to get pretty far with jQuery and jQuery UI.

I would also recommend something like Knockout.js to handle data binding.

Of course, you could always pull out the functions you want from jQuery/JQM. As I understand it, JQM is fairly separable, the widgets, that is.

Jonathan
  • 5,495
  • 4
  • 38
  • 53
  • I tried to pull out the functions I wanted from jQuery Mobile and I expected it to be fairly easy but maybe my js skills are not good enough, but I didn't manage to make it work. As for jQuery and jQuery UI, they don't have anything specific for mobile. No swipe events in jQuery, and by default, the drag and drop of jQuery UI will not work on touch screens. – Gabriel Feb 06 '12 at 15:14
  • @Gabriel Tell me which widgets/functions you want and I will help you pull them out cleanly. I have been working with JQM since the first release. :P – Jonathan Feb 06 '12 at 15:15
  • The important features for me are the touch events: tap, taphold, swipe and orientationchange. Thanks for your help! :) – Gabriel Feb 06 '12 at 15:22
  • Me too, were you guys able to extract the events? I mainly just need taphold and swipe. – rball Apr 13 '12 at 15:57
  • Found this right after posting here: http://stackoverflow.com/questions/9311079/extend-jquerys-on-to-work-with-mobile-touch-events – rball Apr 13 '12 at 15:59
0

Zepto is a jQuery compatible Micro-Framework for mobile devices that should fit your needs

JaredMcAteer
  • 21,688
  • 5
  • 49
  • 65
  • That looks interesting, I might have to try it out on my next mobile app. Do you have much experience with it? – Jonathan Feb 06 '12 at 15:19
  • Indeed, it looks interesting, but the way I understand it by quickly looking at their website: I still need to have a mobile specific version of my website to be able to use it, right? – Gabriel Feb 06 '12 at 15:28
  • I tested a few things to try Zepto out and it's definitely not ready to be used in live websites. In less than 30 minutes I found a few problems. I'm sure that this framework will be really great when it will be ready. But unfortunately for us, it's not ready yet... :( – Gabriel Feb 06 '12 at 16:37
0

You should check out Sencha to the list of frameworks you're considering. I've been playing around wit

Paolo del Mundo
  • 2,121
  • 13
  • 18