Add jQuery Mobile
#1
Posted 17 September 2011 - 08:15 AM
#2
Posted 17 September 2011 - 08:36 AM
I work at http://inze.it where we focus on mobile websites. We use Yii and jQuery mobile in all of our projects and they seem to fit perfectly together. For example: I have extended the CController into a MobileController, which all other controllers extend. The MobileController ensures that the layout is only sent along with the first load. Since jQuery loads all following pages with ajax, it doesn't need the layout, and thereby saving both server and client side load time.
My conclusion: Yii 2.0 should be less attached to jQuery and focus on features like minifying and combining css and JS but could provide ClientScript and Html classes to support the jQuery framework.
If you like the idea of more PHP programming and less HTML, you could extend CHtml to a MobileHtml which makes use of jQuery mobile features. In fact I use that approach on links because it simplifies the views a bit.
#3
Posted 17 September 2011 - 12:28 PM
Moreover, I think that having a jQuery Mobile ready framework would be nice, without having to workaround rough edges by myself.
#4
Posted 17 September 2011 - 12:47 PM
What do you mean by "ready"? My experience is that there isn't really any workarounds needed. jQuery mobile works very well with Yii. Do you have any examples?
#5
Posted 20 September 2011 - 08:37 AM
Thomas Jensen, on 17 September 2011 - 08:36 AM, said:
I think that it should be ready-to-use. Mobile-optimized websites are a milestone in web development.
#6
Posted 20 September 2011 - 10:30 AM
#7
Posted 21 September 2011 - 03:32 AM
ekerazha, on 20 September 2011 - 08:37 AM, said:
It is. No workarounds required. That's the whole idea about jQuery Mobile; it's based on HTML markup, to make it as easy as possible. All you have to do is load the JS file.
ekerazha, on 20 September 2011 - 08:37 AM, said:
Sure they are, my company sells nothing else than mobile websites.
#8
Posted 29 September 2011 - 05:28 AM
#9
Posted 06 October 2011 - 08:37 AM
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#10
Posted 06 October 2011 - 05:32 PM
I'd rather see support for HTML5 Boilerplate, with accessible media queries.
The rest would then be a piece of cake.
Without jQuery Mobile..
#11
Posted 06 October 2011 - 07:12 PM
20-amazing-examples-of-using-media-queries-for-responsive-web-design
jQuery Mobile is great, like jQuery UI - but no serious web designer (IMHO) would use it..
I'd rather see Yii switch from using BluePrint to Skeleton:
http://www.getskeleton.com/
I am using it for my website:
http://www.jacmoe.dk/
Resize the browser window to see it adapt.
I haven't really finished making it responsive, but you get the idea.
Here's how it looks on iPhone:
http://iphone4simula...m/www.jacmoe.dk
And on iPad:
http://ipadpeek.com/...moe.dk (portrait)
http://ipadpeek.com/...moe.dk (landscape)
So, I'd rather see Yii using Skeleton by default.
Not even the author of BluePrint uses BluePrint these days..
#12
Posted 07 October 2011 - 02:04 AM
#13
Posted 07 October 2011 - 07:50 AM
jacmoe, on 06 October 2011 - 07:12 PM, said:
20-amazing-examples-of-using-media-queries-for-responsive-web-design
jQuery Mobile is great, like jQuery UI - but no serious web designer (IMHO) would use it..
I'd rather see Yii switch from using BluePrint to Skeleton:
http://www.getskeleton.com/
This has nothing to do with the original question. I'm saying that jQuery Mobile would nicely complete the family, as Yii already integrates jQuery and jQuery UI. I'm a serious designer and I don't have any problem with UI and Mobile.
Swithing from BluePrint to Skeleton for the default theme is another story.
#14
Posted 07 October 2011 - 09:46 AM
#15
Posted 19 October 2011 - 08:42 AM
if including it, i think yii is not a common framework, but a heavy framework.
#16
Posted 19 October 2011 - 11:27 AM
Davidhhuan, on 19 October 2011 - 08:42 AM, said:
if including it, i think yii is not a common framework, but a heavy framework.
There is nothing of "heavy", if you don't want it, just don't use it. There isn't any reason to include jQuery UI and not jQuery Mobile.
#17
Posted 19 October 2011 - 03:01 PM
As for jQuery mobile.. There are other more capable solutions out there.
Such as Zepto.js.
#18
Posted 20 October 2011 - 04:13 AM
#19
Posted 20 October 2011 - 05:47 PM
Doesn't this do the job?
Fork on github
Follow phundament on Twitter
DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
#20
Posted 20 October 2011 - 08:17 PM
ekerazha, on 20 October 2011 - 04:13 AM, said:
You sound like a broken record, dude.
I do not use jQuery UI at all when I use Yii, and I prefer it that way.
Zepto is 4K, and does pretty much what jQuery does.
It's highly recommended.
Why lock Yii users in, when you don't have to?
I agree with Thomas Jensen: Yii 2.0 should concentrate on asset management, like minification, uinification, etc. - IMO it really needs to be improved.
Curious: what makes it so hard to just use jQuery Mobile??
Right now?
I don't get it.

Help

This topic is locked













