Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
In this video we'll review what we'll cover in this course along with a discussion of the challenges of mobile development.
New Terms:
- iOS -- Apple's mobile operating system for iPhone and iPad devices.
- Android -- An open source operating system used for smartphones and tablets
- IDE -- Integrated development environment
- API -- Application programming interface
- Objective-C -- Object oriented language used by iOS
- Swift -- A general purpose programming language developed by Apple for iOS
- Java -- A general purpose programming language which is used for Android development
- C# -- A general purpose object oriented programming language developed by Microsoft
- Cordova/PhoneGap -- An application programming platform that uses JavaScript contained in a hybrid mobile app
- React Native -- A native app that uses JavaScript for the user interface and business logic
Further Reading:
Mobile device market share
List of iOS Devices
List of Android operating systems
Xamarin vs Native vs Hybrid article
Cross Platform Development Choices:
- Native is the most straightforward way to build an app but you need to understand each platform and the language it uses as well as the platform specific IDE.
- Xamarin give us native performance and controls using a single IDE and language. There are also many ways to reuse your code across platforms.
- Xamarin.Forms is a framework using Xamarin to build cross platform apps that implements many of the native controls in a platform agnostic way so we can build the interface once and it will work on all platforms. Since Xamarin.Forms uses XAML and databinding we can get a huge about of code reuse with this solution.
- Hybrid solutions like Cordova/PhoneGap using a small native app with a webview that displays HTML. The hybrid solution is very appealing and can be quickly developed but it fails on performance, maintainability, and end product quality. There are dozens of good articles on this subject.
- React Native is a framework that which uses JavaScript to interact with the native platform and render native controls. An advantage of React Native is the ability to push new updated JavaScript to our app without going through the app store review process.
[MUSIC]
0:00
Building mobile apps is an amazing
field of software development,
0:04
because it's growing so quickly,
and changing so rapidly.
0:08
While this may be exciting,
it also introduces some challenges for
0:12
us as developers.
0:16
The first challenge we face is on which
platform should our app be developed.
0:16
Currently iOS and
Android are the best choices.
0:22
Although Windows and
Linux should not be ignored.
0:25
We'll focus just on iOS and
Android in this course.
0:28
If you choose iOS,
then you'll need to use Xcode and
0:32
learn either Objective-C or Swift.
0:35
If you choose Android, you'll need to
choose one of many IDEs and learn Java.
0:39
Taking these one at a time,
it seems reasonable, but if we wanna
0:44
reach the largest number of users, we
should develop for both iOS and Android.
0:49
The problem is, it will double our
development cost to build the same app
0:54
on two very different platforms.
0:58
Using Xamarin we can build our app using
Visual Studio, a powerful ID and C#.
1:01
Because we are using one language,
1:08
we can share a large portion
of our code between platforms.
1:10
We will be discussing how this can
be done throughout this course.
1:14
Even if we decided to develop for
1:19
one platform, the second challenge
comes from fragmentation of devices.
1:20
As I said, mobile development
is a quickly growing and
1:26
changing environment which caused an
explosion of devices for both platforms.
1:29
iOS is less challenging because
Apple aggressively pushes
1:34
updated operating systems and
has relatively few form factors.
1:38
Also, because Apple pushes updates,
we must build and
1:43
deploy our app every year or
get left behind.
1:47
Android is another story altogether.
1:52
The individual device manufacturers
decide which OS version to use and
1:54
don't need to update them.
1:59
So as developers, we must develop for
many Android versions.
2:02
Also, device manufacturers can
modify their versions of the OS for
2:06
their devices.
2:11
There are also no defined form factors for
Android devices, so they range in size and
2:12
performance all across the spectrum.
2:17
Xamarin does not directly solve this
problem, but having shared code and
2:20
an abstraction layer over API
changes makes maintenance easier.
2:25
The third challenge is to
develop our app so it looks and
2:31
responds well on either platform.
2:34
If we develop a native app for
both platforms, we'll need an expert for
2:37
each to make sure they run effectively,
2:41
because both platforms use very different
frameworks, libraries, and patterns.
2:44
Xamarin uses an obstruction layer
2:50
that smooths out many of
the API fragmentation issues.
2:52
And to their credit,
Xamarin has had support for
2:56
each operating system on
the day it was released.
2:59
This course will cover the basics to start
building an app with the Xamarin platform.
3:03
At the end of the course,
you'll have a simple app and
3:08
the skills to make your own.
3:11
Now that we've discussed some of
the challenges of mobile development,
3:14
we'll discuss how Xamarin works, so
you know what happens behind the scenes.
3:17
Then we'll use a solution
template to start our basic app.
3:23
Once we have the project created,
we'll customize it for Android and iOS.
3:27
We'll also need to set up our development
environments for iOS and Android.
3:33
Finally we'll re-factor our app to share
code and discuss code sharing patterns.
3:37
As we learn the basics
of Xamarin development,
3:45
we'll build a simple PC calculator app.
3:48
We all have been in the situation
where we are asked to order pizzas for
3:50
a large party and
we have to guess how many to buy.
3:53
We'll build our mobile app to help us
calculate how many pizzas we'll need.
3:56
As you can see here,
I have the IOS version in the app,
4:01
where I can enter the number of people and
calculate the number of pizzas required.
4:04
Then I can call my local pizza
parlor to place the order.
4:09
Since I'm using an emulator,
it will not make a call, but
4:14
it shows a message to let
me know it's working.
4:17
You need to sign up for Treehouse in order to download course files.
Sign up