Showing posts with label iPhone. Show all posts
Showing posts with label iPhone. Show all posts

Friday, May 14, 2010

Mobile thick clients vs thin clients

For many application developers, the fastest, easiest way to introduce a mobile solution was to "chop down" an existing Web-based application. Users that had a device with a browser could then access the applications. However, because the resulting applications were not designed for the navigation capabilities of a mobile device or the smaller bandwidth, the user experience suffered. These problems can be solved by using a thick client instead of a thin client.

With a thin client, there is nothing running on the device except the presentation. All the content is on the host. The data, along with the rules to display it, are sent down and rendered on the local machine. Everything is done on the server; every request requires going back to the host. With a thick client, however, the presentation engine is on the local machine, which does the work.

The need for thick clients is driven by the complexity of the information and the presentation demanded by
mobile users. Mobile users, too, want robust applications and a good user experience. Years ago with the
PC, users went to a Web site and got straight HTML. PC users said, "That's not good enough." Then came
dynamic HTML, Java applets, Flash, and great plug-ins.

It depends on
  • what application you want to build
  • which audience you want to target
  • Operating cost
  • Billing and revenue models
Thin clients are good for:
  • Displaying regularly changing information eg. news.
  • Casual one-off browsing, where the user is unlikely to ever need to come back and benefit from having any sort of state remembered, and not being able to access any content is not a serious problem (due to lack of signal, etc).
  • Very changeable data with simple display requirements that change unpredictably over time, with minimal data entry requirements.
  • Situations where reliable network connections are guaranteed – either fast connections, or very small nuggets of content that can be found very quickly.
Thick clients are good for:
  • Repeated user experiences – local secure caching can reduce data entry, always a significant pain point on mobile.
  • Intelligent data delivery can reduce costly data overheads whilst providing faster responses for the user for known types of data set.
  • High interactivity and improved user experiences with many potential data visualisation models and on-client validation (minimising round trip requirements to the server, which cost money and time).
  • Improved branding around content, which only ever has to be downloaded once rather than at the start of ever session – handsets rarely dedicate persistent storage to browser caches so ever visit to a branded site reloads many Kbs of images, CSS etc.
  • Real security, guaranteed – there are known issues with Wap security which can even affect Wap2 browsers running through legacy APNs.
  • Offline access – content can be stored locally to browse even when there is no signal (eg. Tube maps), data entry can be performed when required and then submitted to a server asynchronously etc.
  • Data roaming can be incredibly expensive so for content like travel guides designed to be read abroad, or interactive services for which Java can choose to use SMS instead of GPRS, there are big cost savings to be had.
  • Precise optimal rendering of certain types of content, for example barcodes (used for ticketing etc) which would be useless if the handset decided to rescale them badly as can happen when displaying MMS messages or images in browsers.
First is the ability to do local processing and local data storage. With a thin client, modifying one item could require making several trips back to the host. And, because the bandwidth in the wireless world is so small, bringing pages down is a long, arduous task. A thick client, however, enables mobile users to work offline with the local data that is brought down; everything is done locally.

The advantage of a thick client's local processing ability can be seen when a user makes a mistake while entering data. With a thin client, the user would be prompted again, requiring another trip. With a thick client, you could use an "if" statement to determine if the information is correct before sending it to the host, which saves time.

Tuesday, February 23, 2010

Advertising on iPhone




For the most part, ads on iPhone apps seem to mimic the formats we’ve come to know via more traditional online browsing on PCs. A relatively non-intrusive banner typically shows up at the top or bottom of the open screen. (I have yet to see an app that forces a “pre-roll” ad before the app runs)
However, with the relatively slow data transmission speeds we see on iPhones (even those lucky enough to enjoy consistent 3G connectivity) and a clunkier way of shuttling between different browser windows and applications (the iPhone does not allow apps to run in the background, so exiting an app to visit a Website will shut down the app), user engagement with ads is a far more disruptive event and much less likely to happen among those users who don’t want their workflow or play interrupted.
Branding opportunities remain, though, especially on a new platform where novelty of the medium commands users’ attention. And hypertargeted ads tailored so well to a user’s needs might also perform well enough to cross the “interruption chasm”.
There are already several ad network/platforms available for iPhone apps. Here’s the current list of offerings:
Crisp Wireless – currently creates banners + microsites; used by the New York Times and Washington Post apps
PurpleTalk – allows creation of customizable text banners; features ad exchange “Partner Network”
AppLoop – claims to be the first real-time, location-based mobile advertising network
Pinch Media – widely used ad network on dozens of iPhone apps
Medialets – offers CPM, CPC and CPA advertising run natively through iPhone apps
AdMob -offers rich-media (video-, map- and Apple App Store-integrated) banner ads on iPhone apps; also has an impressive list of signed clients
Application Advertising
    The following have specific iPhone application advertising solutions for those that have created iPhone applications and wish to earn revenue by placing advertising in their iPhone application. Some of the following advertising networks are exclusively iPhone applications and others have programs for iPhone applications as well as other publisher solutions.  
How do iPhone app ads work?
Although the solutions are different in terms of how they render in an app and what the engagement and payment models are, they typically comprise clickable banner ads, which either link to an iPhone-optimized microsite, a Web page, or, in the case of AdMob’s banners, even video, map or App Store integration.
For Revenue:
Medialets: Insert ads into your application using easy to drop in Objects, also track your users interaction with your application, earn a CPM.
AdMob: Offers ads for your iPhone using Javascript” code. AdMob has been around for a while and has publisher solutions for mobile phones, not just iPhone applications.
PinchMedia: Offers ads and analytics for your iPhone application, exclusively for iPhone applications.
For Ad Swapping:
PurpleTalk: PurpleTalk allows you to join an advertising exchange with other iPhone developers. You earn advertising views of an advertisement for your application when you advertise others. You do not make money with these ads however it is a free way to increase the adoption of your own application.
For Analytics:
PinchMedia: Offers analytics for your iPhone application, exclusively for iPhone applications.
As iPhone’s become more popular by the day, and applications become more widely used your application may become a nice revenue generator. Many options exist.
If you have a new application you could use the PurpleTalk code to gain free exposure and hope to increase your application adoption. Once you have gained adoption and increased usage you could add the advertising code from one of the above iPhone Publisher Networks and start earning revenue from your inventory.

Wednesday, January 27, 2010

Top 10 mistakes in iPhone App Development

Here are top 10 mistakes I’d encourage you to avoid.

#1 Creating an Overly Complex App

The first app we created at Pinger was called Pinger Phone. Although this app did get into the top 100 for a short while, its main flaw was that it was way too complex. It had both a social media feed and an IM client. Those who understood it, loved it. Buy many people just didn’t get it.

So when it comes to apps, keep it simple.

#2 Having a Paid Only Strategy

There may be certain apps that don’t work well with a lite version, but I suggest you have a free and paid version if possible. You get double the possible exposure in the app store and you let users try your app before spending money on it.

#3 Using Sub Par Graphics

Just look at the top 100 apps. Some of the icons look like I created them (that’s not a good thing). They are blurry, unprofessional, and don’t stand out. Create the best graphics that your budget allows.

#4 Flipping a Coin to Price your App

The app store is a bit of a garage sale with $.99 tags on many items. Before you just go with the $.99 price, do research. What are your competitor’s apps priced at? Better to price your app a bit high to start. You can always lower the price later. One exception to this is the app Ping! Great app and great strategy. It was free for the first couple days while he marketed it into the top 100. Then he made it $.99. His strategy worked.

So it’s not always one size fits all. Think it through.

#5 Having No or a Last Minute Marketing Plan

I talk to so many developers that start their marketing plan once their app has been approved. Big mistake. While you’re dreaming up your perfect app, you should make your marketing plans.

#6 Not Tracking Everything You Can

At a minimum track downloads, ranking, revenue, and important changes daily. You do this to see what is driving your downloads and what is not. If you get a great review in an app review website, did it drive more downloads? If you spend money on mobile ads, how did that impact your lite and paid downloads?

#7 Not Being Willing to Spend Money

You’ve spent hours and hours building a great app. You should be willing to spend some money to promote your app. I realize it could be a waste of your precious funds, but you may also have a hit on your hands that no one ever finds out about.

#8 Not Doing Keyword Research

Apple gives you 100 characters to enter keyword information about your app. Do your homework. Use Google’s free keyword tool and the iPhone app store search box to figure out what keywords to use.

#9 Not Using your Userbase

If you’ve got a userbase when you launch your first app, announce the app to them. If you don’t, create a way to register or message your users for future updates or other app launches. Happy users you can contact are invaluable.

#10 Not Becoming or Hiring a Marketer

You can’t just be a developer. You need to become a marketer. Either start learning on your own or hire someone who can help you.
In summary, hope this helps you avoid mistakes and have success in the app store!

Thursday, July 9, 2009

Spruce Up Your Table Views

Setting the background color of your table view is very easy.  All you need to do is set the backgroundColor property to the color you want to see.  For example, I have created a table view here in the app delegate and simply set the background property from here:
UITableViewController *tvc = [[UITableViewController alloc] initWithStyle:UITableViewStyleGrouped];
tvc.view.backgroundColor = [UIColor redColor];
    
[window addSubview:tvc.view];
    
[window makeKeyAndVisible];
If you are using sub-classing, you may also rather set this property in the initWithStyle.
You can use also an image as your background to really spice things up.
Here is that code:
UIView *backgroundView = [[UIView alloc] initWithFrame: window.frame];
backgroundView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"TableViewBackground.png"]];
[window addSubview:backgroundView];
[backgroundView release];
    
yourTableViewController = [[ATableViewController alloc] initWithStyle:UITableViewStyleGrouped];
yourTableViewController.view.backgroundColor = [UIColor clearColor];
[window addSubview:yourTableViewController.view];
    
[window makeKeyAndVisible];
 
This one takes a little more code - essentially you are putting an image into a view, inserting that into the app window and then setting the background to a transparent color. 
Simply setting the background color of the table view to the image would produce artifacts.  
That is it!  I hope that this tip will add some more pizazz to your apps!
As you can see, the this array is sorted. There you have it!

Thursday, June 25, 2009

iPhone SDK dismiss the keyboard


Set the delegate on the text field that will bring up the keyboard. Add the following selector to the object that you set to be the delegate.

The controller's interface code
#import
@interface MyViewController : UIViewController {
IBOutlet UITextField *textField;
}
@property (nonatomic, retain) UITextField *textField;
@end
And the controller's implementation code
#import "MyViewController.h" 
@implementation MyViewController 
@synthesize textField;
-(BOOL)textFieldShouldReturn:(UITextField *)theTextField {
if (theTextField == textField) {
[textField resignFirstResponder];
}
return YES;
}
@end

Thursday, May 28, 2009

The For-Each Loop in Objective-C

Loops are the gears of a
programming language, they help move the program to the next step. 
A For-Each loop is generally used when you
want your program to do something to a collection of objects.
For example, this For-Each loop prints out each string in an
array of strings:

    //For each loop
    //Create an array and add elements to it
    NSMutableArray *anArray = [[NSMutableArray alloc] init];
    [anArray addObject:@"Element 1"];
    [anArray addObject:@"Element 2"];
    [anArray addObject:@"Element 3"];
   
    //Use a for each loop to iterate through the array
    for (NSString *s in anArray) {
        NSLog(s);
    }
   
    //Release the array
    [anArray release];


  That is it!

Wednesday, May 27, 2009

For Loop in Objective-C

Loops are the gears of a programming language.

They help move the program to the next step. A For loop is generally used when you want your program to repeat an action a set number of times. 

Here is the syntax for the For Loop:
 
    for (int y = 0; y < 3; y++) {
        NSLog(@"y = %i", y);
    }
 
 
That is it!

Thursday, May 14, 2009

Sorting An Array in Objective-C

Arrays are structures used to hold a list of objects. Sometimes
though you may want to sort the order that the elements appear.

Doing this is actually pretty simple once you know how,
essentially you will be using the NSArray sortedArrayUsingSelector
method.

For example, if you create an array like so

NSMutableArray *anArray = [[NSMutableArray alloc] init];
[anArray addObject:@"B"];
[anArray addObject:@"A"];
[anArray addObject:@"C"];
and then write out the contents of the array to the log using a
foreach loop the results will look like this:

[Session started at 2009-03-25 16:57:55 -0400.]
2009-03-25 16:57:58.647 SortigArray[3403:20b] B
2009-03-25 16:57:58.648 SortigArray[3403:20b] A
2009-03-25 16:57:58.649 SortigArray[3403:20b] C

Obviously, the contents of the array stay in the same order in
which they were inserted.

What you could do is create another array, sorted, using the
sortedArrayUsingSelector method of NSArray. Here is how:
NSArray *sortedArray = [anArray sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
The odd (for some anyway) piece of this code is the
@selector(caseInsensitiveCompare:) component of the code. This is
a method passed to the function that instructions NSArray on how
to sort the array.

At any rate, if you run through the array as before and print out
the results to the log you will get this:

[Session started at 2009-03-25 17:07:18 -0400.]
2009-03-25 17:07:21.832 SortigArray[3537:20b] A
2009-03-25 17:07:21.833 SortigArray[3537:20b] B
2009-03-25 17:07:21.834 SortigArray[3537:20b] C

As you can see, the this array is sorted. There you have it!

Thursday, May 7, 2009

Adding Background Colors and Images to Your Table Views

Setting the background color of your table view is very easy.
All you need to do is set the backgroundColor property to the
color you want to see. For example, I have created a table view
here in the app delegate and simply set the background
property from here:

UITableViewController *tvc = [[UITableViewController alloc] initWithStyle:UITableViewStyleGrouped]; tvc.view.backgroundColor = [UIColor redColor]; [window addSubview:tvc.view]; [window makeKeyAndVisible];
If you are using sub-classing, you may also rather set this property in the initWithStyle.

You can use also an image as your background to really spice things up.

Here is that code:

UIView *backgroundView = [[UIView alloc] initWithFrame: window.frame]; backgroundView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"TableViewBackground.png"]]; [window addSubview:backgroundView]; [backgroundView release];
yourTableViewController = [[ATableViewController alloc] initWithStyle:UITableViewStyleGrouped]; yourTableViewController.view.backgroundColor = [UIColor clearColor]; [window addSubview:yourTableViewController.view]; [window makeKeyAndVisible];

This one takes a little more code - essentially you are putting an image into a view, inserting that into the
app window and then setting the background to a transparent color. Simply setting the background
color of the table view to the image would produce artifacts.

That is it! I hope that this tip will add some more pizazz to your apps!

Monday, April 27, 2009

Memory Management tip

Dealing with memory on the iPhone is one of the most difficult
challenges that you will face as a new iPhone developer. Today,
I am going to show you a very simple tip that will help you
debug the memory problems that you are like to face.

One thing that you have to worry about with memory management is
the "retain count" of an object. The retain count is how the
system keeps track of the memory used by an object. If an
object's retain count is zero and your attempt to access it
your app will crash; if you do not make sure the retain
count of your object is 0 when the object goes out of focus you
will have a memory leak.

Clearly, it is important to be able to find out what the current
retain count of an object is. Here is how you can do this:

NSLog([NSString stringWithFormat:@"Retain Count:%i", [someObject retainCount]]);
This writes out the current retain count to the log. The
important function is [someObject retainCount].

Friday, April 24, 2009

Alert box in iPhone

An alert box is a quick way to communicate to your users. Alert boxes look like a rounded square with a message and a button on it. You may put this code into your project to get an alert box:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"UIAlertView"
message:@"Hi There!" delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles: nil];

[alert show];
[alert release];

As you can see from the code above, square brackets are the order of the day in Objective-C, the iPhone programming language. For now, note that text that comes right after the word "message:". This is where you control what the alert box presents to the user.
Finally, notice the overall pattern of using objects in Objective-C: alloc, "do stuff", release. This is something that you will be using often in your iPhone programming.

Looping in Objective-C

Looping in Objective-C

Loops are the gears of programming: it is what makes the code take action.  The two loops I use most often is the for loop (to do a predefined number of steps) and what is usually called a foreach loop (to move though a list of objects).

//This loop simply repeats an action
//a set amount of times:
for (int i=0; i<=3; i++)
    NSLog([NSString stringWithFormat:@"i=%i", i]);
  
//Create an array of strings for the next example:
NSMutableArray *bunchOfThings = [[NSMutableArray alloc] init];
[bunchOfThings addObject:@"Zero"];
[bunchOfThings addObject:@"One"];
[bunchOfThings addObject:@"Two"];
[bunchOfThings addObject:@"Three"];
  
//This is sometimes called a "for each" loop
//Using this list will repeat actions for each
//object in a list.
//Hint: you can use this for any type of list of
//objects so if you have list of custom defined
//objects this is an easy way to work with them all
//at one time.
for(NSString *s in bunchOfThings)
    NSLog([NSString stringWithFormat:@"s=%@", s]);
  
//The array must be released since it was alloc/init earlier.
[bunchOfThings release];


That is it!