Archive for December, 2012
An Easy Choice? WordPress and ExpressionEngine Compared
30 Elaborate Tutorials To Teach You PSD to HTML Conversion
The New Mobile Book Is Finally Here!
Yes, our brand new Smashing Mobile Book has finally arrived, and it has almost reached your doorstep! If you’ve already pre-ordered the book weeks ago, then it’s really only a matter of days! Until then, the complimentary digital version is waiting for you in your Smashing Shop dashboard. And if you haven’t ordered just yet, make sure to get the book now!
At this very moment, all pre-orders are being shipped from Berlin, Germany, by airmail. Due to an unexpected huge amount of pre-orders in the past days, delivery of the new book orders will take a bit longer since we only have a limited amount of printed books in pre-sale stock.
Of course, we are printing extra copies in this very moment as you read this post. But unfortunately, the shipping of the new printed copies can only start in early January 2013. Still, you get the eBook automatically once you’ve ordered the printed book, so you can start reading right away!
eBook Is Now Available
The eBook of the Mobile Book is available for download immediately: PDF, ePUB and Kindle formats for your convenience. If you have pre-ordered the book, your eBook is waiting for you in your Download Area. Also, keep in mind that the eBook is included in the Smashing eBook Library—our annual subscription with 70% discount on all Smashing eBooks.
And if you still haven’t ordered yet, you can get the Mobile book right now, and start reading within a couple of minutes! You won’t be disappointed. Why? Let’s see why.
About the Book
Our brand new printed Mobile Book features the most important things that you need to know as a designer, developer or mobile strategist to make your websites optimized for mobile. You’ll dive deep into the peculiarities of the mobile industry, explore responsive design strategy, design patterns and optimization techniques, learn about wireframing and prototyping for mobile as well as the guidelines for designing with gestures and touch. If you are looking for a good book on mobile, this is the one.
Table of Contents
When setting up the concept of the book, we worked hard to ensure a delicate balance between advanced knowledge and the current state of the art:
AUTHOR | CHAPTER | DETAILS |
Jeremy Keith | Foreword | |
Jeremy Keith has been around on the Web for a while and saw the emerging mobile medium from its earliest days. With his preface for the Mobile Book, Jeremy introduces us to this new facet of the Web and the new possibilities and challenges that the Mobile industry produces as a relatively young medium. | ||
Peter-Paul Koch | What’s Going on in Mobile? | |
This chapter provides a general overview of what’s going in the mobile industry today, who are its main players and how they influence each other. From a technical perspective, the chapter reviews the peculiarities of mobile networks and platforms, existing mobile browsers and guidelines for testing websites on mobile. You’ll understand the mobile market, how it works, what it involves and how it affects our daily work.
Chapter keywords: mobile value chain, operators, device vendors, fragmentation, Android, iPhone, Windows Phone, OS vendors, proxy browsers, open device lab, mobile network. |
||
Stephanie Rieger | The Future of Mobile | |
This chapter provides a glimpse of where the future of mobile might lead, and what technologies will lead us there. These include new low-power computer chips, new display technologies, new APIs and the growing penetration of near field communication (NFC). But more important than the technologies themselves is how they will need to work together, enabling new and exciting ways to do business, to connect with friends and family and to interact with the world around us.
Chapter keywords: connected devices, TVs, consumer customization, display technologies, RFID, NFC, Device APIs. |
||
Trent Walton | Responsive Design Strategies | |
The main components of Responsive Web Design(RWD) — flexible grids, flexible images, and media queries — are just the tip of the iceberg. And with the ever-increasing number of devices flooding the market, RWD is the most effective way to address them all at once. This chapter by Trent Walton features strategies, techniques and design workflow tips on building effective and bulletproof responsive designs.
Chapter keywords: image aspect ratios, resolution independence, breakpoints organization, vertical and em-based media queries, content choreography, image hierarchy, fluid type. |
||
Brad Frost | Responsive Design Patterns | |
As Responsive Design continues to evolve, we’re confronted with difficult problems about how to create adaptive interfaces that look and function beautifully across many screen sizes and environments. E.g. how do we handle navigation that’s four levels deep? This chapter features emerging responsive design patterns and explains how to use them meaningfully in your projects. Brad Frost provides useful tips and expert advice on various design elements covering everything from complex navigation to advanced data tables.
Chapter keywords: style guides, layout, navigation, conditional loading, progressive disclosure, background images, icons, maps, type, carousels, accordions, forms, tables. |
||
Dave Olsen | Optimization For Mobile | |
Although Responsive design per se has provided a great fundamental concept for designing mobile-optimized websites, the core ideas that make up these concepts pre-date the mobile revolution. In this chapter, Dave Olsen reviews what it takes to optimize mobile experiences in terms of performance. How do we keep responsive websites lightweight? What do we need to know about caching, lazy loading, latency? How can we start using RESS? Device detection or feature detection? Also, how do we develop and test our websites for performance? This chapter answers all these questions and more.
Chapter keywords: mobile performance, latency, localStorage, lazy loading, Data URI scheme, JS frameworks, RESS, browser detection, feature detection. |
||
Dennis Kardys | Hands On Design for Mobile (UX Perspective) | |
Mobile requires us to rethink the way we create, develop and build experiences for our users. In this chapter, you’ll look at some of the more glaring pitfalls to conventional processes, specifically as they pertain to how we design—and how we communicate design—for an increasingly mobile-accessed Web. You’ll learn about implementing and selling processes that support a realistic understanding of what it means to design with mobile in mind.
Chapter keywords: psychology, contextual interviews, collaborative design workshops, design studio methods, sketching, wireframing, convergent prototyping. |
||
Josh Clark | Designing With Gestures and Touch | |
Among the many new opportunities of the mobile medium are the capabilities of mobile devices. One of the major interaction changes, however, involves gestures and touch. In this chapter, Josh Clark explains how we can use them to improve the mobile user experience and provides concrete examples of implementations in real-life applications. |
To ensure the quality of the book’s content, the chapters have been reviewed by a number of active members of the mobile design community such as Scott Jenson, Bruce Lawson, Lyza Danger Gardner and Bryan Rieger—just to name a few. It wasn’t easy to bring together such a stellar line-up of experts, but a compromise wasn’t an option.
Sample and Technical Details
- Download the free sample (PDF, 8.0 Mb)
The full chapter “Responsive Design Strategy” by Trent Walton. - 336 pages, 16.5 × 24.0 cm (6.5 × 9.5 inches).
Real quality hard cover, with stitched binding and a ribbon page marker. - Delivery only via airmail from Berlin, Germany.
$5 worldwide shipping (check worldwide delivery times). - Get your Mobile Book now!
Also available as an eBook (PDF, EPUB, Kindle).
The Mobile Book. Large preview
Extra eBook: Addendum
Initially, we wanted to cover all popular mobile topics within the printed book, but because some chapters took more time to write and review than planned, we decided to release them in an addendum to the printed book. All buyers of the Mobile Book will get the Addendum for free in January 2013. The eBook will provide insights into design and development for iOS, Android, Windows Phone, as well as introduce developing and debugging techniques for advanced HTML5 Web applications and explore UX patterns on these platforms.
Our new Mobile Book is available as a printed book, single eBook or as a part of the Smashing eBook Library.
What Reviewers Say About The Mobile Book
A few reviewers have had the chance to read the book a few days before its release, and share their views in a non-committal way. The result is very clear: the book is worthwhile. Should you get it? Yes! Let’s see why:
“I got my hands on an early copy of The Mobile Book, by Smashing Magazine. I’ll cut to the chase and just say this: It’s fantastic. You should own it. Really.”
“The standard, the reference book for Mobile. I worked for a mobile web publishing company for 18 months and the depth of knowledge provided by the experts in this book is extraordinary. It blew me away. This book provides a diplomatic, comprehensive guide to understanding “Mobileâ€�, delivered by people who have a real passion for the Mobile endeavours in our community.”
“I’ll cut to the chase for those deliberating a purchase: it’s well worth the cover price. The eBook edition is a steal! This book establishes a mindset of understanding and exploring the medium. It embraces the breadth of its domain and will set you on an exciting path.”
“As somebody who spends a lot of time tinkering and tweaking websites to make them work better, I thought this book was bloody brilliant. There is so much depth and information packed into its 336 pages that I think it will become the book for the mobile Web.”
“Every chapter is full of golden nuggets of information and the standard of writing is, as you would expect from a Smashing Magazine book, impeccable.”
“It’s essential reading for those involved with the design and development of web/app based output. The essays within will encourage you to consider how people interact with mobile technology and help you to produce mobile friendly solutions to your projects.”
“This book has something for all levels of expertise. [..] It doesn’t patronise, it doesn’t talk over your head either, it teaches. It is an important book of its time, don’t hesitate in picking it up.”
“Earlier I mentioned that you should add this book to your shelf, in reality, you’ll probably want to keep it on your desk.”
“In general I think this book is a great addition for a company or agency library. As a specialist, it can leave you with a few chapters that are very much beyond your reach and can leave you with dangerous “knowledgeâ€� but a team reading the applicable chapters and then pooling their knowledge and learnings can use this book to go into the mobile future kicking and screaming. And kicking arse.”
“The Mobile Book provides a detailed and well curated overview and reference for designers getting to grips designing for, and working with, the ever changing world of devices and responsive design.”
Frequently Asked Questions (FAQ)
We want to make it as easy as possible for everyone to buy the new Smashing book. We welcome all suggestions and advice that could improve Smashing Magazine’s user-friendliness. Here are answers to some frequently asked questions about the brand new Smashing Mobile Book:
What are the costs for shipping to my country? | |
The shipping cost for one book or a bundle is $5 — wherever you are in the world. We ship everywhere worldwide. We are paying a share of the shipping costs ourselves to make it possible for anyone to purchase the book. Our prices are transparent: we don’t have any hidden costs, and we won’t confuse you with tricky calculations. What you see is what you pay! | |
What about delivery times? | |
All books will be shipped via air mail to keep delivery times as short as possible. You can find the anticipated delivery time for your country in the delivery times overview. Please note that we will start to ship the books early-mid December 2012. | |
Will the book be available in other languages? | |
Maybe in future, but we have not made arrangements for that yet, so don’t hold your breath. | |
Is the Mobile Book available as an eBook? | |
Yes, the book will be available in PDF, EPUB and Kindle (Mobipocket) formats, and you can pre-order the eBook bundle now. | |
Is “Mobile Book” the “Smashing Book #4″? | |
No, “The Mobile Book” is a new series that we are starting here at Smashing Magazine. It is not Smashing Book #4 — it has a different design, layout and concept than other Smashing books. However, the Smashing Book #4 will be published in May 2013 — please stay tuned! | |
What payment methods are accepted? | |
We accept PayPal, VISA, MasterCard and American Express. We use a secure connection, with 256-bit AES encryption and a green GeoTrust Extended Validation SSL CA certificate. | |
Is there a money-back guarantee? | |
Yes, absolutely! No risk is involved. Our 100-day full money-back guarantee keeps you safe. Don’t hesitate to return your purchase. You’ll get your money back—no ifs, ands or buts about it. | |
I have a question that is not covered here. | |
Please leave a comment below, or get in touch with us via the contact form or via @SmashingSupport on Twitter. We would love to help you in any way we can! |
We would appreciate it if you could inform your friends, colleagues and followers about the book. Feel free to link to www.the-mobile-book.com, this post and use the hashtag #mobilebook
on Twitter. If you choose to blog about the book, please feel free to use the images and information from our Mobile Book media kit (.ZIP, 6.6 Mb) which includes screenshots, photos and general information about the book.
Thank you for your support, everybody—we truly appreciate it. And we hope that you’ll love the Mobile Book just as much as we do!
Our new Mobile Book is available as a printed book, single eBook or as a part of the Smashing eBook Library.
(vf) (il)
© Smashing Editorial for Smashing Magazine, 2012.
WordPress 3.5 First Look: Yay or Nay?
WordPress Tutorial: Inserting Widgets With Shortcodes
The shortcode ability of WordPress is extremely underrated. It enables the end user to create intricate elements with a few keystrokes while also modularizing editing tasks. In a new theme we’re developing, I decided to look into adding widgets anywhere with shortcodes, and it turns out that it isn’t that difficult.
Some of the widgets that can be added with shortcodes.
This tutorial is for experienced WordPress users; we will be looking at the widgets object and shortcodes without delving into too much detail about how and why they work. If you are looking for more information, I suggest reading Mastering WordPress Shortcodes and the Widgets API article in the Codex.
Grabbing A Random Widget
The first thing I looked into was how to output any widget without shortcodes. Once done, implementing a shortcode is a relatively trivial matter. Digging around in the Codex, I found the the_widget()
function, which does just what I want.
It takes three parameters:
- The widget’s class name,
- The widget’s instance settings,
- The widget’s sidebar arguments.
Once I saw this, my face lit up. Not only can I output a widget anywhere, but I can pass different sidebar arguments to any widget. This is great because I can specify parameters such as before_widget
and after_widget
.
This also opens up the possibility of easily changing the style of the widget from within the shortcode, but more on that later.
After applying some CSS, the calendar widget can be added anywhere.
Output Buffering
When adding a shortcode, you scan the text for a particular string, do something with it and return the result you want to see. It’s obvious that we will be using the_widget()
, but that function only echoes content. To get around this problem we’ll be using output buffering.
Take a look at the following two examples; the result is exactly the same.
the_widget( 'WP_Widget_Archives' );
ob_start(); the_widget( 'WP_Widget_Archives' ); $contents = ob_get_clean(); echo $contents;
First we start our buffer. From this point on, anything that is echoed goes into our buffer instead of actually being echoed. By using ob_get_clean()
, we can pull the contents of the buffer into a variable (and also clear the buffer). Once this is done we can echo that variable, or pass it on by returning it if we’re in a function.
Creating The Shortcode
Now we know everything we need, so let’s create the skeleton of our shortcode. First we need to figure out what arguments we need to pass, and what arguments we want to allow the user to pass via the shortcode tag.
- Widget type – Which widget do we want to show;
- Title – The title of the widget (used in the instance parameter);
- Other instance parameters;
- Other sidebar arguments.
I’ll admit that this is a bit vague. The reason is that each widget will need a separate set of possible arguments due to the varied functionality they have. For an archive widget, we can specify whether or not we want the post count. For a category widget, we could also specify the hierarchical attribute.
Solving this problem requires a flexible shortcode, and good end-user documentation.
The best way to make sure the shortcode is used properly is to provide good documentation.
The Shortcode Skeleton
add_shortcode( 'widget', 'my_widget_shortcode' ); function my_widget_shortcode( $atts ) { // Configure defaults and extract the attributes into variables extract( shortcode_atts( array( 'type' => '', 'title' => '', ), $atts )); $args = array( 'before_widget' => '<div class="box widget">', 'after_widget' => '</div>', 'before_title' => '<div class="widget-title">', 'after_title' => '</div>', ); ob_start(); the_widget( $type, $atts, $args ); $output = ob_get_clean(); return $output;
There are two common attributes all shortcodes will have. The type is where the user will specify the widget type, and the title is where the user specifies the title (no surprises there).
Once we have our $atts
, we figure out the $args
— the widget’s sidebar parameters. Since this is a commercial theme, we don’t need to give the user control over these arguments, so they are just hard coded for now.
In the final section we’ll put it all together to create the final widget.
Extending the Shortcode
Once this is done we can get crazy with our shortcode parameters. One example is allowing the user to pick a scheme. For our example, this is dark or light, but you could easily specify an exact color.
All we need to do is add an argument to the shortcode, add a CSS class to our widget based on this argument and let our style sheet do the rest.
add_shortcode( 'widget', 'my_widget_shortcode' ); function my_widget_shortcode( $atts ) { // Configure defaults and extract the attributes into variables extract( shortcode_atts( array( 'type' => '', 'title' => '', 'scheme' => 'light' ), $atts )); $args = array( 'before_widget' => '<div class="box widget scheme-' . $scheme . ' ">', 'after_widget' => '</div>', 'before_title' => '<div class="widget-title">', 'after_title' => '</div>', ); ob_start(); the_widget( $type, $atts, $args ); $output = ob_get_clean(); return $output;
If you need to make this even more flexible, you can allow a background color to be specified, you can add the $args
using parameters from the shortcode, and much more.
This solution works perfectly with custom widgets as well. All you need to do is add the class name as the type and accommodate for its specific instance settings
Conclusion
By now you should be on your way to creating wonderful things with this shortcode. It is great for end users and also a very useful tool to test widgets before releasing a theme.
We use this in our themes to make them even more flexible for our users. The ability to put anything anywhere, easily, is one that all themes should have!
(cp)
© Daniel Pataki for Smashing Magazine, 2012.