Posts Tagged ‘Mobile’

Creative Uses for QR Codes


Nowadays we look around and all over the places see QR codes embedded into the ads, buildings, billboards, newspapers, cups, clothes and even into the roads.

The usage of QR (Quick Response) codes in promotional marketing is a great idea and just one more awesome way to engage people to your brand and company.

Commercial texts, free coupons, URLs and other data can be artfully hidden behind the black modules arranged on a white background. Their simple, but outstanding and unusual design makes them easy to notice and utilize. Moreover, barcodes are really cheap and budget method of advertising, you can simply put the code on any printed material and track a response rate through Google Analytics. But the gold of QR codes is that they enable to convert the advertisement from a passive experience to an active income and entertaining interactive game!

Using creative and remarkable QR codes you can grow your sales and attract more fans. Just put yourselves in shoes of your target audience and you’ll by far understand what you want to get. Before showing your QR masterpiece to the World check out it carefully. You should remember that the more shorter your URL encoded to a QR is, the better it will be scanned by smartphones. Use a URL shortening service to shorten the link. For a good conversion, the barcode has to implement only one action: shows the website, gives you a discount, some secret data or displays the image.

Almost all QR codes, to be more exactly about 99.9%, are scanned by smartphones, so think over the mobile version of your website. One more important trick is to place your code where the potential customers have a free access to the Internet. So, spend a little bit time, to create your own QR code and keep your brand on the cutting edge of marketing.

Below we’ve showcased some crazy ideas how your QR code could look like and where you could use it. Hope you’ll get a great doze of inspiration and stunning ideas. Enjoy!

QR Code Business Card

QR code business card

Both useful and stylish solution for businessmen. This business card not only shows the important data and contact info of the owner, it immediately connects you with their website.

QR code London billboard

QR billboard

You can’t go by a huge barcode and don’t notice it, if you have a smartphone in your pocket just scan it and receive the important message.

QR Code Ring

QR code ring

Unique and remarkable QR code ring helps to deliver the message in an unusual and memorable way.

QR Code Flyer

QR code flyer

What can be more easier than to interact with the visitors of your cafe in a such amusing way? Try and you’ll always know what your clients think about your services.

QR Window Code

QR code window

You can sell and rent apartments just by encoding a website URL, email address or a cell phone to the barcode on a window and stay connected with all your client 24/7.

QR Code on the Street

QR code on the street

A creative agency invented one more way to help homeless people and raise funds for those who spend their nights on the streets.

Calvin Klein QR Code

QR Calvin Klein code

As once Calvin Klein campaign was banned because of inappropriate images, it releases “Get it uncensored” drive with the code which links to the new line of jeans.

Stainless Steel QR Code

QR code stainless

It’s really very handy when the keychain contains the information which can be decoded by the smartphone app.

Personalized QR Code Pillow

QR code pillow

Print your personal QR Code on a pillow and all your quests will surely appreciate your unique home accessory.

QR Code Necklace

QR code necklace

QR code is a popular trend and cool thing to stand out, but if you keep your identifying info in it, it can be also helpful in a case of emergency.

QR Code in Amsterdam

QR code in Amsterdam

Do you want to have fun? Scan the barcode and get to know what is hidden behind it.

QR Code Cupcake

QR code cupcake

Delicious cupcake is decorated with editable image of QR code which leads to the Clever cupcakes website.

QR Code Mug

QR code mug

Raise your mood with a cup of tasty coffee and wise or humorous quotation which will appear on your smartphone screen after scanning the code on the mug.

QR Code Dice

QR code dice

It’s a real pleasure to play with this monochromatic QR dice, especially if you like the versatility of QR code appearance.

QR Code Lamp

QR code lamp

This stunning lamp will be a good design solution for QR code design lovers.

QR Code by Space Invader

QR code Space Invader

One more decoration in the QR code style, it won’t lead you to any website, but it will surely make you smile.

QR Code T-Shirt

QR code T-shirt

An amazing idea to put a barcode on your T-shirt, so everyone has an opportunity to scan it with their smartfone or simply enjoy your style.

QR Code for a Good Time

QR code for a good time

Are you looking for a company of interesting fellows? Don’t pass this poster, maybe it includes the invitation to the cool party, scan it and have fun!

QR Code Holiday Card

QR holiday card

Very original and creative way to congratulate your beloved or friend with some special event.

QR Coding

QR coding

Attach the QR code to you key chain and help your Facebook followers like your Fan page and become your fans :)

QR Code Belt

QR code belt

Do you want to stand out against the crowd? Wear QR code belt and impress your friends with this outstanding accessory.

QR Code Gloves

QR code gloves

Eye-catching knitted gloves with black and white QR code on the backside make your day bright and memorable. They can be also a good present for your friend.

QR Code Plate

QR code plate

QR code plate decoration attracts clients’ views and make them curious to know what they can see after scanning. Maybe, the cafe offers one more free cake for the most curious persons?

You may also like…

50 Vintage SNES Official Game Artwork →
The Beauty of Minimalist Music Posters →
Around the World with 35 Famous Lego Monuments and Buildings →
30 Classic Music Albums Recreated With Lego →
21 Amazing Movie Posters Recreated with Lego →
39 Creative and Sometimes Controversial Examples of Playstation Advertising →
20 Vintage Computer Adverts (Apple, IBM, Microsoft, Commodore…) →



Freebie: Colorful 3D UI Kit


We have a fantastic freebie for all of you web designers out there, you’ll love this:)
Designed by Land-of-Web, the Colorful 3D UI Kit comes in .psd format and is full of beautifully designed modern web elements covering almost all aspects of web design, including:

• Drop-Downs, Silders & Progress Bars
• Switches, Tabs, Icons, Tool-Tips and many useful Navigation Elements
• Search and Select Boxes
• Media Control Buttons and Mini Player

UI Kit Preview

Colorful 3D UI Kit

Download the UI Kit

Within the .zip file you will find all of the .psd elements from above.
Download: Colorful 3D UI Kit

Copyright

This Web UI set is free for personal and commercial use with attribution appreciated but not required. You MAY NOT re-upload or re-distribute this set on any other website, and please link directly to this page for all sharing.

Thanks

Big thank you to Nataly from Land-of-Web for designing and allowing us to release this fantastic freebie. You can also follow her on Twitter.

You might also like…

Fantastic Freebie: 3D Web UI Kit →
20 Free Web UI Element Kits and Stencils →
A Collection of Printable Web Browser Sketching and Wireframe Templates →
10 Completely Free Wireframe and Mockup Applications →
A Collection of Useful Web Design Wireframing Resources →
40 Detailed and High Quality Mobile Phone .psd Source Files →
40 Professional and Detailed Web Layout PSD Templates →
Android App Developers GUI Kits, Icons, Fonts and Tools →
iPhone and iPad Development GUI Kits, Stencils and Icons →
Illustrator Template Toolbox for Web, Mobile and App Developers →
40 High Quality CSS and XHTML Web Layout Templates →



Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

In our earlier jQuery Mobile tutorial I had introduced much of the underlying framework and how to go about setting up your first website. The JS library is both lightweight and easy to pickup in regards to learning difficulty. There is also generic a CSS stylesheet included with the files so you can further customize the elements in your layout.

jquery mobile custom themes Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

For this second segment I’d like to spend a bit of time delving deeper into this idea of jQuery Mobile themes. The entire design industry has been revolutionized by jQM and the process of constructing a mobile template from scratch has been significantly improved. jQuery Mobile isn’t just a scripting library, but an entire ground framework to build upon and produce efficient mobile templates.

Default Stylesheet Contents

I should begin by clarifying exactly what type of CSS code is included with the default files. The stylesheet from jQM 1.0 has been split into two main segments – structure and themes.

The structure code is the stuff you can mostly ignore. This is used to set margins, padding, height/width, font variants, along with many other browser defaults. The internal themes are then split up from A-E which each control different visual effects in your design. This can include background colors, gradients, drop shadows, etc.

Each of these inner theme elements can also be referred to as swatches. When you build a mobile template you’ll generally stick with a single theme. But in almost every scenario the design can be improved upon with differing color schemes. The default stylesheet only includes swatches A-E but you can build swatches F-Z to add another 21 alternatives into your theme library. Just to clarify these terms again a theme is considered 1 single CSS file which can include up to 26 different swatches labeled A-Z.

Switching Styles

If you don’t choose to specify any swatches then jQuery Mobile will stick to the swatch A by default. If you weren’t already aware the jQuery Mobile docs utilize HTML5 data attributes for many internal functions. One of these includes changing swatches via the data-theme attribute. Check out my code example below to see what I mean.

<div data-role="page" id="mypage" data-theme="b">
  <div data-role="header">
    <h1>Default jQM Page</h1>
  </div>
  <div data-role="content">
    <p>Here is some internal content.</p>
    </div>
</div>

Notice that I placed the data-theme attribute on the root page div. This means the new swatch color will effect everything inside which includes both the header and content areas. I could additionally include data-theme="c" into the header div to change only that content from the rest of my page.

Components of a Swatch

It should be fairly straightforward how to implement these different swatches within a single layout. So now let’s take a look at the jQM CSS code so we can break down individual components of a swatch. Check out the latest jQuery Mobile 1.0 CSS file hosted on their own CDN.

You should notice how each swatch is separated by a distinct comment and each of the internal classes ends with the appropriate lettering. For example .ui-bar-a and .ui-body-a are applied into the header/footer bars and content areas by default. Most properties are implementing a reset on font and link colors, background gradients, and other small details. I included simply the ui-bar-a codes to give you an idea of which elements we target.

/* A
---------------------------------------------------------------------------------------------*/
.ui-bar-a {
	border: 1px solid #2A2A2A;
	background: #111111;
	color: #ffffff;
	font-weight: bold;
	text-shadow: 0 /*{a-bar-shadow-x}*/ -1px /*{a-bar-shadow-y}*/ 1px #000000;
	background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#111)); /* Saf4+, Chrome */
	background-image: -webkit-linear-gradient(#3c3c3c, #111); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(#3c3c3c, #111); /* FF3.6 */
	background-image:     -ms-linear-gradient(#3c3c3c, #111); /* IE10 */
	background-image:      -o-linear-gradient(#3c3c3c, #111); /* Opera 11.10+ */
	background-image:         linear-gradient(#3c3c3c, #111);
}
.ui-bar-a,
.ui-bar-a input,
.ui-bar-a select,
.ui-bar-a textarea,
.ui-bar-a button {
	font-family: Helvetica, Arial, sans-serif;
}
.ui-bar-a .ui-link-inherit {
	color: #fff;
}

.ui-bar-a .ui-link {
	color: #7cc4e7 /*{a-bar-link-color}*/;
	font-weight: bold;
}

.ui-bar-a .ui-link:hover {
	color: #2489CE /*{a-bar-link-hover}*/;
}

.ui-bar-a .ui-link:active {
	color: #2489CE /*{a-bar-link-active}*/;
}

.ui-bar-a .ui-link:visited {
    color: #2489CE /*{a-bar-link-visited}*/;
}

If you’re just looking to create a custom swatch I recommend basing the template off one of the originals. The process will go a whole lot smoother if you start writing codes in a new CSS document. You won’t have the hassle of editing in the original file and you can start off working on a clean slate. But the key areas you want to focus on will include the following:

  • header and footer bars
  • body content & page text
  • list styles
  • button states default/hover/active
  • form input controls(extra)

Coding a New Bar Design

From the same CSS file we looked at earlier copy/paste all the swatch A code(lines 12-150) into a new file. We can use the swatch name G to implement these new styles. Now after copying the code you want to rename each class instance ending in -a to -g, as this is how jQuery Mobile will recognize which styles to use.

I’d like to start by redesigning the header bar bg to mimic a more familiar iOS gradient. This can be done solely within the .ui-bar-g selector. We want to edit the background and background-image properties to change up the gradient effects. Check out my code below and a demo screen of the new gradient.

.ui-bar-g {
	border: 1px solid #2d3033 /*{a-bar-border}*/;
	border-left: 0px;
	border-right: 0px;
	background: #6d83a1;
	color: #fff /*{a-bar-color}*/;
	font-weight: bold;
	text-shadow: 0 /*{a-bar-shadow-x}*/ -1px /*{a-bar-shadow-y}*/ 1px /*{a-bar-shadow-radius}*/ #3e4957;
	background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#b4bfce), color-stop(0.5, #899cb3), color-stop(0.505, #7e94b0), to(#6d83a1));
	background-image: -webkit-linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1); /* FF3.6 */
	background-image:     -ms-linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1); /* IE10 */
	background-image:      -o-linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1); /* Opera 11.10+ */
	background-image:         linear-gradient(top, #b4bfce, #899cb3 50%, #7e94b0 52%, #6d83a1);
}

blue ios jquery mobile gradient Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

I’m using the blue color scheme found in most default iOS applications. My background is initially set to a solid color for devices which can’t render CSS3 gradients. Then below I’m using color stops around the 50% marker to recreate the traditional Apple-style glossy shine effect. Also inside the same selector I’ve slightly modified the text shadow with a more subtle color and range.

Buttons and Text Effects

It’s important when coding swatches to consider specifically which areas of the interface need attention. The header bar looks great with this new background, but one last modification I’d like to make will match the button styles closer to that of iOS apps.

.ui-btn-up-g {
	border: 1px solid #375073;
	background: #4a6c9b;
	font-weight: bold;
	color: #fff;
	text-shadow: 0 /*{a-bup-shadow-x}*/ -1px /*{a-bup-shadow-y}*/ 1px /*{a-bup-shadow-radius}*/ #40536d;
	box-shadow: none;
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#89a0be), color-stop(0.5, #5877a2), color-stop(0.505, #476999), to(#4a6c9b));
	background-image: -webkit-linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b); /* FF3.6 */
	background-image:     -ms-linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b); /* IE10 */
	background-image:      -o-linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b); /* Opera 11.10+ */
	background-image:         linear-gradient(top, #89a0be, #5877a2 50%, #476999 52%, #4a6c9b);
	border-radius: 4px;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
}

.ui-btn-up-g .ui-btn-inner, .ui-btn-hover-g .ui-btn-inner, .ui-btn-down-g .ui-btn-inner { border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0; }
.ui-btn-hover-g {
	border: 1px solid #1b49a5;
	background: #2463de;
	font-weight: bold;
	color: #fff;
	text-shadow: 0 /*{a-bup-shadow-x}*/ -1px /*{a-bup-shadow-y}*/ 1px /*{a-bup-shadow-radius}*/ #40536d;
	box-shadow: none;
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#779be9), color-stop(0.5, #376fe0), color-stop(0.505, #2260dd), to(#2463de));
	background-image: -webkit-linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de); /* Chrome 10+, Saf5.1+ */
	background-image:    -moz-linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de); /* FF3.6 */
	background-image:     -ms-linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de); /* IE10 */
	background-image:      -o-linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de); /* Opera 11.10+ */
	background-image:         linear-gradient(top, #779be9, #376fe0 50%, #2260dd 52%, #2463de);
	border-radius: 4px;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
}

jqm topbar with buttons Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

The code area we’re editing now is within the UI button classes. There are 3 different modes to be concerned with: .ui-btn-up-g, .ui-btn-hover-g, and .ui-btn-down-g. I’m mostly focusing on the standard(btn-up) and hover(btn-hover) effects by editing the box shadow and linear gradients. Also I expanded the rounded corners effect so the buttons appear more rectangular.

Because of this I’ve needed to remove the inner border radius from a class titled .ui-btn-inner. This class gets attached onto a span element within each anchor link in your header bar. Without resetting the border radius properties you’ll notice small glitches in the design whenever you hover over a button. As you spend more time coding in jQuery Mobile themes you’ll memorize these little nuances for future projects.

Introduction to ThemeRoller

If you enjoy getting your hands dirty in code then I highly recommend sticking to custom edits. Not only do you have more control but it’s a lot easier to debug issues within the CSS if you made all the edits yourself. But for many designers this process is tiresome and will simply take longer than necessary. Luckily the jQuery Mobile team has released an online editor under the name ThemeRoller.

jquery themeroller Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

From this page you have access to edit the first 3 A-C swatches or even create one of your own. If you look in the left sidebar you can switch between these 3 settings or quickly make changes to the global theme options. These include CSS properties such as border radii, box shadows, or default page fonts. Notice as you select any of the preset swatches that we can edit only the same areas as before – top/bottom bars, body content, and the 3 button states.

adobe kuler Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

But my favorite feature has to be the direct access to Adobe Kuler swatches. You can actually create a few color schemes within your Kuler account and import them into ThemeRoller. The interface supports drag-and-drop functionality so it’s real simple to try out a few different ideas in a matter of minutes.

Ultimately there is no absolute method of properly building your jQM swatches. Some designers prefer to hard code CSS while others will love the intuitive ThemeRoller web app. As long as you’re following the class structure then you should get the same results either way. If you want to read up a bit on ThemeRoller check out this featured jQuery Mobile blog post regarding their newest web tool and its many features.

Helpful Resources

Mobile Design Showcase

What better way to wrap up our guide to jQuery Mobile themes than with a small inspiration showcase? Hundreds of web designers have submitted their themes into the jQM Gallery with some notable success. Check out these astounding mobile templates below which will hopefully stir up your own creative ambitions. And be sure to let us know your thoughts or questions in the post discussion area.

Thumbpark

01 thumbpark Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Elfster

02 elfster Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Let’s GO! Gorizia

03 lets go gorizia Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Woos.at

04 woost Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

iFilmtipset

05 ifilm tipset Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

BAMM.TV

06 bammtv Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Untappd

07 untappd Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

IOUMate

08 ioumate Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Disney Dream Portraits

09 disney dream portraits Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Cookpad

10 cookpad Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Dailymotion

11 dailymotion Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

American Century

12 american century Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Travel Wisconsin

13 travel wisconsin Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Tuscan Maremma

14 tuscan antico casale Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

My Shopping List

15 shopping list Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

twwit

16 twwit Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Take Me Fishing

17 take me fishing Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

Lawline Mobile

18 lawline Building Websites and Browser Apps with jQuery Mobile: Designing Custom Themes

What else does HTML5 need to defeat flash? (Part 2)

Advertise here with BSA


In part 1 of this article, we analyzed the technical problems facing HTML5. In part 2, we’re going to discuss the problems facing HTML5 commercially.

Unity:

Microsoft, Google and Apple are clearky the 3 giants of the industry at the moment, and it’s really hard to unify them under a single standard.

“Go, go, go! Fire in the hole!” As Apple declares war on Flash, Microsoft seems willing to watch the fire from the other side of the river. As for Google, it supports HTML5 on the one hand, while on the other it also adds support for Flash in Android. Adobe must find a way to take advantage of the conflict between the giants. The future of HTML5 is at stake.

Let’s suppose that even Adobe is not able to do that. The fighting between the 3 giants would probably ruin the future of HTML5. The famous case of OpenGL is the best example. The initial member of this standard was All-Star Games, but the development and spread was far less rapid than Direct3D due to the endless quarrels around profits. The market is almost entirely taken by opponents, and its application restricted in professional areas.

User acceptance:

No matter how attractive the market promotion is, user acceptance is the final exam standard. At present, HTML5 is not looking like it’s going to be able to bring fundamental change to the desktop in a short period of time, and so there’s a need for a a coexistent relationship with Flash.

The reason for this is that the user doesn’t care about the technology. What they care for is the effect. There is still a long way to go for HTML5 before it reaches the level of effects realized by Flash, and this restricts the willingness of small websites to use canvas. If canvas can’t be popularized then HTML5 is losing a major battle. If the coding problem of video tags can’t be solved, there simply won’t be any way to compete with Flash.

Prediction:

Google, Microsoft, Apple and Adobe are playing cards. Adobe is the banker, and has the best cards. On one hand, the other three want to pull him out of that position. On the other, they don’t want to cooperate with each other. So while establishing an ambiguous relationship with Adobe, Google also has its own plan.

In this game, Adobe dominates the current situation. It seems impossible for HTML5 to take Adobe’s place, because Flash has already taken the ruling position in the traditional desktop market. Even though Flash isn’t perfect, it’s not broken enough to need a replacement. The truth is that the traditional desktop is challenged by new power. There is to be a coexistent period of time between Flash and HTML5 during which the two compete. Adobe has the weapons of Photoshop, Dreamweaver and Fireworks. Webpages cannot be developed without Photoshop, even for the HTML5 webpage. Dreamweaver is the current No.1 choice and canvas applications can be developed usinf Flash CS5.

Flash Player cannot bring direct profit to Adobe, but it symbolizes the standard of the rich media application market. The editor developing Flash is seeing real income. Let’s suppose that in the HTML5 era, the developers still have to choose Adobe products to develop canvas based web interaction. Why then would we need Flash Player? For Adobe, it saves the cost of maintaining a complicated system.

As for Microsoft, it’s a difficult situation. They have the IE card, but they aren’t sure whether it’s a trump card or not. The reason being that IE6 takes a large amount of the market, but the new versions of IE have to compete with former versions. They also have the card of SilverLight, which has a competitive relationship with Flash and HTML5. Support of HTML5 could have a negative effect on SilverLights popularization. Therefore, Microsoft would rather not fully support HTML5. Instead, it will be treated as a supplement of SilverLight.

Apple however has a great plan. They have decided to begin at the mobile platform level, and gradually move to desktop. iPhone is the first successful step. The existence of iPhone proves that Flash is unnecessary in the smart mobile industry. As a matter of fact, the Flash experience in this field is pretty terrible. However, the most important step is iPad. The iPad is almost similar to ordinary computers both in screen size and operation experience. If tablet PCs prove to be comfortable independent of Flash, then why shouldn’t the ordinary PC? If the user gets used to the non-Flash experience of tablet PCs, there’s no hope for Flash anymore. Since iPad came into being, the controversy between Apple and Adobe has escalated, proving the important role of tablet PCs in this battle.

However, is Apple going to realize its dream easily? Apple products perform really well in sales, but aren’t as popular as Microsoft products. The reason being that its culture provides the high-level experience of taste and quality, and that high level experience means a higher price.

Globally speaking, we have developed countries, developing countries and undeveloped countries, where most are without the money to buy Apple products. The people simply can’t pay for the increased quality.

So here comes the question: Is there a company capable of providing a similar experience? What about Microsoft? The answer is no. The reason is that Microsoft provides the service to all people. Its products need to be universal, consistent and not overly expensive. So Microsoft is not motivated to change user experience. They have tried to bring change in Vista, but the result was that XP users got confused and angry.

Maybe, Apple didn’t plan to make iPhones universal at the very beginning. Perhaps focusing on top of the pyramid will guarantee enough income, so does the iPad. It’s not popular enough to challenge the traditional desktop. Users can experience cheaper tablet PCs from other companies, and those tablet PCs will probably support Flash. If things happen in that way, Apple’s plan may end in failure.

As for Google, the result of the war is not too important. As long as users continue using webpages, they doesn’t care whether the web pages are HTML5 or Flash. This doesn’t mean Google is irrelevant though. On the contrary, they are the key factor in this war. Except for YouTube, Google seldom use Flash in their products. Although Flash is functional, it’s not an open product; so Google cannot decide its development direction. An open standard is easier to control for them. Nowadays, the rapid development of Chrome increases Google’s power in HTML5 establishment, but it doesn’t mean they’ll give up on Flash.

Flash is an important tool for Google to restrain Apple. It’s the chip with which Android challenges the iPhone. Last year, Google and Adobe collaborated to put Flash Player plug-ins inside the sandbox within Chrome, which promoted the performance of Flash on safety and resource cost.

Conclusion:

From the above analysis, we can conclude that Flash still controls the market of internet rich media. Its fate in mobile platform will be entirely determined by Google’s attitude.

As for HTML5, there will probably be a rapid development that makes it relatively popular in the next 1 to 3 years. It won’t take the place of Flash though. Instead, they’ll be coexistent for a period of time. Considering of the conflicts among the giants, there isn’t much hope for HTML5. It took so long for browsers to accept the current standard, and it’s going to take a much longer time for them to accept new ones. In this transitional era of Flash to HTML5, there is still a long way to go.

You might also like…

10 Essential Guides, Resources and Tools for Getting Started with HTML5 →
HTML5 and CSS3 Form References, Resources and Tutorials →
10 HTML5-Ready Blank, Bare-Bones and Naked Themes for WordPress →
Beginner’s Study Guide to HTML5 Microformats →
Guide to HTML5′s New Media Tags – Audio and Video →
Coding Flexible Web Layouts in HTML5 and CSS →


Advertise here with BSA


Building Websites and Browser Apps with jQuery Mobile: A Beginner’s Guide

Over the past 2-3 years we’ve seen a tremendous growth in browser and OS support for mobile websites. Most notably Apple’s iOS and Google’s Android platforms come to mind. But others such as PalmOS and Blackberry are still in the mix. Up until recently it was very difficult to match a single mobile theme into all of these platforms.

jquery mobile Building Websites and Browser Apps with jQuery Mobile: A Beginners Guide

JavaScript was a start, but there hasn’t been any truly unified library until now. jQuery Mobile takes all the best features of jQuery and ports them over to a mobile-based web source. The library is more like a framework which includes animations, transition effects, and automatic CSS styles for basic HTML elements. In this guide I hope to introduce the platform in a way that you can feel comfortable designing your own jQuery mobile apps.

Features & OS Support

The reason I suggest learning jQuery Mobile over any other frameworks is simplicity. The code was built on the jQuery core and has an active team of developers writing scripts and editing bugs. Of the many features include HTML5 support, Ajax-powered navigation links, and touch/swipe event handlers.

jquery mobile support Building Websites and Browser Apps with jQuery Mobile: A Beginners Guide

Support is varying between phones and is broken into a chart of 3 categories from A-C. A is the top tier which boasts full support of jQuery Mobile, B has everything except Ajax while C is basic HTML with little-to-no JavaScript. Luckily most of the popular operating systems are fully supported – I added a list below of just a few examples.

  • Apple iOS 3-5
  • Android 2.1, 2.2, 2.3
  • Windows Phone 7
  • Blackberry 6.0, Blackberry 7
  • Palm WebOS 1.4-2.0, 3.0

If you want to learn more try reading up on their official docs page. It’s not written in gibberish and actually feels very easy to follow along. Now let’s focus on the basics of writing a jQuery mobile page and how we can build a small application!

The Standard HTML Template

To get your first mobile app working there is a set template you should start with. This includes the jQuery base code along with the mobile JS and CSS, all external hosted from the jQuery CDN. Check out my example code below.

<!DOCTYPE html>
<html>
	<head>
	<title>Basic mobile app</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">  

	<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.css">
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
	<script type="text/javascript" src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js"></script>
</head>
<body> 

</body>
</html>

The only foreign elements here should be the two meta tags. The top viewport tag updates mobile browsers to use a full zoom effect. Setting the value width=device-width will set the page width at exactly the width of the phone screen. And best of all it doesn’t disable the zoom features since jQuery Mobile can adapt to shifting layouts.

The next meta tag X-UA-Compatible just forces Internet Explorer to render the HTML in it’s most recent iteration. Older browsers and especially mobile will try to get around unfamiliar rendering bugs.

Constructing the Body Content

Now this is where jQuery mobile can get tricky. Each HTML page isn’t necessarily 1 page on the mobile site. The framework makes use of HTML5′s data attributes, which you can create at a whim by appending data- beforehand. In a similar fashion data-role="page" can be set to multiple divs in a single HTML file, giving you more than one page.

You would then move between these pages with anchor links and a unique ID. This setup is a good idea for basic, simple apps. If you only need 3-5 pages then why not store it all in a single file? Unless you have a lot of written content, in which case try using PHP includes to save time.

Check the code example below if you’re lost.

<body>
<div data-role="page" id="index">
	<header data-role="header">
		<h1>Top title bar</h1>
	</header>

	<div data-role="content">
		<h3>Show another page??</h3>
		<p>hint: click the button below!</p>
		<p><a href="#about" data-role="button" data-theme="c">About us</a></p>
	</div>

	<footer data-role="footer">
		<h2>&copy; footer here.</h2>
	</footer>
</div>

<div data-role="page" id="about">
	<header data-role="header">
		<h1>Page 2 Here</h1>
	</header>

	<div data-role="content">
		<p>just some extra content as well.</p>
		<p>I mean, you can <a data-rel="back" href="#index">go back</a> at any time.</p>
	</div>
</div>
</body>
</html>

Take a look at the anchor link from the index page for a moment. Notice I added the attribute data-role="button" to setup the link as a button. But instead of using the default styles we include data-theme="c". This switches between 1 of 5(themes a-e) templates which come packaged by default as CSS styles within jQ Mobile.

jquery mobile themed buttons Building Websites and Browser Apps with jQuery Mobile: A Beginners Guide

My button also spans the entire page width. To remove the behavior we need to set the element from block to inline display. The attribute for doing this is data-inline="true" which you could append onto any anchor button.

Header and Footer Bars

Along the very top and bottom of your applications you should append header and footer content. This design style is often attributed with iOS apps which first became popular using Apple’s mobile App Store. jQ Mobile uses attributes of data-role to define the header, footer, and page content. Let’s take a brief look at these areas.

Top Bar Buttons

By default the top bar supports a set of two(2) links in a similar fashion to other mobile apps. iOS defaults to using a “back” button to the left and often an “options” or “config” on the right.

<div data-role="page" id="about" data-add-back-btn="true">
	<header data-role="header">
		<a href="index.html" data-icon="gear" data-theme="b" class="ui-btn-right">Settings</a>
		<h1>Page 2 Here</h1>
	</header>

The code above is just focusing on the div container for our About page along with header content. The additional HTML attribute data-add-back-btn="true" will only work when added onto a page data role. The purpose is to automatically include a back button which works similar to your browser’s back button.

jquery tabs back button Building Websites and Browser Apps with jQuery Mobile: A Beginners Guide

We could have added a back button manually with similar code as we used in the content area. But I feel this takes a lot longer to setup especially on multiple pages. All anchor links within the header section will default into left/right button positions. By using class="ui-btn-right" this re-positioned my Settings button so there is free space for the back button. Also I’m using the secondary theme styles to give it some extra spunk!

Footer Navigation

The footer area many not feel very useful at first. It’s a place where you can store copyright stuff and more important links, but this could just as easily be added at the bottom of your content area. So what good is using the footer?

Well the best example I’ve seen utilizes footer space as a navigation system where tab links appear to control the page navigation. There are plenty of options where you can select fullscreen effects, add icons, adjust placement, and a few other attributes as well. But let’s just build a simple footer nav with 3 buttons to get an idea of how this works.

[Preview Live Demo]

<footer data-role="footer" class="ui-body-b">
	<div data-role="navbar">
		<ul>
			<li><a href="#index" data-direction="reverse">App Homescreen!</a></li>
			<li><a href="http://www.google.com/" data-rel="external">Google Me</a></li>
			<li><a href="http://www.hongkiat.com/" data-rel="external">Hongkiat Blog</a></li>
		</ul>
	</div>
</footer>

So here is some footer code for the about page section. data-role="navbar" should be added onto the container element housing an unordered list and NOT the UL element itself. Each link within the list is treated as a tab bar, which then gets equally divided based on the total number of links. The additional class of ui-body-b just adds aesthetic effects as we switch between the few available styles.

ios path app nav bar Building Websites and Browser Apps with jQuery Mobile: A Beginners Guide

If you notice on the first button I have the attribute data-direction="reverse". Even though I could use the back button setup as before to return onto the home page, I’ve instead used the page ID of #index. By default the app window will transition to the right which looks pretty tacky since you expect the animation to move backwards. You can play around with even more of these animated effects if you have time. Check out the transitions info page in the jQuery documentation.

Ajax & Dynamic Pages

The first segment has really opened up the key points to building a mobile app with jQuery. But I want to start a new app which loads data from an external page. I’ll be using a very simple PHP script to attain the $_REQUEST[] variable and display a small Dribbble shot accordingly. The screenshow below should give you an idea what we are going to build.

dynamic pages demo Building Websites and Browser Apps with jQuery Mobile: A Beginners Guide

First I’ll make an index.html page set on the default template. For this home screen I’m using a list view setup to display each link in order. This is done in the content area with a data-role="listview" attribute on the list container. Cutting out the same header stuff as before, I added all my code from this new index page below.

<body>
<div data-role="page" id="img-listing">
	<header data-role="header">
		<h1>October 2011 Shots</h1>
	</header>

	<div data-role="content">
		<ul data-role="listview" data-theme="c">
			<li><a href="image.php?imgid=1">First image</a></li>
			<li><a href="image.php?imgid=2">Second image</a></li>
			<li><a href="image.php?imgid=3">Third image</a></li>
			<li><a href="image.php?imgid=4">Fourth image</a></li>
		</ul>
	</div>

	<footer data-role="footer"><h3>www.dribbble.com</h3></footer>
</div>
</body>
</html>

Each of the anchor links in my list view point to the same file – index.php. But we’re passing in the parameter imgid as a request variable. On the image.php file we take the ID and test it against 4 preset values. If any match up we use the matching image URL and title, otherwise we just display a default Dribbble shot.

Image Loader Script

The image.php script still has the default jQuery mobile template added into the code. It actually shares a very similar header and footer, except for the addition of our back link attribute data-add-back-btn="true". Notice this button will only show up if we come from index.html first! Try directly loading image.php and nothing will appear since there’s no “back” to move to.

I think we can make a bit more sense of the code by examining my PHP logic first. We use a switch / case method to check against the 4 different IDs and provide a header title, image URL, and original artist source link.

<?php
$theid = $_REQUEST['imgid'];

switch($theid) {
	case 1:
		$heading = "Wunderkit";
		$origin  = "http://dribbble.com/shots/297593-Wunderkit-tasks";
		$source  = "wunderkit.png";
		break;
	case 2:
		$heading = "College";
		$origin  = "http://dribbble.com/shots/298643-Colleeeeeeeeeeeeege";
		$source  = "college.jpg";
		break;
	case 3:
		$heading = "Forum app";
		$origin  = "http://dribbble.com/shots/298649-Forum-app-for-Facebook";
		$source  = "forum-app.jpg";
		break;
	case 4:
		$heading = "Twitter";
		$origin  = "http://dribbble.com/shots/298069-Twitter";
		$source  = "twitter.png";
		break;
	default:
		$heading = "Abandoned lighthouse";
		$origin  = "http://dribbble.com/shots/298615-Abandoned-lighthouse";
		$source  = "lighthouse.jpg";
}
?>

All seems fairly straightforward – even a novice PHP dev should be able to follow along! And if you don’t understand it’s not important to the jQuery code anyway, so don’t worry. We should switch now and take a look at the template I’ve built within this new page. All the HTML code is added after that whole PHP block above. I used the ID of “images” for the container and even setup the header to change with each new photo.

<div data-role="page" id="images" data-add-back-btn="true">
	<header data-role="header">
		<h1><?php echo $heading; ?></h1>
	</header>

	<div data-role="content">
		<p><strong><a href="<?php echo $origin; ?>" data-rel="external">View the Original</a></strong></p>
		<p><a href="<?php echo $origin; ?>" data-rel="external"><img src="img/<?php echo $source; ?>" /></a></p>
	</div>

	<footer data-role="footer"><h3>www.dribbble.com</h3></footer>
</div>

You can probably see how simplistic this demo is. But the whole purpose is to demonstrate the scalability of jQuery mobile. PHP can easily be added into the mix and you can churn out some really neat apps with just a few hours of development.

Fancy Design with List Thumbnails

One last added effect we can implement is the use of thumbnails to liven up listing page. I’m also going to split text into a heading and description box to display both the artwork title and artist’s name.

dribbble image browser app preview Building Websites and Browser Apps with jQuery Mobile: A Beginners Guide

To begin open up Photoshop and create an 80×80 px document. I’m going to quickly re-size each image and save thumbnails to match each one. Then updating the list view items we should include a few more elements.

Check out the code below and my demo example to see what I mean.

[Preview Live Demo]

<div data-role="content">
	<ul data-role="listview" data-theme="c">
		<li><a href="image.php?imgid=1">
		<img src="img/wunderkit-t.png" class="ui-li-thumb" />
		<h3 class="ui-li-heading">Wunderkit tasks</h3>
		<p class="ui-li-desc">by Sebastian Scheerer</p></a></li>

		<li><a href="image.php?imgid=2">
		<img src="img/college-t.jpg" class="ui-li-thumb" />
		<h3 class="ui-li-heading">Colleeeeeeeeeeeeege</h3>
		<p class="ui-li-desc">by Scott Hill</p></a></li>

		<li><a href="image.php?imgid=3">
		<img src="img/forum-app-t.jpg" class="ui-li-thumb" />
		<h3 class="ui-li-heading">Forum app for Facebook</h3>
		<p class="ui-li-desc">by Ionut Zamfir</p></a></li>

		<li><a href="image.php?imgid=4">
		<img src="img/twitter-t.png" class="ui-li-thumb" />
		<h3 class="ui-li-heading">Twitter</h3>
		<p class="ui-li-desc">by Sam Jones</p></a></li>
	</ul>
</div>

The classes for ui-li-heading and ui-li-desc are added by default into the jQuery Mobile stylesheet. This is similar to the image class ui-li-thumb which automatically re-sizes each list view bar according to the image height. Now from here you could build more on the frontend with animations, page effects, stylesheets, etc.

Or alternatively you could begin constructing a backend system to upload new images and automatically trim thumbnails to include in the list. There is so much flexibility with jQuery Mobile you almost can’t label it solely as a JavaScript library. It’s more of an entire HTML5/CSS/jQuery framework for building quick and scalable mobile apps.

Conclusion

As of writing this article the jQuery Mobile team has officially put out RC1.0 of the code library. This means most if not all of the major bug fixes have been squashed and now testers are gearing up for a full release. Because of this you won’t find a whole lot of information on the web.

But as the months advance web developers are sure to pick up on the trend. Mobile applications and even mobile web layouts are growing in popularity with the huge increase in smartphones. Web developers don’t have the time to learn a full programming language for building Android/iOS apps. Thus jQuery Mobile is a slim alternative which includes support for a majority of the mobile industry software, and continues growing each day with an active developer community.