jQUERY UI IN ACTION: A smooth guide to getting, learning and using plugins supported by the jQuery Foundation – #bookreview

jQuery UI in Action

TJ VanToll

 (Manning – paperback)

 

TJ VanToll had two straightforward goals in mind when he decided to write this nicely prepared book: “I wanted to write about how to use the jQuery UI components in real-world usage scenarios and applications. I also wanted to tackle the tough questions for jQuery UI users. [Such as] Why should you use the jQuery UI datepicker instead of the native date picker included in HTML5? How do you use jQuery UI on mobile devices, especially in low bandwidth situations?”

According to the jQuery Foundation, “jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.”

The problem with popularity, of course, is that jQuery became widely employed soon after it was introduced in 2006. Users quickly created a flood of jQuery plugins that, Van Toll writes, “had inconsistent APIs, and often had little or no documentation. Because of these problems, the jQuery team wanted to provide an official set of plugins in a centralized location. In September 2007 they created a new library with these plugins—jQuery UI.”

He adds: “From a high level, jQuery UI was, and still is, a collection of plugins and utilities that build on jQuery. But dig deeper and you find a set of consistent, well-documented, themeable building blocks to help you create everything from small websites to highly complex web applications. Unlike jQuery plugins, the plugins and utilities in jQuery UI are supported by the jQuery Foundation. You can count on them to be officially supported and maintained throughout the life of your application.”

Well-written and well-illustrated, jQuery UI in Action reflects VanToll’s knowledge and experience as a professional web developer and member of the core jQuery UI team.

The book is structured into three parts, encompassing 12 chapters. And it assumes readers have at least basic experience with JavaScript, CSS, and jQuery.

Part One’s chapters introduce jQuery UI and “the ins and outs of widgets…the core building blocks of jQuery UI.”

Part Two’s chapters offer “a comprehensive look at the components of jQuery UI: twelve jQuery UI widgets (chapters 3–4), five jQuery
UI interactions (chapter 5), numerous jQuery UI effects (chapter 6), and the jQuery UI CSS framework (chapter 7).” VanToll explains how each component works and shows how to apply the knowledge to real-world applications. The example projects include: building complex webforms with jQueryUI; using layout and utility widgets; adding interaction to interfaces; and using built-in and customized themes to provide “a consistent look to all widgets.”

Part Three focuses on “Customization and advanced usage.” Here, VanToll explores such topics as using the widget factory to create custom widgets, preparing applications for production, and building a flight-search application “at real-world scale.” In the final chapter, he takes us under jQuery’s hood “to dig into a series of utilities, methods, and properties intended for more advanced usage of the library.”

If you work with jQuery or are ready to start using it, take a good look at jQuery UI, as well. As this book promises, “You’re only one tag away from richer user interfaces….” That tag is pretty simple: <script src=”jquery-ui.js”> — but a lot can happen once you include it.

TJ VanToll’s new book should be your go-to guide for getting, learning and putting jQuery UI into action.

Si Dunn

 

 

 

 

 

http://amzn.to/1r1VwUI

 

You’ll master jQuery UI’s five main interactions—draggable, droppable, resizable, selectable, and sortable—and learn UI techniques that work across all devices.

Adobe Edge Animate – Rocky Nook’s elegant new software how-to guide – #webdesign #bookreview

adobe_edge_animate

Adobe Edge Animate

Using Web Standards to Create Interactive Websites

Simon Widjaja
(Rocky Nook – paperback, Kindle)

Simon Widjaja’s new book is both elegant and practical. It is elegantly structured and illustrated, and it is practical in its approach to showing how to use Adobe Edge Animate.

That software package, Widjaja says, “is a multimedia authoring tool based on open web standards….Compositions created with Edge Animate can be used in browser applications and apps on mobile devices, but also in digital publications created with Adobe Digital Publishing Suite or Apple iBooks Author.”

Widjaja is an experienced Edge developer, as well as programmer, author, IT trainer, and Flash developer.

Not only does his book show how to design and create animations. He also demonstrates “solutions that go beyond the application’s standard functions,” including “integration into external systems and extensibility with additional frameworks and custom components.”

The Edge Animate runtime, he notes, “is largely based on the popular jQuery JavaScript framework.” So external HTML and JavaScript components can be placed into Edge Animate compositions, and Edge Animate users can create their own components.

The 220-page book (translated from German by Susan Spies) is divided into seven chapters, with numbered subheadings and sub-subheadings. The chapters are:

Chapter 1: Introduction — Contains “basic information on the current status quo in web standards” and how they apply to understanding and using Edge Animate.

Chapter 2: Getting to know the authoring tool – Provides an overview of Edge Animate’s interface and its wide range of functions.

Chapter 3: Design – Shows how to use the functions for creating graphic elements, how to work with assets such as images and fonts, and how to “create more complex layouts.”

Chapter 4: Animation – Introduces the Timeline and the Pin and explains “how to animate  your compositions using keyframes.”

Chapter 5: Interaction – Focuses on Edge Animate’s API and “how to implement various actions.”

Chapter 6: Publication –Explores the “the various publishing options available…in Edge Animate and explains the necessary preparations…for publishing your composition on the web or within a digital publication. Also looks at “how your creative work can be integrated into a content management system.”

Chapter 7: Advanced Tips – Covers “a range of extensions you will need to make your projects perform well on the web.”

Widjaja’s Adobe Edge Animate seems an excellent fit for Rocky Nook’s stated 2014 mission, which is “to publish books on cutting-edge developments in photography, imaging, and technology that really matter, and to focus on practical usage that will enhance capabilities. Our ultimate goal,” the company says, “is to foster image quality.”

With this book and Adobe Edge Animate, you definitely can learn how to boost the quality of images, using effective animated presentations on the web, in apps, and in other publications.

One e-book caution: This book “has complex layouts and has been optimized for reading on devices with larger screens.” In other words, do not try to read it on a phone or small tablet.

Si Dunn

Creating Mobile Apps with jQuery Mobile – A good & wide-ranging how-to guide – #programming #bookreview

Creating Mobile Appls with jQuery Mobile
Shane Gliser
(Packt Publishing – paperback, Kindle)

The long tagline on the cover of Shane Gliser’s new book deftly sums up its contents:  “Learn to make practical, unique, real-world sites that span a variety of industries and technologies with the world’s most popular mobile development library.”

Gliser unabashedly describes himself as a jQuery “fanboy…if it’s officially jQuery, I love it.” He is an experienced mobile developer and blogger who operates Roughly Brilliant Digital Studios. He also has some background in mobile UX (user experience).

Both aspects of that background serve him well in his smoothly written, nicely illustrated how-to book that zeroes in on jQuery Mobile, a  “touch-optimized” web framework for smartphones and tablets.

You may be surprised when you extract the 234-page book’s code examples and related items and find that the ZIP file is almost 100MB in size. Gliser covers a lot of ground in his 10 chapters. And each chapter contains a project.

Still, what you don’t do in the first chapter, “Prototyping jQuery Mobile,” is work at a computer. In the true spirit of UX, Gliser has you start first with a pen and some 3×5 note cards. Your goal is to rough out some designs for a jQuery Mobile website for a new pizzeria.

Why the ancient technology? “We are more willing to simply throw out a drawing that took less than 30 seconds to create,” Gliser writes. Otherwise, it’s too easy to stay locked into one design while trying different ways to make its code work. And: “Actually sketching by hand uses a different part of the brain and unlocks our creative centers.”

Best of all, working first with paper sketches enables team members who are not coders to contribute some comments, suggestions, and corrections for the emerging design.

In Chapter 2, “A Mom-and-Pop Mobile Website,” you step over to your computer with the paper prototype in hand and start converting the final design “into an actual jQuery Mobile (jQM) site that acts responsively and looks unique.” You also begin building “a configurable server-side PHP template,” and you work with custom fonts, page curl effects using CSS, and other aspects of creating and optimizing a mobile site.

“Mobile is a very unforgiving environment,” Gliser cautions, “and some of the tips in this section will make more difference than any of the ‘best coding practices.’” Indeed,  he wants you to be aware of optimization “at the beginning. You are going to do some awesome work and I don’t want you or your stakeholders to think it’s any less awesome, or slow, or anything else because you didn’t know the tricks to squeeze the most performance out of your systems. It’s never too early to impress people with the performance of your creations.”

Chapter 3, “Analytics, Long forms, and Front-end Validation,” moves beyond “dynamically link[ing] directly into the native GPS systems of iOS and Android.” Instead, Gliser introduces how to work with Google static maps, Google Analytics, long and multi-page forms, and jQuery Validate. As for static maps, he says, “Remember to always approach things from the user’s perspective. It’s not always about doing the coolest thing we can.” Indeed, a static map may be all the user needs to decide whether to drive to a business, such as a pizzeria, or just call for delivery. And, as for Google Analytics: “Every website should have analytics. If not, it’s difficult to say how many people are hitting your site, if we’re getting people through our conversion funnels, or what pages are causing people to leave our site.”

Meanwhile, desktop users are familiar with (and frequently irritated by) long forms and multi-page forms. Lengthy forms can be real deal-breakers for users trying to negotiate them on mobile devices. The author presents some ways to shorten long forms and break them “into several pages using jQuery Mobile.” And he emphasizes the importance of using the jQuery Validate plug-in to add validation to any page that has a form, so the user can see quickly and clearly that an entry has a problem.

The focus in Chapter 4, “QR Codes, Geolocation, Google Maps API, and HTML5 Video,” is on handling concepts that can be “applied to any business that has multiple physical locations.” Gliser uses a local movie theater chain as his development example. A site is created that makes use of QR codes, geolocation, Google Maps, and linking to YouTube movie previews. Then, he shows how to use embedded video to keep users on the movie chain’s site rather than sending them off to YouTube.

In Chapter 5, the goal is “to create an aggregating news site based off social media.” So the emphasis shifts to “Client-side Templating, JSON APIs, and HTML5 Web Storage.” Notes Gliser: “Honestly, from a purely pragmatic perspective, I believe that the template is the perfect place for code. The more flexible, the better. JSON holds the data and the templates are used to transform it. To draw a parallel, XML is the data format and XSL templates are used to transform. Nobody whines about logic in XSL; so I don’t see why it should be a problem in JS templates.”

Next, he shows how to patch into Twitter’s JSON API to get “the very latest set of trending topics” and “whittle down the response to only the part we want…and pass that array into JsRender for…well…rendering” in a manner that will be “a lot cleaner to read and maintain” than looping through JSON and using string concatenation to make the output.

Other topics in Chapter 5 include programmatically changing pages in jQuery Mobile, understanding how jQuery Mobile handles generated pages and Document Object Model (DOM) weight management, and working with RSS feeds. Gliser points out that there is still “a lot more information out there being fed by RSS feeds than by JSON feeds.” The chapter concludes with looks at how to use HTML5 web storage (it’s simple, yet it can get “especially tricky on mobile browsers”), and how to leverage the Google Feed API. Says Gliser: “The Google Feeds [sic] API can be fed several options, but at its core, it’s a way to specify an RSS or ATOM feed and get back a JSON representation.”

Chapter 6 jumps into “the music scene. We’re going to take the jQuery Mobile interface and turn it into a media player, artist showcase, and information hub that can be saved to people’s home screens,” Gliser writes. He proceeds to show how “ridiculously simple it can be to bring audio into your jQuery Mobile pages.” And he explains how to use HTML5 manifest “and a few other meta tags” to save an app to the home screen. Furthermore, he discusses how to test mobile sites using “Google Chrome (since its WebKit) or IE9 (for the Windows Phone)” as browsers that are shrunken down to mobile size. “Naturally, this does not substitute for real testing,” he cautions. “Always check your creations on real devices. That being said, the shrunken browser approach will usually get you 97.5 percent of the way there. Well…HTML5 Audio throws that operating model right out the window.”

Since “mobile phones are quickly becoming our photo albums,” Gliser’s Chapter 7, “Fully Responsive Photography,” shows first how to create a basic gallery using Photoswipe. Then, in a section focused on “supporting the full range of device sizes,” he explains how to start using responsive web design (RWD), “the concept of making a single page work for every device size.” The issues, of course, range from image sizes and resolutions to text sizes and character counts per line, on screens as small as smart phones and tablets, or larger.

In Chapter 8, “Integrating jQuery Mobile into Existing Sites,” three topics are key: (1) “Detecting mobile – server-side, client-side, and the combination of the two”; (2) “Mobilizing full site pages – the hard way”; and (3) Mobilizing full site pages – the easy way.” Gliser avoids some potential “geek war” controversies over “browser sniffing versus feature detection” when detecting mobile devices. He zeroes in first on detection using WURFL for “server-side database-driven browser sniffing.” He also shows how to do JavaScript-based browser sniffing, which he concedes may be “the worst possible way to detect mobile but it does have its virtues,” especially if your budget is small and you want to exclude older devices that can’t handle some new JavaScript templating. He also describes JavaScript-based feature detection using Modernizer and some other feature-detection methods.

As for mobilizing full-site pages “the hard way,” he states that there is really “only one good reason: to keep the content on the same page so that the user doesn’t have one page for mobile and one page for desktop. When emails and tweets and such are flying around, the user generally doesn’t care if  they’re sending out the mobile view or the desktop view and they shouldn’t.” He focuses on how “it’s pretty easy to tell what parts of a site would translate to mobile” and how to add data attributes to existing tags “to mobilize them. When jQuery’s libraries are not present on the page, these attributes will simply sit there and cause no harm. Then you can use one of our many detection techniques to decide when to throw the jQM libraries in.”

Mobilizing full-size pages “the easy way” involves, in his view, “nothing easier and cleaner than just creating a standalone jQuery Mobile page…and simply import the page we want with AJAX. We can then pull out the parts we want and leave the rest.” His code samples show how to do this.

Chapter 9, “Content Management Systems and jQM” looks at the pros and cons of using three different content management systems (CMS) with jQuery Mobile: WordPress, Drupal, and Adobe Experience Manager. “The key to get up and running quickly with any CMS is, realizing which plugins and themes to use,” Gliser writes.  He also explains how to use mobile theme switchers.

Drupal offers some standard plugins that provide contact forms, CAPTCHA, and custom database tables and forms, and enable you to “create full blown web apps, not just brochureware sites,” he notes. But: “The biggest downside to Drupal is that it has a bit of a learning curve if you want to tap its true power, Also, without some tuning, it can be a little slow and can really bloat your page’s code.” .

As for Adobe Experience Manager (AEM), Gliser merely introduces it as a “premier corporate CMS” and a “major CMS player that comes with complete jQuery Mobile examples.” He doesn’t show “how to install, configure, or code for AEM. That’s a subject for several training manuals the size of this book.”

Chapter 10, the final chapter, is titled “Putting It All Together — Flood.FM.” Using what you’ve learned in the book (including prototyping the interfaces on paper first), you create “a website where listeners will be greeted with music from local, independent bands across several genres and geographic regions.” Along the way, Gliser introduces Balsamiq, “a very popular UX tool for rapid prototyping.” He discusses using Model-View-Controller (MVC), Model-View-ViewModel (MVVM), and Model-View-Whatever (MV*) development structures with jQuery Mobile. He shows how to work with the Web Audio API , and he illustrates how to prompt users to download the Flood.FM app to their home screens. He finishes up with brief discussions of accelerometers, cameras, “APIs on the horizon,” plus “To app or not to app, that is the question” and whether you should compile an app or not. Finally, he shows PhoneGap Build, the “cloud-based build service for PhoneGap.”

Bottom line: Shane Gliser’s book covers a lot of  useful ground for those who are ready to learn jQuery Mobile.

Si Dunn

iOS SDK Development – A totally new and improved 2nd edition – #programming #bookreview

iOS SDK Development
Chris Adamson and Bill Dudney
(Pragmatic Bookshelf, paperback)

The previous, 2009 edition of this popular how-to book was titled iPhone SDK Development.  But this  new and re-titled second edition is much more than a copy-and-paste, just-make-some-tweaks update.

“[W]e have copied absolutely nothing from the old book,” the authors say. “As we looked at all the changes to the platform—between Xcode 4, iOS 6, and the iPad—we decided that so much had changed that we would be better off starting fresh.”

While they tried to cover virtually everything in their previous book, their new, 274-page edition is much more focused and, yes, it’s more pragmatic.

“This book,” they state, “is about setting you off on the right foot: understanding the fundamentals, getting comfortable with the tools and the concepts, and developing good habits. We’ve put a particular emphasis on the last of these, looking for the kinds of things that aren’t just handy classes or compiler tricks but instead are the values and routines that will help produce better apps. We’re also adopting modern iOS development practices, such as using Objective-C properties exclusively instead of using traditional instance variables and getting private methods out of public header files.”

Two other goals: They want iOS SDK Development “to serve as a prerequisite” for Pragmatic Bookshelf’s other iOS titles; and they hope you will “come away from this book with a firm grasp of the most essential iOS APIs—the UIKit GUI framework and the essential utilities of the Foundation framework—and enough of a sense of where things are and how things work to be able to grab the documentation for interesting looking features and be able to figure it out.”

The book has 10 chapters, with illustrations and short code examples. The chapters are:

  1. Tweetings and Welcome to iOS 6 – Shows how to download and install the SDK and begin working on a first app.
  2. Programming for iOS –Introduces Objective-C and “the two frameworks we use most often in iOS apps: Foundation and UIKit.”
  3. Asynchronicity and Concurrency – Shows “how many of the iOS APIs use asynchronous callbacks and [employ] the Grand Central Dispatch system to handle concurrent execution….”
  4. View Controllers – “…looks at how iOS apps are built on a strong Model-View-Controller (MVC) foundation.”
  5. Table Views – Deals with “the flexible and widely used table view, the linchpin of most iPhone apps that need to present lists of data.
  6. Storyboards and Container Controllers – Covers “how to build a visual road map of the many screens of an app and how to build much of the logic of that navigation and presentation automatically.”
  7. Documents and iCloud – Shows the tools needed “to save our user’s work to the filesystem as well as to Apple’s new iCloud service.”
  8. Drawing and Animating – Explains how to use the Core Graphics framework and Core Animation.
  9. Testing and Fixing Apps – Looks at what can go wrong and how to use the SDK’s tools to fix things.
  10. The App Store and Beyond – Focuses on moving from learning to doing, by maintaining code, running it on devices, submitting it on the App Store, and “managing it after it’s in users’ hands.”

Whether you want to learn how to develop iPhone, iPad, and iPod Touch apps, or improve and update your knowledge of the necessary processes, you should read the new, improved iOS SDK Development and keep it within easy reach.

Si Dunn

HTML5 and JavaScript Web Apps – With emphasis on the Mobile Web – #programming #bookreview

HTML5 and JavaScript Web Apps
Wesley Hales
(O’Reilly,
paperbackKindle)

Increasingly, the world of Web development is taking on a “mobile first” attitude. And for good reason. Sales of desktop and laptop computers are shrinking, while sales of mobile devices seem to be swelling into a flood.

“Consumers are on track to buy one billion HTML5-capable mobile devices in 2013,” Wesley Hales writes in his new book. “Today, half of US adults own smartphones. This comprises 150 million people, and 28% of those consider mobile their primary way of accessing the Web. The ground swell of support for HTML5 applications over native ones is here, and today’s developers are flipping their priorities to put mobile development first.”

Hales’ HTML5 and JavaScript Web Apps focuses on using HTML5, JavaScript, and the latest W3C specifications to create mobile and desktop web apps that can work on a wide range of browsers and devices.

Indeed, deciding what to support is a key point in this useful, well-focused how-to guide. Hales notes: “Unfortunately the Mobile Web isn’t write-once-run-anywhere yet. As specifications become final and features are implemented, interoperability will be achieved. In today’s world of mobile browsers, however, we don’t have a largely consistent implementation across all browsers. Even though new tablets and phones are constantly being released to achieve a consistent level of HTML5 implementation, we all know that we’re [also] stuck with supporting the older, fragmented devices for a set amount of time.”

The 156-page book straddles “the gap between the Web and the Mobile Web” but puts a lot of emphasis on developing mobile applications. Here are its nine chapters:

  1. Client-Side Architecture
  2. The Mobile Web
  3. Building for the Mobile Web
  4. The Desktop Web
  5. WebSockets
  6. Optimizing with Web Storage
  7. Geolocation
  8. Device Orientation API
  9. Web Workers

This is not a book for JavaScript, HTML, or CSS beginners. But if you have at least some basic experience with Web application development, Hales can help you get on track toward becoming a Mobile Web guru. Meanwhile, if you are already well-versed in the ways of the Web app world, you may still learn some new and useful things from HTML5 and JavaScript Web Apps.

Si Dunn

Mobile JavaScript Application Development – Bringing the Web to Mobile Devices – #programming #bookreview

Mobile JavaScript Application Development
Adrian Kosmaczewski
(O’Reilly,
paperback, list price $24.99; Kindle edition, list price $19.99)

In the author’s view, “the most important moment in recent technological history was the introduction of the iPhone in January 2007. The impressive growths of iOS, Android, and other platforms [have] completely transformed the landscape of software engineering, while at the same time opening new possibilities for companies.”

Indeed, Adrian Kosmaczewski notes: “It is estimated that, in 2015, more than 50% of all web requests will come from mobile devices!”

So, if you are, or are planning to be,  a JavaScript programmer, you better know how to develop and support apps for mobile devices. And you’d better stay aware of “platform fragmentation” – the various platforms that you may encounter as old and new ones battle for survival and market dominance.

Kosmaczewski’s new, 145-page book is aimed at web developers who have some familiarity with HTML5, CSS, and JavaScript.

“It does not matter if you have mobile software engineering experience,” he assures potential readers. But: “Mobile applications are a world of their own, and they present challenges that common applications don’t deal with.…” These include:

  • Small screen sizes
  • Reduced Battery Life
  • Little Memory and disk specifications
  • Rapidly changing network conditions

His book is divided into seven well-written chapters. And six of them offer numerous screenshots and short code examples. The chapters are:

  1. HTML5 for Mobile Applications
  2. JavaScript Productivity Tips
  3. jQuery Mobile
  4. Sencha Touch
  5. Phone Gap
  6. Debugging and Testing
  7. Conclusion

Mobile JavaScript Application Development takes this straightforward approach: (1) “leave the theory to others” and (2) focus on “understand by doing.” And, mercifully, the author does not try to tackle too many technologies at once. Instead, he concentrates – in “an opinionated, hands-on” way on three technologies that he says “are currently the most promising and…show the most interesting roadmap.”

These are, as previously mentioned in the chapter list, jQuery Mobile, Sencha Touch, and PhoneGap. His goal is to help you determine which one is best for your project. (If you don’t agree with his choices, he provides helpful links to several others but does not discuss them.)

To work with the book’s code samples, certain items are needed and not easily summed up here in a few words, because of platform fragmentation and other factors. But the requirements can be viewed easily, using Amazon’s “Click to Look Inside!” feature for both the paperback and Kindle editions.

If your job or ambitions include developing apps for smartphones, you should check out this book.

Si Dunn