Learning Adventure
Become a Mobile Developer
Mobile developers create software applications (apps) for mobile devices like phones and tablets. In this Learning Adventure, we'll start with a introduction to programming concepts that are common across many languages and platforms. Then we'll take off running with iOS app development by building a simple crystal ball iPhone app that can predict the future! We'll follow up with a blog reader iPhone app that uses external data sources. Key to the success of any app is a multi-platform approach, so we'll also learn how to create the same crystal ball and blog reader apps on the popular Android platform. Please note: iOS apps can only be built on a Mac computer, and not a PC.
- Things You'll Learn
- Programming
- Objective-C
- iPhone App Development
- Java
- Android App Development
4 badges • 9 videos
-
Overview
Introduction to Programming
Basic programming skills are essential for all web professionals, including designers. Many programming languages share a common set of concepts, which will be covered in this course.
-
Step 1
Basics
Computer programming can be intimidating at first, but this gentle introduction to the subject will make the learning curve a bit easier to climb.
-
Step 2
Control Structures
Control structures determine the flow of execution within an application. A conditional statement can fork the execution down several paths or a loop can execute the same code several times until a condition is met.
-
Step 3
Objects and Arrays
An array is a way of storing multiple items and each item is associated to a number called the index. Each item can be accessed using the index value. Objects are usually associated to meaningful pieces of data which it can hold and manipulate.
-
Step 4
Functions
A function contains a piece of code that needs to be executed several times from different parts of your application. A function optionally takes in arguments and returns an object or value as a result.
6 badges • 22 videos
-
Overview
Build a Simple iPhone App
This simple app will introduce the Objective-C language, Xcode, and some very basic concepts in the iOS SDK. By the end, students will learn how to build a simple iPhone app that responds to touch and motion events with a nice animation.
-
Step 1
Getting Started with iPhone
Learn to create an iPhone app without any prior programming experience. Get a taste of the programming language Objective-C and get familiar with the tool known as Xcode. Learn how to use Xcode by adding controls to create a simple app.
-
Step 2
Learning the Language
Learning a programming language is like learning a foreign language, it has rules and constructs. Learn about some of the constructs in the programming language Objective-C, like the distinction between classes and objects, strings and arrays, properties and methods.
-
Step 3
Making It Pretty
An app without design is no app at all. Learn how to spruce up your app with design elements like adding a background image for our entire Crystal Ball app and customizing the button.
-
Step 4
Shaking Things Up
The iPhone has two remarkable built-in sensors which detect motion and acceleration. Learn how to use these sensors to add features to the Crystal Ball app. In addition, learn to use the touch gestures and eliminate the use of a button.
-
Step 5
Animate This
Animations are a great way to make an app stand out. There are several animation techniques like animating a series of images using an UIImageView or simple view animations based on view properties.
-
Step 6
Share Your Creation
Prior to submitting an app to the App Store it must be tested on an actual device and then checked for memory leaks. Once ready there are several steps to be taken to deploy it to the App Store such as: provisioning profiles, iTunes Connect setup, archival and submission of binaries.
6 badges • 22 videos
-
Overview
Build a Blog Reader iPhone App
The Blog Reader app will teach us one of the most common and important needs when creating an app: downloading data from the Internet and displaying it in a list. We will investigate the Model-View-Controller design pattern (MVC) that is essential for all iPhone apps, learn how to request data from the web, parse and use information in JSON format, and utilize the built-in UITableViewController to display a list of blog post titles and thumbnails. We'll also see how to display a webpage inside our app.
-
Step 1
Exploring the Master-Detail Template
Xcode’s Master-Detail template makes it easy to create an app that displays a list view along with a detail view. We will look at all the code generated by the template and learn about table view controller, delegate and datasource.
-
Step 2
Rebuilding from Scratch
Time to ditch the template code and recreate the master-detail app from scratch. Rebuilding allows us to learn the fundamental design pattern known as Model-View-Controller (MVC). In addition, we will learn about the view controller lifecycle and how to connect view elements on the storyboard to our code.
-
Step 3
Getting Data from the Web
Learn how data can be requested from a web service, parsed and then stored. We will learn how to access data in the JSON format which involves downloading and parsing it. Once parsed, the data needs to be stored in a collection object such as a dictionary.
-
Step 4
Data Modeling
The advantage of object-oriented programming is the ability to model your data after real-world objects. Parsing the JSON data gave us a better understanding of its structure. We can now create a custom class to represent an individual blog post. The custom class will serve as a concrete representation of a blog post and will make our code manageable and readable.
-
Step 5
Adapting Data for Display
The downloaded data needs to be neatly displayed in the table view. Each row will show the blog post title, author and thumbnail, which involves customizing the table view cell to accommodate all three elements.
-
Step 6
Viewing a Web Page
Upon selecting a blog post from the list, the user is taken to a detail view where they can read the entire blog post. The blog post is simply a web page displayed with the help of a special view known as a web view of the class UIWebView.
6 badges • 30 videos
-
Overview
Build a Simple Android App
This simple app will introduce the Java language, Eclipse, and some very basic concepts in the Android SDK. By the end, students should know how to build a simple app with touch and motion events, and animations.
-
Step 1
Getting Started with Android
Making an Android app is easier than you think, and we'll show you how! Learn how to set up and use a few free tools to make a simple Crystal Ball app that you can test on your computer. You don't even need an Android phone!
-
Step 2
Learning the Language
Android apps are typically written in a programming language called Java. In this stage we'll introduce you to Java and some of the basic concepts of programming like variables, arrays, and "if" statements. We'll also touch on some of the key principles of object-oriented development.
-
Step 3
Pretty Little Things
It's important that an app performs its functions well, but it's also important that users like it and want to use it. Learn how to spruce up the visual aspects of the Crystal Ball app by using images, animations, View customizations, and sounds.
-
Step 4
Shaking Things Up
We want our app to be fun and engaging, so in this stage we'll show you how to add code to detect when you shake your phone. Then we'll show how to display an answer as a result of that shake. And since shaking involves an actual phone, we'll show you how to run your app on a real device.
-
Step 5
Interrogating the App
We can't always see what's going on behind the scenes of our app, so in this stage we'll show you how to use a few tools to monitor how the Crystal Ball app is working and to troubleshoot problems.
-
Step 6
Sharing Your Creation
At this point you will have built an awesome app, so now it's time to show it off! We'll show you how to share it with friends and submit it to Google Play and the Amazon App Store.
5 badges • 24 videos
-
Overview
Build a Blog Reader Android App
The Blog Reader app will teach us one of the most common and important uses of an Android app: downloading data from the Internet and displaying it in a list. We will investigate the Model-View-Controller design pattern that is essential for all Android apps, learn how to request data from the web, parse and use information in JSON format, and utilize the built-in Android ListActivity and adapter. We'll also see how to display a webpage inside our app.
-
Step 1
Exploring the Master-Detail Template
Included in Eclipse are a few Android project templates that can help us get started quickly with certain types of apps. In this stage we'll learn how the Master-Detail Template works, and we'll talk about the Model-View-Controller design pattern that is behind many Android applications.
-
Step 2
Rebuilding from Scratch
Using templates is great for getting started quickly, but to truly understand how to build something we should do it from scratch. In this stage we'll start with a blank project and use the Android system components for displaying data in a list. We'll see first-hand how to build the components of the Model-View-Controller pattern we talked about in the last stage.
-
Step 3
Getting Data from the Web
Now that we're comfortable displaying simple data in a ListView, let's take a look at how to connect to a website and request some data. This stage will cover how to establish that kind of connection and then use an AsyncTask in a separate thread of execution to retrieve data. We'll also see how to parse through the JSON data returned from the blog, and along the way we'll cover Java Exceptions and how to detect and handle them.
-
Step 4
Adapting Data for Display in a List
Now that we've connected to the Treehouse Blog and retrieved data in JSON format, let's take a look at how to adapt that data for display in our ListView. We'll first adapt titles using an ArrayAdapter, we'll add some code to manage the user interface while our web request is running, add an AlertDialog in case of errors, and then we'll add author information using a more complex adapter called SimpleAdapter.
-
Step 5
Using Intents to Display and Share Posts
Our list of blog posts looks nice and everything is working well behind the scenes, but nothing happens when the user taps on an item in the list. In this stage we'll add a listener for such a tap using the 'onListItemClick()' method and talk about a few different Intents we can use for different actions. First, we'll use an Intent to open the URL of the post in the browser, but then we'll add a second Activity to open the URL within our app and display it in a WebView. Finally we'll let users easily share the link however they want using the simple Share Intent.
The Finish Line!
If you've made it this far, congratulations! If you think you're up for it, why not check out the related bonus content or take on another Learning Adventure?
Related Bonus Content
-
Bonus Video
Getting Started with Android
20 minutes 31 seconds
-
Bonus Video
What's It Like to be an iPhone Developer? - with Jeff LaMarche
31 minutes 26 seconds
-
Bonus Video
How to Design Elegant Mobile Interfaces - with Dave Wiskus
16 minutes 34 seconds
-
Bonus Video
Insights into Mobile Design, Analytics and Managing a Team - with Jonathan Ozeran
22 minutes 30 seconds
-
Bonus Series
HTML5 Mobile Web Applications
Learn how to build a mobile HTML5 web app that will work across multiple devices, from start to finish using canvas, localStorage and video.