May 14 2009

Iphone iwebkit Example

Create Custom Iphone or Ipod Touch Web Applications Using iWebKit

For the impatient people like myself, heres what it looks like. You want to point your iphone browser to this location and hit the ‘+’ button at the bottom and select add to the homescreen. This will get rid of the navigation bar on in safari and make the iwebkit example look like a native iphone app.

Here are the steps to take in order to get this working.
Get the frame work: iWebKit framework (I used 4.5.3 for this guide)
Extract the iwebkit and take a look at the manual. Iwebkit comes with a few examples of how to use the key framework elements.We’re going to make a very rudimentary application for the purpose of iphone iwebkit example. Ajax integration with iwebkit will come later.

First you will need to create a directory on your web server and extract the iwebkit files into it.
The webkit contains a few examples but most of them didn’t show up properly for me when I used the Iphone.
Most webapps are built with just really basic html. The custom elements that iwebkit provides are called by normal divs with certain ids.

First start with an extremely basic html skeleton page :

<html>
<head>
<meta content=”yes” name=”apple-mobile-web-app-capable” />
<meta content=”text/html; charset=iso-8859-1″ http-equiv=”Content-Type” />
<meta content=”minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no” name=”viewport” />
<title>iphone iwebkit example</title>
</head>
<body>

</body>
</html>

Hopefully no explanations are needed there. Notice the meta tags? So now we need to start adding the iphone javascript and css.
To get started with iwebkit for the iphone or iphone touch you only need to include two files into this basic html page but you will need to take all four folders from the Framework folder and put them into the directory where you want to host your web app.
Add these two lines to the head portion of the skeleton html file outlined above.

<link href=”css/style.css” rel=”stylesheet” type=”text/css” />
<script src=”javascript/functions.js” type=”text/javascript”></script>

Now to start putting the application together using iwebkits basic elements.

Top Bar
This section will outline the options for the navigation bar at the top of the page on the iphone or ipod touch.
Using iwebkit for the top bar we will normally put navagation buttons and a title like this.

<div id=’topbar’>
<div id=”leftnav”>
<a href=”index.html”><img alt=”home” src=”images/home.png”/></a>
</div>
<div id=’title’>
iphone iwebkit example
</div>
<div id=”rightnav”>
<a href=”index.html”>Next</a>
</div>
</div>

There are four div elements there that make up this top bar. The first is the bar itself and it encompasses the other three elements.
The second is the leftnav div. This specifies that the elements within this div are to appear at the left side of the bar (Big surprise).
The third is the title. The fourth is the rightnav which will appear on the right side. You’re probably going to want to put links and pictures in the leftnav and rightnav divs.
Instead of the rightnav div it is possible to put a rectangle button instead of the arrow button just by changing rightnav to rightbutton in the id.

Content
This section is for basically anything you want to put in your iwebkit page. I’m going to demonstrate a simple iphone-looking list here:

<div id=”content”>
<span class=”graytitle”>Iphone iwebkit example</span>
<ul class=”pageitem”>
<li class=”textbox”>
<p>Some Text for the iwebkit example</p>
<p>More text for the Iphone</p>
</li>
<li class=”textbox”>
<span class=”header”>Iphone iwebkit</span>
<p>Iphone Iphone</p><p>WebKit WebKit</p>
</li>
<li class=”menu”>
<a href=”index.php”>
<img alt=”Description” src=”thumbs/basics.png” />
<span class=”name”>Iphone iwebkit Example</span>
<span class=”comment”>Comment about iwebkit</span>
<span class=”arrow”></span>
</a>
</li>
<li class=”store”>
<a class=”noeffect” href=”index.php”>
<span class=”image” style=”background-image: url(‘image.jpg’)”></span>
<span class=”name”>Iphone Song</span>
<span class=”comment”>iWebKit Comment</span>
<img alt=”rating” class=”stars” src=”images/4stars.png” />
<span class=”starcomment”>13 Reviews</span>
<span class=”arrow”></span>
</a>
</li>

</ul>
</div>

There are a lot of options when using iwebkit. Most are pretty self explanatory, like the <ul> class and the <span> and <li> classes, but who wants to remember all that.
So go check the source of some feature or look that you want on your iwebkit page at <a href=’http://m.iwebkit.net/index.html’>this demo</a>.

The first issue I had when looking at my iwebkit example on the iphone was that the example iwebkit application wasn’t fullscreen in safari.
The only way that I’ve found so far to make this web application look like a native iphone application is to go to the page in safari and then hit the ‘+’ button at the bottom and select add to the homescreen.
This will get rid of the navigation bar on the iphone and make the iwebkit example look like a native iphone app.

This example and the full source for this iwebkit iphone example  can be looked at here.

Share

May 14 2009

Lawyer challenges Mulroney's 1996 testimony during Airbus lawsuit – CBC.ca


National Post

Lawyer challenges Mulroney's 1996 testimony during Airbus lawsuit
CBC.ca
Brian Mulroney testifies at the Oliphant commission, which is looking into business dealings between Karlheinz Schreiber and the former prime minister.
Mulroney in hot seat over selective answers The Canadian Press
Oh, cry me a river, Mr. Mulroney National Post
Globe and Mail – Toronto Star – CBC.ca – CBC.ca
all 696 news articles  Langue : Français
Share

May 14 2009

Caregiver advocate questions Dhalla's story – Canada.com


CTV.ca

Caregiver advocate questions Dhalla's story
Canada.com
By Juliet O'Neill, Canwest News ServiceMay 14, 2009 7:21 PM Brampton Liberal MP Ruby Dhalla during a press conference in Toronto, Friday.
Dhalla lawyer hints scandal was politically motivated StarPhoenix
Dhalla lying, advocate implies Toronto Star
Globe and Mail – The Canadian Press – Winnipeg Sun – Brampton Guardian
all 69 news articles
Share

May 14 2009

Domestic abuse – Ottawa Citizen


CTV.ca

Domestic abuse
Ottawa Citizen
There's blood in the waters, and the sharks are circling for Liberal MP Ruby Dhalla. As fascinating as the spectacle might be for political junkies, the importance of this episode will ultimately be measured by whether it has any effect on the lives of
Dhalla abuse charges 'false' Edmonton Sun
Dhalla a victim of campaign: lawyer National Post
Globe and Mail – Toronto Star – Toronto Star – Toronto Star
all 545 news articles
Share

May 14 2009

Google suffers major failure

Google Search and Google News performance slowed to a crawl, while an outage seemed to spread from Gmail to Google Maps and Google Reader. Comments about the failure were flying on Twitter, with “googlefail” quickly became one of the most searched terms on the popular micro-blogging site.


Share

May 14 2009

Xerox Solid Ink Printer Cuts Waste by 90%

Ink toner cartridges are expensive, wasteful, and energy-intensive. That’s why Xerox’s new ColorQube 9200 printers are so innovative. Instead of using traditional cartridges, the printers use solid blocks of ink that melt when heated. Xerox claims that its ,500 machine–meant squarely for corporate customers


Share

May 14 2009

Make High-Impact Backgrounds for Your Designs with Photoshop

In this Photoshop web design tutorial, you’ll learn about creating dynamic and high-impact backgrounds that you can use on your own web layouts. We’ll go over color/gradient techniques, lighting effects, and using textures and patterns.


Share

May 14 2009

You Don’t Need Pro Gear to Take Great Studio Portraits

While it’d be great to have a spare 10k to drop on a nice lighting setup – you don’t really need it to get some pretty good results.


Share

May 14 2009

A Beginner’s Guide To jQuery

How can it make my life easier as a developer? How do I get started? Well, jQuery makes writing Javascript fun again and really allows you to take advantage of some of the more difficult aspects of Javascript with relative ease.


Share

May 14 2009

Linux : Open-Source Software Gains As Moneymaker.

Free open-source software is not so free anymore as more companies — including longtime makers of conventional software — strive to make money on the technology.


Share