Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

jQuery UI in Action: jQuery UI and JavaScript frameworks

 
Marshal
Posts: 67293
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was very excited to see that jQuery UI in Action contains an appendix that outlines using jQuery UI with Backbone.

Does the book also cover how to use jQuery UI with AMD frameworks such as RequireJS?

And what, in your opinion, are the biggest issues and challenges to using jQuery UI with frameworks such as Backbone with Handlebars templates?
 
Author
Posts: 11
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Bear,

The book does cover how to use jQuery UI with AMD / RequireJS. It's the focus of chapter 10 and then it's put to use in a real app in chapter 11. I highly encourage the usage of AMD in the book because I think it's important to ship a minimal JavaScript payload to users. The single biggest complaint about jQuery UI is its size, which is silly, because the library is very modular so it's easy to pick out the pieces you need. AMD makes using those modules easy.

To me the biggest challenge when using jQuery UI with any front-end MVC framework (Backbone, etc) is dealing with dynamically inserted content. The conventional model of using jQuery / jQuery UI is you wait for document ready, you select elements with jQuery, and then you make the appropriate plugin calls to build your UI. With MVC frameworks you're dynamically rendering views (often based on templates), which changes how you initialize the widgets you need to use. Appendix C gets into the specifics of how to approach this with Backbone, but I tried to make the discussion somewhat generic to handle any MVC framework. The core of my approach is a small jQuery UI extension that I wrote that lets you configure widgets with HTML attributes: https://github.com/tjvantoll/declarative-widgets.

TJ
 
Bear Bibeault
Marshal
Posts: 67293
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tj VanToll wrote:I highly encourage the usage of AMD in the book because I think it's important to ship a minimal JavaScript payload to users.


This is fantastic. To those of us that have had long-lasting projects that started small and have grown well beyond their originally-envisioned scope, controlling the way JavaScript modules are loaded is essential -- and a phenomenal pain in the butt to refactor.

It's great that the book will address this for the jQuery UI side of the house.

The single biggest complaint about jQuery UI is its size, which is silly, because the library is very modular so it's easy to pick out the pieces you need. AMD makes using those modules easy.


Unfortunately, I think most people just download the entire caboodle without giving much thought to what they actually need to employ.

To me the biggest challenge when using jQuery UI with any front-end MVC framework (Backbone, etc) is dealing with dynamically inserted content.


Indeed. Especially in a refactored environment. (Care to guess what I've been busy doing? )

The core of my approach is a small jQuery UI extension that I wrote that lets you configure widgets with HTML attributes: https://github.com/tjvantoll/declarative-widgets.


I'll be sure to check this out. Thanks for sharing!
 
BWA HA HA HA HA HA HA! Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!