Yii Framework Forum: Jquery Mobile + Yii - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Jquery Mobile + Yii

#1 User is offline   este 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 23-September 11

Posted 15 December 2011 - 01:36 AM

Integrating Yii with Jquery mobile (now finally 1.0) would be really interesting in my opinion.

It is perfectly compatible with Jquery and introduces also a very interesting css framework (limited for my taste, yet, but still amazing).

In "marketing" terms that could also be a good move, since people could get even more interested in Yii (that already enjoys its integration with Jquery a lot). I think for example about the possibility to automatically skin forms, manage all touch events (that is a big thing) and make a site fully compatible with mobile devices, or even simple things like organize the page in grids + the extended use of ajax. I still know it superficially, but for what i saw there is something somehow revolutionary in that js framework.

I think many people will start using jquery mobile also for desktop sites, because it helps a lot and offers a new way you can think about a web application (in a much more responsive and "physical" way), even if it is still "only" a 1.0 release.

I know you have many other priorities and that can be a big work, but it is available and it is an idea. :)

http://jquerymobile.com
2

#2 User is offline   abajja 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 108
  • Joined: 05-March 09
  • Location:Barcelona, Spain

Posted 15 December 2011 - 04:12 AM

It will be a very smart move. I agree: +1 for this feature.
0

#3 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,778
  • Joined: 17-January 09
  • Location:Russia

Posted 15 December 2011 - 07:32 AM

I think it was discused already. jQuery mobile isnt mature enough for production use yet. Check how it behaves on android devices and you'll see it.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#4 User is offline   abajja 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 108
  • Joined: 05-March 09
  • Location:Barcelona, Spain

Posted 15 December 2011 - 09:50 AM

View Postsamdark, on 15 December 2011 - 07:32 AM, said:

I think it was discused already...


Can you indicate where it is discussed.
0

#5 User is offline   Greg Molnar 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 47
  • Joined: 17-January 11

Posted 15 December 2011 - 11:57 AM

View Postsamdark, on 15 December 2011 - 07:32 AM, said:

I think it was discused already. jQuery mobile isnt mature enough for production use yet. Check how it behaves on android devices and you'll see it.


They released the first stable version and I have good experience with it. The stable worked well on all the android devices I tried.
0

#6 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,778
  • Joined: 17-January 09
  • Location:Russia

Posted 15 December 2011 - 12:07 PM

abajja
Tried to find it but failed. Maybe it was StackOverflow or another website out there.

Greg Molnar
As I remember issues were about animation at iPod and some Android devices w/o much CPU power.


Anyway, tightly integrating jQuery mobile doesn't sound good to me. Maybe an additional packageā€¦
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#7 User is offline   este 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 23-September 11

Posted 16 December 2011 - 02:15 AM

What's interesting in a possible integration with a php framework or as a separate package, is that jquery mobile deeply modifies the DOM (before being ready), by looking for special tag attributes like data-role="header" or data-role="button" where it automatically applies a large set of transformations.

That means that the html generated code needed is actually very simple and clean, since you do not have to apply every single css class and complex html but just general roles to each element.

The improvement is important since you get a mobile compatible css framework and a full set of new events for mobile devices "out from the box" (automatic ajax transitions, etc).

Concerning stability and compatibility i think the last release made big improvements on the past ones, and that will surely continue.

But i understand it cannot be seen as a priority for Yii: integrating them very well could also take a lot of time to Yii developers. And for users it won't be difficult to integrate those 2 "manually" from scratch. :)
0

#8 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 16 December 2011 - 02:27 AM

Can you explain a bit more about what would be needed to be done by Yii for the jQuery mobile integration?

For example the "data-role" attribute you mentioned can be set with the htmlOptions...
Find more about me.... btw. Do you know your WAN IP?
0

#9 User is offline   este 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 23-September 11

Posted 16 December 2011 - 02:32 AM

View Postmdomba, on 16 December 2011 - 02:27 AM, said:

Can you explain a bit more about what would be needed to be done by Yii for the jQuery mobile integration?

For example the "data-role" attribute you mentioned can be set with the htmlOptions...


Yes of course. Nothing that cannot be done manually with Yii as it is today.

An integration would deserve a real discussion on how that could be done.. i think there are different ways and levels.

For example (but very stupid): activating jquery mobile from the config file would actually activate it in every html element for every zii widget and generated content (unless you explicitly want to disable it for a particular element/widget), and of course include basic css and js.
0

#10 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 16 December 2011 - 02:34 AM

View Posteste, on 16 December 2011 - 02:15 AM, said:

And for users it won't be difficult to integrate those 2 "manually" from scratch. :)

Exactly. :)

jQuery mobile is just one of out many frameworks which targets mobile.

Why on Earth should Yii cater for one, and not for the other?

Especially when it's relatively easy to integrate yourself.
"Less noise - more signal"
0

#11 User is offline   este 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 23-September 11

Posted 16 December 2011 - 02:37 AM

You could even be able to serve a different site for mobile and desktop clients.. just another idea.
0

#12 User is offline   este 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 23-September 11

Posted 16 December 2011 - 02:37 AM

View Postjacmoe, on 16 December 2011 - 02:34 AM, said:

Exactly. :)

jQuery mobile is just one of out many frameworks which targets mobile.

Why on Earth should Yii cater for one, and not for the other?

Especially when it's relatively easy to integrate yourself.


Yes you are probably right.. i admit it. :)
0

#13 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 16 December 2011 - 02:41 AM

One more thing... the "zii" components are the official extensions for Yii... they are not part of the core... so (IMHO) for the mobile "integration" there would be the need to create a mobile "zii" versions... I think it would be easier than adopting current zii widgets code to work on desktop and mobile simultaneously...
Find more about me.... btw. Do you know your WAN IP?
0

#14 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 16 December 2011 - 02:41 AM

View Posteste, on 16 December 2011 - 02:37 AM, said:

Yes you are probably right.. i admit it. :)

There are other people who really wants Yii to integrate with jQuery Mobile.
Because - as they say: Yii is already integrating jQuery..

IMO, I still can't see why Yii should... :P

But, maybe if Yii could provide you with some common functionality which makes it easier to integrate jQuery mobile and/or anything else, that would probably be a good alternative?
"Less noise - more signal"
0

#15 User is offline   este 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 23-September 11

Posted 16 December 2011 - 03:07 AM

View Postjacmoe, on 16 December 2011 - 02:41 AM, said:

But, maybe if Yii could provide you with some common functionality which makes it easier to integrate jQuery mobile and/or anything else, that would probably be a good alternative?


yes, sure. :)

the point is probably more strategical maybe, than just technical. what is the mobile/tablet/desktop share of the future? i do not know.. but it is easy to imagine that we will all be working on touch/small devices very often very soon, if not already. and probably the difference will tend to disappear somehow.

is there any reason to think about it in a php framework? again, i do not know. you surely do much better than me.


i say that because also integrating jquery + ui to yii, today, from scratch, is very simple. but you did it. and i think that was a pretty good idea, even if zii components are and will always be great only for (many) common tasks, as a framework should be, i think.
0

#16 User is offline   este 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 23-September 11

Posted 16 December 2011 - 03:14 AM

View Postmdomba, on 16 December 2011 - 02:41 AM, said:

One more thing... the "zii" components are the official extensions for Yii... they are not part of the core... so (IMHO) for the mobile "integration" there would be the need to create a mobile "zii" versions... I think it would be easier than adopting current zii widgets code to work on desktop and mobile simultaneously...


but is jquery currently part of the core? sorry for my ignorance. if i understand it well, any js integration would be anyway separated from the core..
0

#17 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 16 December 2011 - 04:37 AM

It's available in the Yii package, but it's an optional convenience.
Mainly because the core Yii devs use jQuery.

There's an extension for extJs, and you can use Prototype, MooTools, and whatever you want.
"Less noise - more signal"
0

#18 User is offline   Psih 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 115
  • Joined: 30-June 10

Posted 16 December 2011 - 09:02 AM

View Postsamdark, on 15 December 2011 - 12:07 PM, said:

Greg Molnar
As I remember issues were about animation at iPod and some Android devices w/o much CPU power.

I remember reading about it and that it's an issue with the android browser itself and Android OS. It just cannot be fixed by the jQuery Mobile team.
0

#19 User is offline   ekerazha 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 526
  • Joined: 10-October 08
  • Location:European Union

Posted 19 December 2011 - 04:03 PM

View PostGreg Molnar, on 15 December 2011 - 11:57 AM, said:

They released the first stable version and I have good experience with it. The stable worked well on all the android devices I tried.

I can confirm this.

View Postjacmoe, on 16 December 2011 - 02:34 AM, said:

Exactly. :)

jQuery mobile is just one of out many frameworks which targets mobile.

Why on Earth should Yii cater for one, and not for the other?

Especially when it's relatively easy to integrate yourself.

I could say the same thing about jquery (which is already part of Yii), jquery ui, htmlpurifier etc. etc. there's always another choice.

View Postjacmoe, on 16 December 2011 - 04:37 AM, said:

It's available in the Yii package, but it's an optional convenience.
Mainly because the core Yii devs use jQuery.

There's an extension for extJs, and you can use Prototype, MooTools, and whatever you want.

Not really, jquery is widely used by yii.
Yii user #37
0

#20 User is offline   Vedran 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 02-June 11
  • Location:Sarajevo

Posted 19 June 2012 - 06:56 AM

I strongly agree with this suggestion.

Of course you can manually implement any solution. But that's not the point. The basic philosophy of Yii Framework is (IMHO) to help and assist developers by giving them a solid foundation on which to continue building your web application. Would that developers could do themselves without Yii Framework? Sure! But this is a main reason why Yii is a real precious treasure for developers.You do not have to bother with an initial, simple but very important features.

On the other hand, only the blind would be overlooked that the Web as we know it is changing. Some even claim that the number of mobile web users will very soon outgrow the number of desktop users. The need for a good solution (in the "Yii way" ;D ) is obvious.

For example, if I want to create web application but also support my mobile, "on the go" users i could create Yii based application, with server side & client side code for desktop and only client side code for mobile users that will implement with server side code. I could even pack it with some kind of mobile multi-platform super mega giga-bigga packager tool like PhoneGap.

Until this point everything is sha-la-la. But what if I want to implement client validation on mobile. User have internet connection, could connect with our server side code and through RESTful API, Json (...) connect with yii code and through it with database. However, how to implement for example this one simple feature? :blink: I know developer could do it manually. But this could also be done manually in desktop version of application, but we very much appreciate the help of Yii. If the forecasts say it will rain more and more mobile users, this will be very popular and requested options. B)

And it does not need to be JQM. I already trust to Yii Team that thay always find finest options on the whole programmer planet. )
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users