Sunday, September 27, 2009

Armin wins two DJ Awards!

Garbo & Tidy Midlands presents - Fright Night III

Garbo & Tidy Midlands presents - Fright Night III

Text by Tidy 16 Sep 2009



Garbo presents:
Tidy Midlands
Fright Night
III

Friday 30th October ‘09

@ Air Nightclub, Heath Mill Lane, Birmingham
9pm – 6am

1 Legendary Clubbing Event / Ghouls, Ghosts, Witches & Weirdo’s /
The Scariest Weekend on the Calendar

Do you have a taste for terror?

It’s back... This time though it’s bigger, better and far more frightening!!

For Octobers spine-chilling occasion we at tidy Midlands want to take you through to Halloween with one of hard house’s most talked about events – FRIGHT NIGHT – so this is your chance to get in on the fiendish action. Dress up, act the ghoul and have it large with the resident poltergeists which, like our tidy faithful, they too call Air home!!

Headlining this creepy affair will be hard house royalty and all round legend, the ol’ sea dog himself
- CAPTAIN TINRIB – The skipper will be getting amongst the horrifying hedonism with one of his truly terrifying LIVE shows. TinRib will headline a frightening, but nevertheless impressive, line up of the undead...

Joining El Capitano will be one man who has scared the masses on every single Fright Night event to date - PAUL GLAZBY - so it makes blood-curdling sense to get the dark-destroyer back where he belongs – leading his evil followers from the main room DJ coffin...
Only this time with a hostile 4 HOUR SET featuring a trademark show of hell-raising, bone crunching hard house!

Whatever you do before the 30th of October – don’t fall asleep…

Captain TinRib LIVE
Alex Kidd
Kutski – BBC Radio 1
Paul Glazby
(Exclusive 4 hour set)
Andy Farley
Karim
Ilogik
Ben Stevens b2b Rodi Style
Garbo
Scott Fo-Shaw
Adam M
Munkjack
(Frank Farrell & Dave Owens)
Neal Thomas
Dave Curtis
DJ Opel

Carbon Lounge Hosted By – D-Railed
Danny Lee
Dawson & Pearce M
Lusty & P4N1X
Sumbo
Andy Caddick b2b Charlie Bosh
Hardkitty
A.I.R.L.A.B


Websites: www.tidy.com / www.airbirmingham.com

Ticket Price: Early Birds - £10 / Standard - £15 / More on the Door

Ticket Hotline: 0844 870 0000
Ticket Website: http://www.theticketsellers.co.uk/buy_tickets/events/?id=10008459&ref=let_aft
Club Info: www.airbirmingham.com

Travel & Hotels Information: Road: – www.theaa.com / Rail: www.nationalrailenquiries.co.uk or 0845 748 4950 / Hotels – www.enjoyengland.com & search: Birmingham

Join Our Online community at: www.tidy.com , www.tidydsi.com & www.facebook.com/group.php?gid=12255382302

Next Event: Viva Glaz Vegas – NYD ‘10


Air Nightclub
Heath Mill Lane
Digbeth
Birmingham
B9 4AL

Whats ur ideal Hard Dance Dj line up?

If I were to hit the hard dance scene again this would be my line up:



Sander Van Doorn (Trance/Tech Trance)
BK (Hard Dance/Tech Trance)
Paul Glazby (Hard House)
Nick Sentience (Psy Trance/Trance)
Ingo vs Colin Barratt (Hard Dance Classics)
Technikal (Hard Trance)
Cally & Juice (Hardstyle)
MDA & Spherical (Hard Trance)
Gammer (Hardcore)
Andy Whitby (Hard House)
Emilio (Hard Trance)

Thursday, September 24, 2009

Tiësto remixes classic "Good Life"



In celebration of the World's No.1 spirit brand Smirnoff, teaming up with the World's No.1 football club - Manchester United, Tiësto was approached by Smirnoff to remix a track that encompasses the passion of nightlife, and celebrates Manchester United's season which saw them win both the English Premier League and Carling Cup.

Tiësto transformed one of his all time favourite tracks - Good Life by Inner City, into a song that would reflect this one of a kind celebration while giving his own original twist on this classic.
Check out the remix titled 'Good Life (Tiësto Smirnoff Remix) by Kevin Saunderson, ft Inner City
Here
The music video features amazing footage from Tiësto's show in Copenhagen together with some of Manchester United's best goals and historic moments.

Understanding User Interface in Android

For all you Andriod fans, here is something interesting....

User Interface design. They walk you through the various elements that make up the UI of an Android application. In this first part they discuss the various layouts available in Android and how to position the various widgets on your screen
Enjoy

Wednesday, September 16, 2009

Are Widgets ready for me?

OK, so getting back to the widget reality here. I'd like to take a look at what the platforms are, what your options are and if it's really even worth it to go there. I know that last time I got a bit distracted with the whole 'sprite' thing, but I promise to stay on track here.

The first thing that it's important to sort out is just where your widgets might be supported. Unfortunately, this is not as easy as one might think it would be. Odds are that neither your (or your end user's) phones will support the modern widget engines. On the surface, all of the providers put forth public statements extolling the virtues of their solution and how wonderful it is for end users and developers: Opera, Nokia,NetFront, and Yahoo! are all out pimping their platforms. However, digging deeper reveals the following:

Opera Widgets are only supported on the 9.x platform, which is currently available in beta for WindowsMobile TOUCH(PocketPC) devices only. Also, they've just published an SDK for T-Mobile which announced support for the platform back at 3GSM in February, but for the life of me I can't find a list of supported devices. If someone has the list, please enlighten me (and the rest of us). Based on the devices that the beta is available for, I'm guessing Touch enabled WinMo devices (like the HTC Shadow or MDA) will be supported out the door with other WinMo 6.x and S60 devices to follow on.

Nokia WRT support is supposed to find its way to all S60 3rd Edition FP2 devices as well all S60 5th Ed. (such as the N97 and 5800) along with a handful of FP1 devices (the N95 family and the E71/E66/E90). The 'exhaustive' list of devices is available and will continue to grow. It's also worth noting that even non Nokia S60 devices will support the Nokia WRT (such as the Samsung i8910). Nokia is pumping out widget delivery via Ovi, and has recently released plugins for widget development not only for Aptana Studio but for Adobe CS4, as well as Microsoft .Net

The NetFront widget engine is available for WindowsMobile devices (both PocketPC and SmartPhone) as well as for S60 3rd Edition (regardless of FP version) . It does require end user download, and has the side effect of the fact that the widgets themselves may not be recognized by the native browser on the device (IE) as a known content type. This provides a pretty major impediment to the usefulness of the platform. If users can only access your widget via side-load or via ActiveSync, well, that's not terribly helpful.


The Yahoo! Widget Engine (Yahoo! Go) is available for BlackBerry, WinMo, S60, as well as comes in some Java flavors for a raft of SonyEricsson and Moto devices as well. It's a pretty mature platform. Interestingly Yahoo! has made some interesting decisions when it comes to the way they interact with Widgets. By building your apps using their Blueprint 1.1 Language, rather than just provide a platform for the client and then be done with it, they actually provide services via the cloud which means that they'll also transcode/deliver your widget via the browser on devices which don't support Yahoo! Go. Pretty slick, but obviously in that context (the browser container) you're not going to be able to access the more advanced/native features of the platform.

You can also probably categorize JavaFX Mobile as a widget platform (if you so desire). Call me a cynic but I'm not holding out hopes for this having long legs on Mobile, not just because of Oracle, but Sun's not yet been able to build beyond the success of JavaME (SavaJe anyone?)

Development for each of these platforms is actually pretty similar. All of the widget managers expect delivery of content in a zipped package containing some sort of manifest (a config.xml file) along with the appropriate html, css, and scripts that your application can use. The bottom line is that you're encapsulating your web application into a standalone and as a result may (or may not) get access to additional device features (such as location, address book, media player etc). You also get the added benefit of local data storage in the form of something like SQLite or DOM storage (depending on the platform). As I was thinking about this more, I suddenly realized that what these widgets do is bring back my beloved mime/multipart content (sort of). At the end of the day, you the developer are building a web app to run locally. Leverage the browser container, but break out of its confines and gain access to more advanced local services.

Even as these widget platforms proliferate, there are folks out there looking to drive some sort of convergence on them. The W3C is hot on the trail of widget specs which may (or may not) apply to the mobile context, and the MWI has put forth a Best Practices doc focused on 'Web Applications' on mobile devices: . Add to that the effort that's going forward with Vodafone, ChinaMobile, SoftBank and Verizon: Joint Innovation Lab (http://www.jil.org).

Side note here: If the folks at JIL are going to see success, they've got some work to do on their desktop site. My first visit granted me a plain text response of: "Cookies must be enabled to view this page" (they were). Then, when I registered, the response to my registration was another plain text page that said simply "200" (I was left to assume that was an HTTP status...). I did try logging in with my username/password but got a message "We can't recognise the details you've entered. Please try again." Attempting to register again showed that my username was already taken. They did send me an email with a link for account validation, but all that link did was reload the home page of JIL for me, and attempting to login spit back the same error about recognising my details... I was doing this via Opera, but Firefox had similar issues. Oh Well.

None of the platform vendors are tools companies, and they've all learned how not to reinvent the wheel, so rather they forcing you into an IDE of their design, just go ahead and use your favorite environment (Eclipse, DreamWeaver, Visual Studio, emacs...). The only thing that you really need to do is to modify your webserver to deliver the appropriate content type for a widget package (and they even give you a sample .htaccess file with the sample code).

So lets take a quick peek at what we can actually do with one of the platforms. I'm going to pick on Y! because I happen to have a supported device. (No love from either Nokia or Opera on my E61, and my WinMo device isn't touch screen so I'm SOL there too. I tried NetFront, but that Sideload thing turned me off completely!). Stroll on over tohttp://mobile.yahoo.com/devcenter to pull down the SDK and get up and running.

The Blueprint language from Yahoo is based on XForms, but leaves out some of the complexity. At the root level, what you're provided with is containers and a series of controls for your application. All of the processing logic, scripting, and other fun stuff is managed on your end, on your server, in the language of your choice. This is truly a web application more than a widget per-se. You're not going to build a fish tank app or a tetris widget using this language, it's more of a way to provide a controlled, convenient access point and take away some of the pain inherent in trying to deliver an optimized mobile experience.

The benefit here is really that you can build a single instance of your mobile web application, pre-package some of the content so that performance is improved, and let the folks at Y! do the heavy lifting on the layout side of things. As a side effect, if the platform supports it you can also get location access without jumping through the hoops often required. The other clever thing that Y! is doing is passing along a greater level of granularity when it comes to device capabilities. They pass along a series of x-* http headers which will provide details on the quality of the browser (if you're talking to a web client instead of a native platform), and info about the carrier as well.

So what do you do, and should you even bother? Honestly, I think that we're still early when it comes to widgets for mobile. It's clear that each player means something slightly different when they talk about a 'widget.' Nokia is clearly trying to steer developers towards their WRT platform, and that's probably a good thing, but the addressable market there is still limited. The good news is that on the newest devices widgets will have pretty much first class citizen status. Opera is poised to do something, but it's not quite clear exactly what yet. The chaps at JIL seem like they want to do something serious, but it also remains to be seen how well it will play out and how far it will reach. Bottom line is that migrating to widgets is not going to solve your fragmentation issues, ye

Tuesday, September 15, 2009

Gard: Time was right to leave Tomb Raider


Tomb Raider co-creator Toby Gard has told GamesIndustry.biz that it was the right time for him to leave Crystal Dynamics and the character he originally designed behind.

Gard left the Eidos studio earlier this month to set up his own consultancy business, but also admitted that he'd "definitely, absolutely" like to work once again with a big team and lead a triple-A development project some time in the future.

"It's always difficult doing that but you can get stuck doing the same thing over and over," said Gard, when asked if it was difficult walking away from his work on the iconic videogame character.

"The only real way that I can really effect Lara Croft is to be in charge of a project. More and more as I was working at Crystal, especially on Underworld where I was just doing cinematic work, the reality is the control of the characters is in the hands of the creative directors and the publisher.

"I think it's just something you have to learn to realise that there's no one person really in charge of what goes on with a character and they have a life of their own in the hands of the team."

Although he still has the passion to work on a traditional videogame blockbuster, Gard doesn't yet see the opportunity, as his ambitions outweigh the reality of his resources.

"I guess the tough thing for me is that when I think about the types of games I like to play and the games I like to make they tend to be the rather expansive ones rather than the smaller ones," he said.


"So although I'm developing in my brain the project I'd like, I don't actually have a team at the moment to create it."

With clients already on board, Gard hopes for the time being to carve a niche in the consultancy business, noting that publishers are keen to successfully implement a Hollywood business model of using experts and outsourcing to handle peaks and troughs in game development.

"The way I see it is there's a lot of companies scaling up and down so much, letting everybody go at the end of projects, and then having their core teams do pre-production and all this kind of stuff and it's not really working out the way it should be," he said.

"It seems like the industry wants to move to a more Hollywood model by bringing in experts for shorter periods of time and then leveraging their outsourcing, but also building small teams for projects.

"But they haven't actually fully embraced that yet and I'm just wondering whether or not there's a way people will actually start doing that. The industry is still very stuck in its ways of building their internal teams. It seems like I've got a good opportunity to try, for companies to use experts at critical points during development," offered Gard.

Discussing the fate of the independent developer, Gard said he's encouraged by new platforms and business models that have helped smaller teams breathe new life back into creating successful games.

"[PSN and XBLA] and the iPhone have created a fantastic little marketplace for the small developers again. It's good because everyone went out of business in the Noughties, so it's great that there's something out there for the small guys as well," said Gard



The Official Logo of Nibbles


The logo of the Nibbler...


Build Web Apps for iPhone using Dashcode

So far, much mobile developer attention has been fixated on the iPhone SDK released by Apple to build native iPhone applications. This is understandable, since with the SDK you can write native iPhone apps that take full advantage of the capabilities provided by the device, such as accessing the accelerometer, the camera, as well as obtain geographical locations using Core
However, building Web applications for the iPhone has advantages too. For example, there is no need to wait for approval from Apple, as in the case of hosting the applications in AppStore. Also, the tools provided by Apple makes it very easy to build Web applications that look just like native iPhone applications. And when it comes to developers' skill-sets, developing Web applications is far easier than building native applications - all you need is some Javascript skills and you are ready to go!

Trying Out the Various Templates

When you first launch Dashcode (the easiest way to launch it is through Spotlight), you will see that Dashcode has already created some templates for you to build your Web applications quickly (see Figure 1).



The best way to learn is to select each template (other than the Custom template) and examine the content of each application. When you have selected a template, examine their contents and press Command-r to test the application on the iPhone Simulator. Go ahead and have fun with each template. When you have enough fun and get yourself acquainted with the environment, come back and we shall create an iPhone Web application from scratch and you will see how each part is built.

Building the UI

Alright, now that you are back, create a new Custom project In Dashcode. Notice that by default, Dashcode created a content and a footer parts for you (see Figure 2). Parts are the various views that you seen on your Web applications, such as buttons, text, etc. For this section, you will create a simple currency convertor Web application for the iPhone.


Figure 2: The parts in the Custom template

Select each of these parts and press the delete key. We shall delete these two parts and add our own parts manually.

Using the Library (Window'Show Library), drag-and-drop a Stack Layout part to the design surface (see Figure 3).


Figure 3: Using the Library to drag and drop parts onto your application

Expand the stackLayout part and you should see that it contains two subviews - view1 and view2. Select view1 and change its size to 320px by 356px (see Figure 4) via the Inspector window (Window'Show Inspector). Do the same for view2.


Figure 4: Changing the size for view1 and view2 via the Inspector window

Double-click on view1 and rename it as mainScreen. Do the same for view2 and rename it as settings (see Figure 5).


Figure 5: Renaming the two subviews

In the Library, drag-and-drop the Rounded Rectangle Shape part onto the mainScreen view (see Figure 6).


Figure 6: Adding the Rounded Rectangle Shape part to the subview

It its Inspector window, select the Fill & Stroke tab and in the Style tab select Gradient fill (see Figure 7) and select two colors.


Figure 7: Using the gradient fill to fill the part

Select the Effects tab and check the Glass and Recess checkboxes (see Figure 8).


Figure 8: Adding glass effect to the part

Select the Metrics tab and select the Absolute layout (see Figure 9).


Figure 9: Using absolute layout for parts positioning

Add the following parts to the Rounded Rectangle Shape part (see Figure 10) and name them as shown:

  • Text
  • TextField
  • Pop-up Menu
  • Push Button


Figure 10: Adding additional parts to the subview

Select the settings subview and repeat the same steps you have performed above. Figure 11 shows the parts added to the settings subview.


Figure 11: Populating the settings subview

You are now ready to view the application on the iPhone Simulator. Press Command-r to view the application on the iPhone Simulator (see Figure 12). Notice that the application is hosted by mobile Safari on the iPhone.


Figure 12: Viewing the application on the iPhone Simulator

Notice that you can only see the mainScreen subview. To see the settings subview, you need to write some code to navigate to it from the mainScreen subview.

Coding the Application

So you are now ready to write some code. With the mainScreen subview selected, right-click on the Settings button and select Events'onclick (see Figure 13).


Figure 13: Creating an event handler for the onclick event

You will be asked to name the event handler for this event. Name it as shown in Figure 14.


Figure 14: Naming the handler for the event

Notice that the code editor now appears at the bottom of the designer (see Figure 15).


Figure 15: The code editor where you can add your code

Enter the following code:

 function btnSettings_ClickHandler(event)  {   var views = document.getElementById('stackLayout');   var settings = document.getElementById('settings');   if (views && views.object && settings) {    views.object.setCurrentView(settings);   }  }  

Select the settings subview and right-click on the Save Settings button and select Events'onclick. Name the handler as btnSave_ClickHandler. Enter the following code:

 function btnSave_ClickHandler(event)  {   var views = document.getElementById('stackLayout');   var front = document.getElementById('mainScreen');   if (views && views.object && front) {    views.object.setCurrentView(front, true);   }  }  

Test the application again by pressing Command-r. This time, you will be able to navigate to the settings view by tapping on the Settings button in the mainScreen subview (see Figure 16).


Figure 16: Tapping on the Settings button navigates to the settings subview

Database Access

So far, your application displays two screens where you can perform some currency conversion as well as set the exchange rates for the different currencies. For simplicity, I am going to assume that you are converting the currencies into Singapore Dollars (SGD). All the exchange rates would be based on the SGD as the base currency.
To allow the users to store their own exchange rates, you will make use of the local database feature as defined in HTML 5 (which is supported by Mobile Safari). Doing so allows users of your application to store the exchange rate locally on their iPhones.
In the main.js file, add the following lines of code for performing database operations:

 var database = null;                           // The client-side database  var DB_tableName = "CurrencyKeyValueTable";    // database name    // Function: initDB() - Init and create the local database, if possible  function initDB()  {   try {    if (window.openDatabase) {     database = openDatabase("ExchangeRatesDB", "1.0",            "Exchange Rates Database", 1000);     if (database) {      database.transaction(function(tx) {       tx.executeSql("SELECT COUNT(*) FROM " + DB_tableName, [],       function(tx, result) {        loadRates();       },       function(tx, error) {        // Database doesn't exist. Let's create one.        tx.executeSql("CREATE TABLE " + DB_tableName +        " (id INTEGER PRIMARY KEY," +        "  key TEXT," +        "  value TEXT)", [], function(tx, result) {         initRates();         loadRates ();        });       });      });     }    }   } catch(e) {    database = null;   }  }    // Function: initRates() - Initialize the default exchange rates  function initRates()  {   if (database) {    database.transaction(function (tx) {     tx.executeSql("INSERT INTO " + DB_tableName +       " (id, key, value) VALUES (?, ?, ?)", [0, 'USD', 1.44]);     tx.executeSql("INSERT INTO " + DB_tableName +       " (id, key, value) VALUES (?, ?, ?)", [1, 'EUR', 2.05]);     tx.executeSql("INSERT INTO " + DB_tableName +       " (id, key, value) VALUES (?, ?, ?)", [2, 'AUS', 1.19]);    });   }  }    // Function: loadRates() - Load the currency exchange rates from DB  function loadRates()  {   var element;      var popUpElement = document.getElementById('popupConvertTo');     if (database) {    database.transaction(function(tx) {     tx.executeSql("SELECT key, value FROM " + DB_tableName, [],     function(tx, result) {      for (var i = 0; i < result.rows.length; ++i) {       var row = result.rows.item(i);       var key = row['key'];       var value = row['value'];         //---populate the pop-up menu part---       popUpElement.options[i].text = key;       popUpElement.options[i].value = value;         if (key == 'USD') {        element = document.getElementById('txtUSD');       }       else {        if (key == 'EUR') {         element = document.getElementById('txtEUR');        }        else if (key == 'AUS') {         element = document.getElementById('txtAUS');        }       }       element.value = value;      }     },     function(tx, error) {      showError('Failed to retrieve stored information from database - ' +        error.message);     });    });   }   else {    loadDefaultRates();   }  }    // Function: saveRates() - Save the currency exchange rates into DB  function saveRates()  {   if (database) {    var elementUSD = document.getElementById('txtUSD');    var elementEUR = document.getElementById('txtEUR');    var elementAUS = document.getElementById('txtAUS');      database.transaction(function (tx) {     tx.executeSql("UPDATE " + DB_tableName + " SET key = 'USD',       value = ? WHERE id = 0", [elementUSD.value]);     tx.executeSql("UPDATE " + DB_tableName + " SET key = 'EUR',       value = ? WHERE id = 1", [elementEUR.value]);     tx.executeSql("UPDATE " + DB_tableName + " SET key = 'AUS',       value = ? WHERE id = 2", [elementAUS.value]);    });   }   loadRates();  }    // Function: deleteTable() - Delete currency exchange table from DB  function deleteTable()  {   try {    if (window.openDatabase) {     database = openDatabase("ExchangeRatesDB", "1.0",            "Exchange Rates Database");     if (database) {      database.transaction(function(tx) {       tx.executeSql("DROP TABLE " + DB_tableName, []);      });     }    }   } catch(e) {    }  }    // Function: loadDefaultRates() - Load the default exchange rates  function loadDefaultRates()  {   var popUpElement = document.getElementById('popupConvertTo');   var element = document.getElementById('txtUSD');   element.value = "1.44";   popUpElement.options[0].text = "USD";   popUpElement.options[0].value = element.value;     element = document.getElementById('txtEUR');   element.value = "2.05";   popUpElement.options[1].text = "EUR";   popUpElement.options[1].value = element.value;     element = document.getElementById('txtAUS');   element.value = "1.19";   popUpElement.options[2].text = "AUS";   popUpElement.options[2].value = element.value;  }  

The database code above is pretty straightforward - store the exchange rates inside the database and populate the pop-up menu part when the rates are retrieved.
Modify the load() function as follows:

 //  // Function: load()  // Called by HTML body element's onload event when the Web application is ready to   // start  //  function load()  {   dashcode.setupParts();     initDB();       if (!database) {    loadDefaultRates();   }  }  

Press Command-r to test the application. When the application is loaded, the pop-up menu will now display the three different currencies (see Figure 17).


Figure 17: The pop-up menu part displaying the different currencies

When you tap on the Settings button, the exchange rates would also be displayed in the settings subview (see Figure 18).


Figure 18: The exchange rates displayed in the settings subview

Performing the Conversion

You are now ready to perform the actual conversion of the currencies. In Dashcode, select the mainScreen subview and right-click on the Convert! Button and select Events'onclick (see Figure 19).


Figure 19: Handling the onclick event for the Convert! button

Name the event handler as btnConvert_ClickHandler and code it as follows:

 function btnConvert_ClickHandler(event)  {   var amount = document.getElementById("txtAmount").value;    var rates = document.getElementById("popupConvertTo").value;   var result = amount * rates;   alert(result);  }  

Press Command-r to test the application. Enter an amount and select the currency to convert. Tapping on the Convert! button will now display the amount converted (see Figure 20).


Figure 20: Try converting some currencies!

Converting your Web Application into an iPhone Native Application

Now that your application is completed, you may deploy your application onto a Web server so that users can access your application through the Safari browser on their iPhones. However, since this is a Web application, the user must have access to the Internet, or else there is no way to access your application. And since our application does not make use of any server-based data, it is a good candidate to convert into a native iPhone application. The easiest way would be to host the Web application within the Safari browser, which is represented by the WebView view in the iPhone SDK.

In this section, I will show you how you can convert an iPhone Web application into a native iPhone application.

First, deploy your Web application by clicking the Share item in Dashcode (see Figure 21). Click the Deploy button so that all the files of the application will be saved to a Web publishing directory. Take note of the Web publishing directory shown in Dashcode. It is saved in /Users//Sites/CurrencyConvertor/. You will make use of the files contained within this folder shortly.


Figure 21: Deploying a Web application in Dashcode

Launch Xcode and create a new View-based Application project. Name the project as CurrencyConvertor.
In Finder, navigate to the
/Users//Sites/CurrencyConvertor/ folder and select the files shown in Figure 22.


Figure 22: All the project files created by Dashcode

Drag-and-drop all the selected files onto the Resources folder in Xcode. Xcode will prompt you with a dialog (see Figure 23). Check the Copy items into destination group's folder (if needed) checkbox and click Add.


Figure 23: Adding all the Dashcode files into the Resource folder in Xcode

Perform a global Find-and-Replace (by pressing Shift-Command-F). Search and replace the following strings with an empty string (see Figure 24):

  • Parts/
  • Images/


Figure 24: Replacing all instances of "Parts/" and "Images/" with an empty string

This will update the various HTML and JavaScript files that reference other files using the Parts/ and Images/ folder. Files stored in the Resources folder of your Xcode application have no directory structure when they are deployed; hence all the files are in a flat directory.

Select the files shown in Figure 25 and drag-and-drop them onto the Copy Bundle Resources (16) folder. This will ensure that all the HTML, JavaScript, CSS, and images files will be deployed together with your application.


Figure 25: Copying all the Web files into the targets folder so that they are deployed together with your application

In the CurrencyConvertorViewController.h file, add the following statements to define an outlet:

 #import     @interface CurrencyConvertorViewController : UIViewController {   IBOutlet UIWebView *webView;  }    @property (nonatomic, retain) UIWebView *webView;    @end  

Double-click on the CurrencyConvertorViewController.xib file to open it in Interface Builder.
Add a WebView view to the View window and control-click and drag the File's Owner item to the WebView view (see Figure 26). Select webView.


Figure 26: Connecting an outlet to a view

In the CurrencyConvertorViewController.m file, add the following statements:

 #import "CurrencyConvertorViewController.h"    @implementation CurrencyConvertorViewController    @synthesize webView;    - (void)viewDidLoad {   NSString *path = [[NSBundle mainBundle] pathForResource:@"index"         ofType:@"html"];   [webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath: path          isDirectory:NO] ]];   [super viewDidLoad];  }  

That's it! Press Command-r to test the application on the iPhone Simulator. The Web application is now hosted within the WebView view (see Figure 27). What you have just done is convert a Web application into a native application!


Figure 27: Running the Web application as a native iPhone application

Summary

In this article, you have seen how easy it is to build Web applications for the iPhone using the Dashcode tool included in the iPhone SDK. Not only that, you have also learned how to convert a Web applications into a native application. If you are currently building Web applications for the iPhone, drop a note below to share with us what type of applications you are building.