Friday, July 29, 2011

How To Import and Export App Data Via Email in your iOS App

A lot of developers want to be able to share their app's data via email. It's a convenient way for users to send data to each other or between devices – and it may even net you some new customers!

Luckily, this is pretty easy to do on the iPhone – you just have to set a few keys in your Info.plist and handle a few callbacks so the OS can open your app with the URL to import.

So we'll cover how to do exactly that in this tutorial!

Read More....

How To Integrate iTunes File Sharing With Your iOS App

The iPad and iOS 4 have a great new feature called File Sharing that provides a convenient way for users to transfer files between their computer and your app.

But figuring out exactly what you need to do to get this working in real-world scenarios can be tricky. So I thought it would be useful to write a tutorial that covers how to do that with a real app, step by step!

Read More.........

How To Save Your App Data With NSCoding and NSFileManager

There are many different ways to save your data to disk in iOS – raw file APIs, Property List Serialization, SQLite, Core Data, and of course NSCoding.

For apps with heavy data requirements, Core Data is often the best way to go.

However, for apps with light data requirements, NSCoding with NSFileManager can be a nice way to go because it's such a simple alternative.

Read More....

Core Data Tutorial: How To Use NSFetchedResultsController

So far, we're at exactly the same point we were using the SQLite3 method. However, we didn't have to write nearly as much code (notice the absence of a FailedBankDatabase class constructing raw SQL statements), and adding other functionality such as insert/delete operations would be much simpler.
However, there's one notable thing that we could add pretty easily with Core Data that could give us huge benefits to performance: use NSFetchedResultsController.
Right now we're loading all of the FailedBankInfo objects from the database into memory at once. That might be fine for this app, but the more data we have the slower this will be, and could have a detrimental impact to the user.
Ideally we'd like to load only a subset of the rows, based on what the user is currently looking at in the table view. Luckily, Apple has made this easy for us by providing a great utility class called NSFetchedResultsController.
So, start by opening up FailedBanksListViewController.h, removing out our old NSArray of failedBankInfos, and adding a new NSFetchedResultsController instead:

Core Data Tutorial: How To Preload/Import Existing Data

In this part of the series, we're going to discuss how to import or preload existing data into Core Data so that we have some good default data when our app starts up.

In the final part of the series, we're going to discuss how we can optimize our app by using NSFetchedResultsController, to reduce memory overhead and improve response time.

Read More....

Core Data Tutorial: Getting Started

Of all of the ways to persist data on the iPhone, Core Data is the best one to use for non-trivial data storage. It can reduce the memory overhead of your app, increase responsiveness, and save you from writing a lot of boilerplate code.

However, the learning curve for Core Data can be quite large. That's where this tutorial series comes in – the goal is to get you up to speed with the basics of Core Data quickly.

In this part of the series, we're going to create a visual data model for our objects, run a quick and dirty test to make sure it works, and then hook it up to a table view so we can see a list of our objects.

In the second part of the series, we're going to discuss how to import or preload existing data into Core Data so that we have some good default data when our app starts up.

In the final part of the series, we're going to discuss how we can optimize our app by using NSFetchedResultsController, to reduce memory overhead and improve response time.

Read More....

SQLite 101 for iPhone Developers: Making Our App

We're going to have two screens for our app. The first will show a list of banks in a table view. Tapping on a bank in the table view should bring up another view with details on that bank.

Rather than retrieving all of the data from the database, we're just going to pull out the specific subset we need to display the first table view to save memory. So let's create a class to store this:

Click on Classes and click "File\New File…", choose "Cocoa Touch Class" on the side, pick "Objective-C class", select "Subclass of NSObject", and click "Next". Name the class "FailedBankInfo."

Replace FailedBankInfo.h with the following:

Read More....

SQLite 101 for iPhone Developers: Creating and Scripting

In this series, we're going to show how to make an app that displays a list of failed US banks from a SQLite database.

In this first part of the series, we will cover what SQLite is and why we'd want to use it, how to use the sqlite3 command-line utility, and how to import data programatically via Python.

In the second part of the series, we will cover how to make an iPhone app that reads data from the SQLite database we created, and display data in a table view and a drill down detail view.

This tutorial does not assume any prior knowledge with Python or SQLite, however it assumes a basic knowledge of SQL.

Original Source...

How To Read and Write XML Documents with GDataXML

This tutorial will show you how to do exactly that! We'll create a project that reads a simple XML document that contains a list of RPG party members, and construct our own objects based on the XML. We'll then add a new player to the party, and save it back out to disk again.

This tutorial uses GDataXML, Google's XML processing library. I chose GDataXML since it performs well for DOM parsers, supports both reading and writing, and is so easy to integrate. However, if you are using a different DOM parser, it should be almost exactly the same as this but just slightly different API calls.

Special thanks to Saliom for suggesting writing this tutorial!

Read More....

How To Choose The Best XML Parser for Your iPhone Project

There are a lot of options when it comes to parsing XML on the iPhone. The iPhone SDK comes with two different libraries to choose from, and there are several popular third party libraries available such as TBXML, TouchXML, KissXML, TinyXML, and GDataXML. How is a developer to choose?

I have been recently taking a look at the various options out there, and ended up extending the XMLPerformance sample from Apple to try out each of the above libraries to learn how they worked and compare their performance. I thought I'd share what I've learned thus far to others who might be searching for the best XML library for their iPhone project.

In this article we'll give a detailed comparison of the features and performance of the most popular iPhone libraries, explain how to choose between them, and give a sample project showing how to read XML data using each of the above libraries.

Read More at Original Source...

Friday, July 22, 2011

Microsoft has 3 months to make or break Windows Phone

That is the dilemma I believe ails the Windows phone in its quest to make a headway in the highly competitive mobile landscape. Even with the great reviews of the huge mango update scheduled for the fall, and the prospects of second generation hardware coming from OEMs like Samsung, HTC and especially the much awaited Nokia branded phones, I'm afraid that Windows phone will continue to languish as a so-so mobile OS behind Google and Apple if Microsoft does not fundamentally change their approach in marketing and exposing the OS to the consumers. The new iPhone hardware refresh with IOS 5 and the latest Android 4.0 are set to come out around the same time frame in the fall as Windows Phone Mango. Being the under dog, Microsoft has to actively do more work than their top two competitors.

Here are the six areas that I think they need to fix in order to give Windows Phone a chance to gain market share.


Read More from: Original Source

C# Fundamentals


In the way of development of programs using FORTAN and COBAL like erlier languages the complexity was increasing for larger programs. So, the developers found out structured programing language like C. Later on these structured programing  languages also became complex in developing large projects , so developers come up with the Object Oriented programing (OOPs) language.

Structure programing works only for what is happening inside the code but does not explains which data is affecting (not works around data).

Object Oriented Programing works on both; around the code (what is happening) and around the data (which data is affecting).

To achieve the Object Oriented Programing concept we have to fallow three principles of OOPS conecpt and those are 

  1.  Encapsulation
  2.  PolyMorphism and
  3.  Inheritance.

Let us learn about each concept


It means binding the Code and Data together; encapsulation provides security to data.

C# basic unit of encapsulation is Class, C# uses a class specification to consrtuct objects. Objects are instances of the class. Code and data are memebers of the class, the data defined in the class is field.


According to greek meaning it is "manyforms". We can describe polymorphism based on programing language like this. "Method name is same but its signature is different", it means same method name we can use more than one time within a class but its signature should be different. Signature is nothing but type of parameters or number of  parameters  passing to that method.


method name(signature)



For example, You drive an vehicle, which has properties like wheel size, engine size, gas tank size, and other properties. The automobile you drive is a concrete implementation of the automobile interface. It has additional features, like sliding doors, logo type, cd changer slot count, moon roof lever location, or other various properties that are specific to the make/model of the vehicle.

In OO programming, Vehicle would be the base class, and each vehicle manufacturer would have its own implementation. For instance, Maruti has K-series engine technology, which is its own implementation. Volvo uses diesel engines, which is the TDI technology. More importantly, you may add a feature in the vehicle and  implement make/model implementation, such as Car, Truck, or Suv etc.

  • Polymorphism helps in decreasing the complexity of program.


It means "Reusability". Inheritence is the process by which one object can import the properties of another object.

We can achive the reusability using hierarchies, if we will not use hierarchies then each object would have to explicitly  defines all of its characteristics (spcific and general characteristics). By using inheritance process  an object need only to define those qualities that make it special within its class. It can inherit its general characteristics form parent or base class object.

The concept of inheritance is used to make things from general to more specific e.g. take Animal is the general class in that we can classify animals as Mammal and Reptile () these are two derived classes of super classs Animal and dog  is a child class for both  Mammal and Animal classes .

C# is a complete Object Oriented Programming language from Microsoft that is inherently supported in .NET. Lets learn about C# now.

C# sample  program

Create a sample.cs file in Notepad and write following code.


using System;

class sample


static void Main()


Console.WriteLine("Hello World !");




Now open the Visual Studio Command Prompt and write following line of code.

C:\> Csc sample.cs

You should be get a .exe file named sample.exe. Run this exe file by double clicking and you will see a console window opens and write the text "Hello World!" Press Enter key and that window closes.

Now let me define each line of statement one by one.

static void Main(): 

static:  a method that is declared with static keyword that method is called before an object of its class has been created.

void: it means the Main() method doesn't return a value.

In the above program if you type "main and writeline" insted of "Main and WriteLine" then compile time errors will occur. Because C# is case sensitive language and you will be forced to use the method or class name the way it has been defined in C#.

To print the result in console application Console.WriteLine(" Hello World !") is used and in web application Response.WriteLine("Hello World !") is used. In C#, all variables must be declared before they are used.

C# keywords

Keywords determines the features built in the language. C# has two types of keywords reserved and contextual keywords. The reserved keywords cannot be used as names for variables, classes and methods.

The Contextual keywords are those that have a special meanings. In special cases they act as keywords.

C# Reserved keywords

abstract as base bool break
byte case catch char checked
class const continue decimal deafult
delegate do double else enum
event explicit extern false finally
fixed float for foreach goto
if implicit in int interface
internal is lock long namespace
new null object operator out
override params private protected public
readonly ref return sbyte sealed
short sizeof stackalloc static string
struct switch this throw true
try typeof unit ulong unchecked
unsafe ushort using virtual volatile
void while

C# Context keywords

add dynamic from get global
group into join let orderby
partial remove select set value
var where yeild


An identifier is a name assigned to a variable name, method name  or any userdefined names. Identifiers may start with Underscore (_) but should not start with a digit.  Reserved keywords of C# can be used as an identifier if it preceded by "@" otherwise not.

ex: "@for" is identifier

      "for"  is not a identifier

Reference: I have given above information from the C# 4.0 Complete reference book that I am going through.

Hope this article was useful. Do let me know your comment or feedback.

ASP.NET Dynamic Data - a boon for developers

With the rate of changes/ additions of features in the .Net framework, many of very good features don't get the deserved attention.  Especially on the ASP.NET front, there have been many such features haven't caught the eye of developer. Dynamic data which was introduced with ASP.Net 3.5 (SP 1) is one of such cool new addition in the archery of ASP.Net. 

Precisely ASP.NET dynamic data provides a framework which enables quick building of functional data driven application that are based on Microsoft ORM i.e. LINQ TOSQL or Entity framework data model. It has added smart validation and ability to change the display with templates to DetailsView, FormView, GridView, and ListView controls. As per Microsoft, the dynamic data framework enables major usability and RAD development changes to work with data model. The LINQTOSQL or EF can be registered with dynamic data to result into a fully functional web site. It supports all CRUD operations. We will explore dynamic data website with .NET framework 4.0.


Let's start a small demonstration (employing Entity Framework) step by step. 
Environment: VS 2010, SQL Server 2008 with "AdventureWorks" database 

Read More....

Thursday, July 21, 2011

Creating Dynamic Menu in ASP.Net


To create a dynamic menu for the website we would use ASP Menu Control, we can't bind a Menu control directly to database data. Neither the SqlDataSource nor ObjectDataSource controls implement the IHierachicalDataSource interface. Therefore, if we want to represent database data with the Menu control, we need to perform some more work i.e. build the menu items programmatically in the Menu control. This is the approach followed here.

Imagine that you want to represent the contents of the database table with a

Menu control:

This database table represents menu items. The menu items are nested with the help Of the Parent column. For example, the customer menu item is nested under the User management as shown similarly the further nesting can also be done. 

LISTING 1.1 MenuDatabase.aspx


protected void Page_Load(object sender, EventArgs e)


        #region Page-Load-Code


                if (!Page.IsPostBack)





Like Us On Facebook and Receive All Updates!

You can also receive Free Email Updates:

Powered By Tutorails