Monday, December 23, 2013

Apple iPhone Application Development - Initial Steps

Apple iPhone Application Development - Initial Steps

Today, Apple iPhone application development is in full swing and iPhone developers are in great demand. In order to develop iPhone apps, you should be a good Objective C developer. If you have good grip on C++, OOPS Concepts, I can guarantee you that you can learn Objective C easily and quickly and can start building your iPhone apps. There are a lot of iPhone apps development tutorials available on the internet and very good iPhone apps development community on the stackoverflow, so you will not feel alone if you stuck anywhere while iPhone app development. Today, companies are hiring a lot of iPhone app developers for building their iPhone apps. XCode is the full featured tool which eases your iPhone app development to a large extent. A lot of demos, sample codes, sample applications are available on the internet which can fulfil your basic iPhone app functionalities. So, I am just giving the initial steps which you should take while iPhone app development.

Step 1: Think of a good idea

Have a unique idea for an iphone app? So what makes an app stand out?  Why would anyone want to use your app?  Why would they pay money for it if you are going to charge?

Be sure to check that there aren’t other apps that do the same thing that you are proposing. Or if you want to create something better than an app that already exists, think about how your idea will be better.  Draw it out on paper or on the computer.

Step 2: Get A Mac

The iPhone is an Apple product and uses a variation of the Mac OS. Currently, the iPhone development tools are only available for Mac users. You can buy a Mac mini relatively cheaply if you don’t have a Mac at your disposal.

Step 3: Register As An Apple Developer

To work with the Mac tools, you will need to become an official Apple Developer. Registration is free so you simply have to give them your information and agree to their terms.  You only need to register once, and you are able to use the same username and password used for your iTunes account. Once you are an Apple Developer, you can develop iPhone apps for any of the Mac products.

Step 4:  Download The Software Development Kit For iPhone (SDK)

Once you are an official developer, you can download the SDK for iPhone.  The version you need depends on the OS you are currently running.  This download is HUGE because it comes with all sorts of documentation, sample codes, and all sorts of things you will be glad to have later on. It could take a few hours, so you might want to start the download, put in a good movie, and wait.

Step 5: Download XCode

If you don’t already have it, download XCode.  According to Apple, “Xcode is a complete, full-featured IDE built around a smooth workflow that integrates the editing of source code, with the build and compile steps, through to a graphical debugging experience – all without leaving the view of your source code.”  This is another huge download, so you might want to rent a second movie.

Step 6: Develop Your iPhone App With The Templates In The SDK

Once you have your app drawn out on paper or in Photoshop, you can start designing it with the templates provided in the SDK.  This is where that HUGE amount of download time will be a huge benefit.  You will have lots of templates to choose from, and there are a lot of great YouTube clip tutorials on how to use the templates effectively.

Step 7: Learn Objective-C For Cocoa

If you love programming languages, you will love Objective-C.  If you don’t know how to program, this is the part that can get pretty sticky, so you might want to find a programmer friend or hire someone.  It really does help to get a book, too, for reference.

Step 8: Program Your App In Objective-C

Once you at least understand the basics of Objective-C (or at least know how to find answers to programming questions), you are ready to program your app.  It helps to take screenshots as you go along so you can remember what you tried.  Some apps can take just a few hours to program while other Apps can take months. Only you know how much detail you want out there for its maiden voyage in the App Store!

Step 9: Test The App In The iPhone Simulator

The SDK comes with a lovely iPhone Simulator.  You will need to load up your app and do your own testing.  You should try to work out as many bugs as possible and think about all the ways someone might use your app.

Step 10: Host A Bake Sale

Remember when I told you in the fine print that you would have to raise some cash?  This is that moment.  Sadly, loading an app into iTunes costs a one time member fee of $99 (USD).  There is no way out of this fee, but you might earn it back in triplicate if your app is worthy!  Truly though, you DO get a lot for your $99. For one, you get access to some of the coolest people on this side of Pluto!

Step 11: Have Others Test Your App

Once you pay your fee, you will be able to have others in the app community test your app and help you work out final bugs.  This is a great community, and testing new stuff is lots of fun. If you are a newbie like me, you will be in awe of the kings and queens of geeky stardom. Depending on the nature and complexity of your app, this process can take some time.

Step 12: Submit Your App For Approval

After testing your app in the community and working out all the bumps, you can submit the app to iTunes for approval.  You will be able to upload it right from the community.  The process of approval can take some time, so be patient!

Step 13: Watch The Dough & Traffic Roll In!

If you created a paid app, just wait for the money to roll in to shore. If you created a free app, watch the traffic!

ASP.NET Fundamentals: 7 Pillars of ASP.NET: A Basic Interview Question

ASP.NET Fundamentals: 7 Pillars of ASP.NET: A Basic Interview Question

If you are preparing for ASP.NET interview, must be ready for basic ASP.NET interview question "What are the Pillars of ASP.NET?" Pillars of ASP.NET means the fundamentals of ASP.NET like .NET Framework, CLS, CTS, MSIL, JIT, Object Oriented Concepts, Assemblies, DLLs, XCopy Deployment etc. I have listed down 7 Pillars of ASP.NET in detail.

7 Pillars of ASP.NET:

When ASP.NET was first released, there were seven key facts that differentiated it from previous Microsoft products and competing platforms. If you’re coming to ASP.NET from another web development platform, or you’re an old-hand .NET coder who has yet to try programming for the Web, these sections will quickly give you a bit of ASP.NET insight.


The .NET Framework is divided into an almost painstaking collection of functional parts, with tens of thousands of types (the .NET term for classes, structures, interfaces, and other core programming ingredients). 


ASP.NET applications, like all .NET applications, are always compiled. In fact, it’s impossible to execute C# or Visual Basic code without it being compiled first. 


No matter what language you use, the code is compiled into MSIL. MSIL is a stepping stone for every managed application. 


Perhaps the most important aspect of the ASP.NET engine is that it runs inside the runtime environment of the CLR. The whole of the .NET Framework—that is, all namespaces, applications, and classes—is referred to as managed code. Basic features of CLR are:

A) Automatic memory management and garbage collection
B) Type safety
C) Extensible metadata
D) Structured error handling
E) Multithreading


ASP.NET is truly object oriented. Not only does your code have full access to all objects in the .NET Framework, but you can also exploit all the conventions of an OOP (object-oriented programming) environment. 


ASP.NET addresses the problem of cross browser compatibility in a remarkably intelligent way. Although you can retrieve information about the client browser and its capabilities in an ASP.NET page, ASP.NET actually encourages developers to ignore these considerations and use a rich suite of web server controls. These server controls render their markup adaptively by taking the client’s capabilities into account. 


Every installation of the .NET Framework provides the same core classes. As a result, deploying an ASP.NET application is relatively simple. For no-frills deployment, you simply need to copy all the files to a virtual directory on a production server (using an FTP program or even a command-line command like XCOPY). 

ASP.NET Fundamentals: ASP.NET is integrated with the .NET Framework

ASP.NET Fundamentals: ASP.NET is integrated with the .NET Framework

The .NET Framework is divided into an almost painstaking collection of functional parts, with tens of thousands of types (the .NET term for classes, structures, interfaces, and other core programming ingredients). Before you can program any sort of .NET application, you need a basic understanding of those parts—and an understanding of why things are organized the way they are. The massive collection of functionality that the .NET Framework provides is organized in a way that traditional Windows programmers will see as a happy improvement. Each one of the thousands of classes in the .NET Framework is grouped into a logical, hierarchical container called a namespace. Different namespaces provide different features. Taken together, the .NET namespaces offer functionality for nearly every aspect of distributed development from message queuing to security. This massive toolkit is called the class library.

Interestingly, the way you use the .NET Framework classes in ASP.NET is the same as the way you use them in any other type of .NET application (including a stand-alone Windows application, a Windows service, a command-line utility, and so on). Although there are Windows-specific and web-specific classes for building user interfaces, the vast majority of the .NET Framework (including everything from database access to multithreaded programming) is usable in any type of application. In other words, .NET gives the same tools to web developers that it gives to rich client developers.

Tip: One of the best resources for learning about new corners of the .NET Framework is the .NET Framework class library reference, which is part of the MSDN Help library reference. If you have Visual Studio 2012 installed, you can view the MSDN Help library by clicking the Start button and choosing Programs ➤ Microsoft Visual Studio 2012 ➤ Microsoft Visual Studio 2012 Documentation (the exact shortcut depends on your version of Visual Studio). 

ASP.NET Fundamentals: ASP.NET supports all Browsers

ASP.NET Fundamentals: ASP.NET supports all Browsers

One of the greatest challenges web developers face is the wide variety of browsers they need to support. Different browsers, versions, and configurations differ in their support of XHTML, CSS, and JavaScript. Web developers need to choose whether they should render their content according to the lowest common denominator, and whether they should add ugly hacks to deal with well-known quirks on popular browsers.

ASP.NET addresses this problem in a remarkably intelligent way. Although you can retrieve information about the client browser and its capabilities in an ASP.NET page, ASP.NET actually encourages developers to ignore these considerations and use a rich suite of web server controls. These server controls render their markup adaptively by taking the client’s capabilities into account. One example is ASP.NET’s validation controls, which use JavaScript and DHTML (Dynamic HTML) to enhance their behavior if the client supports it. Another example is the set of Ajax-enabled controls, which uses complex JavaScript routines that test browser versions and use carefully tested workarounds to ensure consistent behavior. These features are optional, but they demonstrate how intelligent controls can make the most of cutting-edge browsers without shutting out other clients. Best of all, you don’t need any extra coding work to support both types of client.

ASP.NET Fundamentals: ASP.NET is Easy to Deploy and Configure

ASP.NET Fundamentals: ASP.NET is Easy to Deploy and Configure

One of the biggest headaches a web developer faces during a development cycle is deploying a completed application to a production server. Not only do the web-page files, databases, and components need to be transferred, but components need to be registered and a slew of configuration settings need to be re-created. ASP.NET simplifies this process considerably.

Every installation of the .NET Framework provides the same core classes. As a result, deploying an ASP.NET application is relatively simple. For no-frills deployment, you simply need to copy all the files to a virtual directory on a production server (using an FTP program or even a command-line command like XCOPY). As long as the host machine has the .NET Framework, there are no time-consuming registration steps. Chapter 18 covers deployment in detail.

Distributing the components your application uses is just as easy. All you need to do is copy the component assemblies along with your website files when you deploy your web application. Because all the information about your component is stored directly in the assembly file metadata, there’s no need to launch a registration program or modify the Windows registry. As long as you place these components in the correct place (the Bin subdirectory of the web application directory), the ASP.NET engine automatically detects them and makes them available to your web-page code. Try that with a traditional COM component!

Configuration is another challenge with application deployment, particularly if you need to transfer security information such as user accounts and user privileges. ASP.NET makes this deployment process easier by minimizing the dependence on settings in IIS (Internet Information Services). Instead, most ASP.NET settings are stored in a dedicated web.config file. The web.config file is placed in the same directory as your web pages. It contains a hierarchical grouping of application settings stored in an easily readable XML format that you can edit using nothing more than a text editor such as Notepad. When you modify an application setting, ASP.NET notices that change and smoothly restarts the application in a new application domain (keeping the existing application domain alive long enough to finish processing any outstanding requests). The web.config file is never locked, so it can be updated at any time.

ASP.NET Fundamentals: ASP.NET is Object-Oriented Language

ASP.NET Fundamentals: ASP.NET is Object-Oriented Language

ASP provides a relatively feeble object model. It provides a small set of objects; these objects are really just a thin layer over the raw details of HTTP and HTML. On the other hand, ASP.NET is truly object oriented. Not only does your code have full access to all objects in the .NET Framework, but you can also exploit all the conventions of an OOP (object-oriented programming) environment. For example, you can create reusable classes, standardize code with interfaces, extend existing classes with inheritance, and bundle useful functionality in a distributable, compiled component.

One of the best examples of object-oriented thinking in ASP.NET is found in server-based controls. Server-based controls are the epitome of encapsulation. Developers can manipulate control objects programmatically using code to customize their appearance, provide data to display, and even react to events. The low-level HTML markup that these controls render is hidden away behind the scenes. Instead of forcing the developer to write raw HTML manually, the control objects render themselves to HTML just before the web server sends the page to the client. In this way, ASP.NET offers server controls as a way to abstract the low-level details of HTML and HTTP programming.

Here’s a quick example with a standard HTML text box that you can define in an ASP.NET web page:

<input type="text" id="myText" runat="server" />

With the addition of the runat="server" attribute, this static piece of HTML becomes a fully functional server-side control that you can manipulate in C# code. You can now work with events that it generates, set attributes, and bind it to a data source. For example, you can set the text of this box when the page first loads using the following C# code:

void Page_Load(object sender, EventArgs e)
{
  myText.Value = "Hello World!";
}

Technically, this code sets the Value property of an HtmlInputText object. The end result is that a string of text appears in a text box on the HTML page that’s rendered and sent to the client.

HTML Controls VS. Web Controls

When ASP.NET was first created, two schools of thought existed. Some ASP.NET developers were most interested in server-side controls that matched the existing set of HTML controls exactly. This approach allows you to create ASP.NET web-page interfaces in dedicated HTML editors, and it provides a quick migration path for existing ASP pages. However, another set of ASP.NET developers saw the promise of something more—rich server-side controls that didn’t just emulate individual HTML tags. These controls might render their interface from dozens of distinct HTML elements while still providing a simple objectbased interface to the programmer. Using this model, developers could work with programmable menus, calendars, data lists, validators, and so on.

After some deliberation, Microsoft decided to provide both models. You’ve already seen an example of HTML server controls, which map directly to the basic set of HTML tags. Along with these are ASP.NET web controls, which provide a higher level of abstraction and more functionality. In most cases, you’ll use HTML server-side controls for backward compatibility and quick migration, and use web controls for new projects.

ASP.NET web control tags always start with the prefix asp: followed by the class name. For example, the following snippet creates a text box and a check box:

<asp:TextBox id="myASPText" Text="Hello ASP.NET TextBox" runat="server" />
<asp:CheckBox id="myASPCheck" Text="My CheckBox" runat="server" />

Again, you can interact with these controls in your code, as follows:

myASPText.Text = "New text";
myASPCheck.Text = "Check me!";

Notice that the Value property you saw with the HTML control has been replaced with a Text property. The HtmlInputText.Value property was named to match the underlying value attribute in the HTML <input> tag. However, web controls don’t place the same emphasis on correlating with HTML syntax, so the more descriptive property name Text is used instead.

The ASP.NET family of web controls includes complex rendered controls (such as the Calendar and TreeView), along with more streamlined controls (such as TextBox, Label, and Button), which map closely to existing HTML tags. In the latter case, the HTML server-side control and the ASP.NET web control variants provide similar functionality, although the web controls tend to expose a more standardized, streamlined interface. This makes the web controls easy to learn, and it also means they’re a natural fit for Windows developers moving to the world of the Web, because many of the property names are similar to the corresponding Windows controls.

ASP.NET Fundamentals: ASP.NET is Hosted by the Common Language Runtime

ASP.NET Fundamentals: ASP.NET is Hosted by the Common Language Runtime

Perhaps the most important aspect of the ASP.NET engine is that it runs inside the runtime environment of the CLR. The whole of the .NET Framework—that is, all namespaces, applications, and classes—is referred to as managed code. Though a full-blown investigation of the CLR is beyond the scope of this blog post, some of the benefits are as follows:

Automatic memory management and garbage collection: Every time your application instantiates a reference-type object, the CLR allocates space on the managed heap for that object. However, you never need to clear this memory manually. As soon as your reference to an object goes out of scope (or your application ends), the object becomes available for garbage collection. The garbage collector runs periodically inside the CLR, automatically reclaiming unused memory for inaccessible objects. This model saves you from the low-level complexities of C++ memory handling and from the quirkiness of COM reference counting.

Type safety: When you compile an application, .NET adds information to your assembly that indicates details such as the available classes, their members, their data types, and so on. As a result, other applications can use them without requiring additional support files, and the compiler can verify that every call is valid at runtime. This extra layer of safety completely obliterates whole categories of low-level errors.

Extensible metadata: The information about classes and members is only one of the types of metadata that .NET stores in a compiled assembly. Metadata describes your code and allows you to provide additional information to the runtime or other services. For example, this metadata might tell a debugger how to trace your code, or it might tell Visual Studio how to display a custom control at design time. You could also use metadata to enable other runtime services, such as transactions or object pooling.

Structured error handling: .NET languages offer structured exception handling, which allows you to organize your error-handling code logically and concisely. You can create separate blocks to deal with different types of errors. You can also nest exception handlers multiple layers deep. 

Multithreading: The CLR provides a pool of threads that various classes can use. For example, you can call methods, read files, or communicate with web services asynchronously, without needing to explicitly create new threads.