If I'm already using jQuery Mobile -- is http://css-tricks.com/add-page-transitions-css-smoothstate-js/ (http://weblinc.github.io/jquery.smoothState.js/) possible / worth it to implement?
I really don't see a benefit of using jQuery Mobile with smoothState.js. jQuery Mobile already can do everything smoothState.js can, you only need to learn how. Though smoothState.js has everything better described, plus you don't need to use gazillion different page events. But to use them both you would need to turn off jQuery Mobile Ajax handling.
Basically I would like to see smoothState.js approach used inside jQuery Mobile framework.
My advice stick to jQuery mobile if you really need its UI, for everything else use smoothState.js, of course if seamless navigation is something you desire.
Related
I have created a fully functional good looking website but it is not responsive as of now, I tried to make it responsive but the code is not developed that way.
So Now I am thinking to go for an alternative. i:e Jquery Mobile.
So there will be two websites one is for desktop and one is for mobile device(to be coded newly in jquery mobile). Whenever user visit with any mobile device, I will redirect the user to the mobile version.
So I just wanted to confirm if it could be the good practice or not. Will it impact SEO or Would there be any problem for the website in future if I go that way?
I have several sites that use jQuery Mobile and they all rank well and pass the Google Mobile Friendly Test, so I don't think you need to be too concerned about SEO being affected if you have two sites.
Having standalone mobile sites does have some advantages, for example you can make the page weight of your mobile sites lighter without any complicated javascript.
One to the downsides is that you'll have two versions on the same site to maintain. The only reason I still have some jQuery Mobile sites is that they are older and were designed before responsive web design was cross-browser reliable.
So I just wanted to confirm if it could be the good practice or not?
You can go either way. I found jQuery Mobile easy to implement and it has been very reliable and low maintenance. Personally I go for responsive design now, but I'm sure you'll find plenty of developers that prefer using standalone mobile sites and jQuery Mobile.
Good luck!
I am developing a hybrid mobile app using jQuery Mobile and AngularJS.
I decided to use a mix of the two for the following:
jQuery Mobile
good UI features
not too heavyweight (compared to Sencha Touch, for example)
AngularJS
good performance and resource management (caching, asynchronous requests)
personal experience
I have little to no experience with jQuery Mobile and, as I was learning, I noticed a potential conflict between the page navigation models of the two.
Should I use only one ?
If yes, which one is better suited for my needs ?
Are there any gotchas with this setup ?
Many thanks.
You can't compare them to each other.
Angular.js (like Backbone, Ember eg.) are MV* Frameworks (for SPA) which used to render html templates/views directly in the client instead of server. So you have a lot of application logic now in your frontend and this Frameworks are made to make your life better, coding this.
jQuery Mobile on the other side is a pure widget/plugin library. The AJAX navigation plugin load pages (something static, like html) into the DOM via AJAX. So you have to pre-render this pages on the server somehow.
If you started to build a SPA with Angular it doesn't make sense to use jQuery Mobile's AJAX navigation at all. (If it's a native mobile app you have no server anyway.)
Sure, you won't get far without an UI component library so use one of your choice (eg. jQM) but work with Angular's directives to init the plugins/widgets correctly on your DOM elements since a $(document).ready(...) or a $(document).on( "pageload", ... ) doesn't know anything about your Angular views.
Take a look at following projects:
http://angular-ui.github.io
https://github.com/angular-widgets/angular-jqm
This has been already addressed in HERE
Basically the article states that trying to intercept the navigation from angular can be painful, so leave all the routing jqm
I've read the Sencha Touch docs. I feel its MVC model is very attractive but it seems to has a long start-up time, especially with external JavaScript (eg:map).
Although I'm comfortable using jQuery in a web site, I have concerns about the maturity of jQuery Mobile. (I haven't tested it yet)
I have no idea about Dojo's mobile framework.
Which of these alternatives do you like? Why?
So what exactly are you requirements? Each framework has different several advantages and disadvantages....
Me personally I use Jquery Mobile, which is now at it's first official release. Don't let version numbers fool you, this has been developed 1 year long and actually works pretty good!
The others provide different capabilities:
sencha is based on javascript controls - you create the whole layout from within javascript using JSON notation for properties/actions/events
jqm allows you to use your "standard" HTML and enhances it "auto-magically". In my opinion this is the closest to HTML you'll ever get
Dojo is more about MVC and allows a more structured environment. Haven't used it personally so I can't say too much about it...
Hope this helps
jQuery Mobile is working for my site but slow. Cause of the slowness turned out to be jquery. We searched an alternative but most of them still uses javascript/jquery.
Question: Is there any other framework for mobile with better performance?
Considering Javascript is the core language all web browsers use for programatic changes, unless you want to only change the Visuals via CSS and what it has to offer, I believe you are stuck.
Take a look at Zepto: https://github.com/madrobby/zepto
It still uses JavaScript but with a really small footprint.
I'm working on a asp.net mvc2 app. I have been using jquery to do various different things in all of my views. They are work from a regular browser quite well. But I'm trying to figure out a good way to get the functionality working with browsers with javascript disabled (like mobile browsers). Is there a way to define a whole different view for non javascript browsers?
A specific example of what I'm trying to do is, I have a <button> with it's onClick calling a javascript that does $.post() to a controller.
What's a good way to make it, so, it works the way it works right now (doing ajax calls) with regular javascript-enabled browsers and it a also works with javascript-incapable browsers, doing a full postback ?
Thanks
I use the unobtrusive javascript approach; get the app working without JavaScript, then add in extensibility with JQuery so that the app will work when scripts are turned off, or if the JS fails to download.
Same approach I believe that #James Kolpack is talking about. This is the true failsafe approach. While you can detect the support of JS by the browser through Request.Browser, this isn't accurate to most of the possible scenarios.