Deal of the Day

Home » Main » Manning Forums » 2011 » HTML5 in Action

Thread: Discussion of why not to use JQueryUI and/or Wijmo?

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 7 - Pages: 1 - Last Post: Nov 19, 2011 4:50 PM by: jwdaigle
jwdaigle

Posts: 17
Registered: 9/29/11
Discussion of why not to use JQueryUI and/or Wijmo?
Posted: Nov 18, 2011 12:16 AM
  Click to reply to this thread Reply

Section 2.5.1: talks about how to determine if the browser loading your HTML is HTML5 or not, and what to do if it isnt "5 compatible".

It seems that you are recommending readers to use JQueryUI.

My question: since JQueryUI handles cross browser issues for you, why not use it in the first place? Whats the downside?

Suggest you add an aside somewhere to discuss that?

Also in the caption for Figure 2.24, you say "When browsers support native date pickers, they will be preferred to this jQuery one.".

Why?


The reason I am asking is that I am just starting my client side development experience (used to be silverlight & C#). It seems that using a library like JQuery or Wijmo (among others) gives cross browser look & feel consistency, and application developers dont need to worry about it?

ashblue


Posts: 24
From: San Francisco, CA
Registered: 6/30/11
Re: Discussion of why not to use JQueryUI and/or Wijmo?
Posted: Nov 18, 2011 11:07 AM   in response to: jwdaigle in response to: jwdaigle
  Click to reply to this thread Reply

While Joe (author of chapter 2) will probably chime in, I think I can answer most of your questions.

jQuery's UI script isn't ideal because it loads up an entire JavaScript library. This adds a little extra load time on personal computers and a noticeable amount on mobile devices. Using an HTML5 specification lets the browser vendor handle the feature instead of relying on a library (think of it as built in support with standards). So part of the issue here is speed.

There is a direct correlation between page load times and user happiness. See Smashing Magazine's speed article for more info http://coding.smashingmagazine.com/2010/01/06/page-performance-what-to-know-and-what-you-can-do/

Another issue is JavaScript support can be partial or inconsistent on mobile devices. Check out Peter-Paul Koch's article on mobile JavaScript feature support for a good breakdown on what you can use http://www.quirksmode.org/m/table.html

jwdaigle

Posts: 17
Registered: 9/29/11
Re: Discussion of why not to use JQueryUI and/or Wijmo?
Posted: Nov 18, 2011 5:55 PM   in response to: ashblue in response to: ashblue
  Click to reply to this thread Reply

Thank you ash for your response.

I suggest you put in some kind of aside or sidebar that discusses this. As a reader of your book, and very much a noob on the client side, when I read that "and if your browser doesnt support HTML5, then just use JQueryUI", I thought "well, why not use it all the time then?". Again, not seeing the issues you point out here.

The only point I would point out is that one pro for always using JQuery UI is that you get consistent look and feel across browsers. that is, since each browser vendor is free to implement these tags however they want, an applications UI would look different on each browser. With JQueryUI, it is theoretically the same, no?

As a great example, look at how the date tag is implemented on each browser.

ashblue


Posts: 24
From: San Francisco, CA
Registered: 6/30/11
Re: Discussion of why not to use JQueryUI and/or Wijmo?
Posted: Nov 18, 2011 6:24 PM   in response to: jwdaigle in response to: jwdaigle
  Click to reply to this thread Reply

Good point, chapter 2 will be revised in the near future, so I'll pass your comments along to Joe (chapter author).

You're right about a consistent look and feel on some HTML5 form specifications. As inputs become more standardized though, they should look similar (since they're standardized).

robert.crowther

Posts: 49
From: London, UK
Registered: 9/30/10
Re: Discussion of why not to use JQueryUI and/or Wijmo?
Posted: Nov 18, 2011 8:56 PM   in response to: jwdaigle in response to: jwdaigle
  Click to reply to this thread Reply

Just to add my two penneth on this thread: having your app look the same in all browsers is a false goal. The only person that's going to look at your app in more than one browser is you and (possibly) other web developers. From your user's point of view it's more important that date pickers (for example) look the same across websites, rather than that the web picker on a particular website looks the same in all browsers.

jwdaigle

Posts: 17
Registered: 9/29/11
Re: Discussion of why not to use JQueryUI and/or Wijmo?
Posted: Nov 18, 2011 10:22 PM   in response to: robert.crowther in response to: robert.crowther
  Click to reply to this thread Reply

re: app looking the same in all browsers being a false goal.

Theres still something that bothers me about this, but I cant quite put my finger on it. One point of clarification - I think I meant similar, not exactly the same.

I think maybe it has to do with not only the "look", but the behavior being similar and its effect on the testing process.

I do buy your argument however, about the importance of a users perception that a date picker looks the same across all websites - that makes perfect sense.

joe.lennon


Posts: 9
From: Cork, Ireland
Registered: 9/22/11
Re: Discussion of why not to use JQueryUI and/or Wijmo?
Posted: Nov 19, 2011 7:43 AM   in response to: jwdaigle in response to: jwdaigle
  Click to reply to this thread Reply

Hi jwdaigle,

I'll have a look at the coverage of jQuery UI and fallbacks and try to add some clarification based on the discussion in this thread.

As browser support for these features improve and web sites and apps start to put them to use, the benefits of native widgets over JavaScript-dependent options should become clearer. For example the Mobile Safari browser in iOS 5 has support for <input type="date"> where it displays a native datepicker spin-wheel control. This is much easier to use than the jQuery UI widget.

Thanks,
Joe

jwdaigle

Posts: 17
Registered: 9/29/11
Re: Discussion of why not to use JQueryUI and/or Wijmo?
Posted: Nov 19, 2011 4:50 PM   in response to: joe.lennon in response to: joe.lennon
  Click to reply to this thread Reply

OK, then I suggest there is some kind of aside that discusses this, even if briefly. I really did think "so why not just use JQueryUI all the time here" when I read that passage.

My goal is to give feedback that helps you write the book for other people making the switch from desktop application development over to thin client via HTML5 etc. That is exactly the switch I am making at the moment.

Legend
Gold: 300 + pts
Silver: 100 - 299 pts
Bronze: 25 - 99 pts
Manning Author
Manning Staff
Manning Developmental Editor