Mobile Systems and Application - Mobile Application Development
Document Details
Uploaded by Deleted User
Tags
Summary
This document provides an introduction to mobile applications, with a focus on Android and iOS. It covers various aspects, including app types, functionality, and software development.
Full Transcript
MOBILE SYSTEMS AND APPLICATION Mobile Application Development INTRODUCTION TO MOBILE APPLICATION PRELIM WEEK 1 WHAT IS MOBILE APP? A mobile application (also called a mobile app) is a type of application designed to run on a mobile device, which can be a smartphone or tablet c...
MOBILE SYSTEMS AND APPLICATION Mobile Application Development INTRODUCTION TO MOBILE APPLICATION PRELIM WEEK 1 WHAT IS MOBILE APP? A mobile application (also called a mobile app) is a type of application designed to run on a mobile device, which can be a smartphone or tablet computer. Even if apps are usually small software units with limited function, they still manage to provide users with quality services and experiences. Contrary to applications designed for desktop computers, mobile applications move away from integrated software systems. Instead, each mobile app provides an isolated and limited functionality. For example, it can be a game, a calculator, or a mobile web browser. Because of the limited hardware resources of the early mobile devices, mobile apps avoided multi-functionality. However, even if the devices used today are far more sophisticated, mobile apps remain narrowly functional. This is how mobile app owners allow consumers to handpick exactly the functions their devices should have. ANDROID Android is an open source and Linux-based Operating System for mobile devices such as smartphones and tablet computers. Android was developed by the Open Handset Alliance, led by Google, and other companies. Android offers a unified approach to application development for mobile devices which means developers need only develop for Android, and their applications should be able to run on different devices powered by Android. The first beta version of the Android Software Development Kit (SDK) was released by Google in 2007 where as the first commercial version, Android 1.0, was released in September 2008. On June 27, 2012, at the Google I/O conference, Google announced the next Android version, 4.1 Jelly Bean. Jelly Bean is an incremental update, with the primary aim of improving the user interface, both in terms of functionality and performance. The source code for Android is available under free and open source software licenses. Google publishes most of the code under the Apache License version 2.0 and the rest, Linux kernel changes, under the GNU General Public License version 2. DIFFERENCE BETWEEN IOS AND ANDROID 1. iOS : iOS is a mobile operating system which is provided by Apple Incorporation. It is mainly designed for Apple mobile devices like iPhone and iPod Touch. It was earlier known as iPhone OS. It is a Unix-like operating systems which is based on Darwin(BSD) operating system. It is the world’s second most used mobile operating system after Android. It is mainly written in C, C++, Objective-C, assembly language and Swift. The first version of iOS was launched in 2007. 2. Android : ?Android is a mobile operating system which is provided by Google LLC. It is based on the modified version of the Linux kernel and other open source software. It is specifically designed for touchscreen mobile devices like smartphones and tablets. It was developed using C, Java, C++ and other languages. The first version of Android was launched by Google in 2008. The latest stable version of Android is Android 10. It is provided totally free of cost. It is the most used operating system overall. Some of the differences between iOS and Android are as follows iOS is a closed system whereas Android is more open. Users have barely any system permissions in iOS but in Android, users can customize their phones easily. Android software is available for many manufacturers such as Samsung, LG etc. and this may lead to some quality problems in the cheaper phones. However, iOS is strictly controlled by Apple and there is no quality problem as there are few models. The Android applications are obtained from Google Play while iOS applications are available in the Apple app store. Integration with other devices is better in Apple iOS as compared to Google Android. There are different virtual assistants for iOS and Android namely Siri and Google Assistant. Google assistant is much more powerful than Siri. The running speed of iOS devices remains consistent with time. In contrast to this, the performance of Android devices may decline over time. THE 6 TYPES OF MOBILE APPS Productivity apps Also known as business apps, productivity apps Educational apps typically organize and complete complex tasks for Educational and informative apps do just that– you, anything from sending an email to figuring out educate and inform. While the purpose of this type the tip on your dinner bill. Examples: Wunderlist, of app is fairly straightforward, there is a lot of Square Register, Calculator. diversity when it comes to educational apps, like news and language apps. Examples: The Weather Entertainment Apps Channel, Buzzfeed, Flipboard. You may be familiar with the Amazon Kindle e- reader, but there’s also a kindle app for users that Lifestyle apps don’t have actual hardware itself. This way, more This app category covers a lot of ground, literally. people can download a book from the store and Where you’re going, how you’re getting there, what read it on their own device, significantly widening you’re going to order off the menu–it all falls under the service’s customer base. Examples: Netflix, lifestyle apps. PodcastOne, YouTube. Examples: Tripadvisor, Bumble, Zillow, Uber. Game apps This app category is pretty self-explanatory and represents the biggest portion of app downloads by Social media apps Social media apps give users the opportunity to far. With such a crowded category, it makes sense connect with people inside or outside their social that there are so many types of game apps for circles. For the most part, social media apps are different target audiences, such as arcade games, universal and have a very diverse user base. brain training puzzles, or just plain silly games, like Examples: Facebook, Pinterest, Snapchat. launching tiny birds at pigs. Examples: Subway Surfer, Sudoku, Trivia Crack. ANDROID VERSIONS LIST PROGRAMMING LANGUAGES USED IN CREATING MOBILE APPS ADVANTAGES OF USING MOBILE APPLICATIONS Staying ‘front of mind’ with customers – your app on someone’s home screen encourages them to consider and interact with your business when your service offering or product type is in their minds. Ease of access – for the user, clicking your app is far quicker and easier than accessing yours or a competitor’s website even if they’ve bookmarked it. Data capture – valuable data can be gathered from apps concerning use, activity and buying habits. Communication – it’s easier to interact with your customers and prospects with an app including the immediacy of being able to attract their attention and maybe prompt action through, for example, push notifications. Staff interaction – in business information can be passed quickly and easily to staff whether accessing an internal company portal wherever they are or for communicating with those working remotely. Productivity – can be vastly increased through app based interactions with staff and outside contractors. WHAT IS AN IDE? An integrated development environment (IDE) is software for building applications that combines common developer tools into a single graphical user interface (GUI). Android Studio is Android's official IDE. It is purpose-built for Android to accelerate your development and help you build the highest-quality apps for every Android device. Unity3D is a powerful cross- platform 3D engine and a user friendly development environment. Easy enough for the beginner and powerful enough for the expert; Unity should interest anybody who wants to easily create 3D games and applications for mobile, desktop, the web, and consoles. Solar2D (formerly Corona SDK) is a free and open-source, cross- platform software development kit originally developed by Corona Labs Inc. and now maintained by Vlad Shcherban. Released in late 2009, it allows software programmers to build 2D mobile applications for iOS, Android, and Kindle, desktop applications for Windows, Linux and macOS, and connected TV applications for Apple TV, Fire TV and Android TV. GameMaker: Studio create games from start to finish while learning game design and programming principles using the GameMaker Studio 2 game engine and GameMaker Language (GML). Game Development with GameMaker Studio 2 covers all aspects of game design and development from the initial idea to the final release, using an award- winning game engine. You learn how to create real-world video games based on classic and legendary video game genres. Each game project introduces and explains concepts of game development and design and coding principles, allowing you to build a wide set of skills while creating an exciting portfolio to kick-start a career in game development. Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft with the Electron Framework, for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. INTRODUCTION TO DART PRELIM WEEK 2 Dart is an open-source general-purpose programming language. It is originally developed by Google and later approved as a standard by ECMA. Dart is a new programming language meant for the server as well as the browser. Introduced by Google, the Dart SDK ships with its compiler – the Dart VM. The SDK also includes a utility - dart2js, a transpiler that generates JavaScript equivalent of a Dart Script. This tutorial provides a basic level understanding of the Dart programming language. DART SYNTAX Syntax defines a set of rules for writing programs. Every language specification defines its own syntax. A Dart program is composed of − Variables and Operators Classes Functions Expressions and Programming Constructs Decision Making and Looping Constructs Comments Libraries and Packages Typedefs Data structures represented as Collections / Generics YOUR FIRST DART CODE The main() function is a predefined method in Dart. This method acts as the entry point to the application. A Dart script needs the main() method for execution. print() is a predefined function that prints the specified string or value to the standard output i.e. the terminal. OUTPUT Hello World! To execute a Dart program via the terminal C:\Users\GavinJosh\Desktop> dart main.dart GET USER INPUT The stdin.readlineSync(); is a member of the dart:io package. The readlineSync(); method gets the user input. The stdin.readLineSync waits for input. It stops in its tracks and does not execute any further until it receives the user’s input. To execute a Dart program via the terminal C:\Users\GavinJosh\Desktop> dart main.dart DATA TYPES Integer − Integer values represent non- Boolean - The Boolean data type represents Boolean fractional values, i.e., numeric values without values true and false. Dart uses the bool keyword to a decimal point. For example, the value "10" represent a Boolean value. is an integer. Integer literals are represented using the int keyword. List and Map - The data types list and map are used to represent a collection of objects. A List is an Double − Dart also supports fractional ordered group of objects. The List data type in Dart numeric values i.e. values with decimal is synonymous to the concept of an array in other points. The Double data type in Dart programming languages. The Map data type represents a 64-bit (double-precision) represents a set of values as key-value pairs. The floating-point number. For example, the dart: core library enables creation and manipulation value "10.10". The keyword double is used to of these collections through the predefined List and represent floating point literals. Map classes respectively. Strings represent a sequence of characters. The Dynamic Type - Dart is an optionally typed For instance, if you were to store some data language. If the type of a variable is not explicitly like name, address etc. the string data type specified, the variable’s type is dynamic. The dynamic should be used. The keyword String is used keyword can also be used as a type annotation to represent string literals. String values are explicitly. embedded in either single or double quotes. VARIABLES A variable is “a named space in the memory” that stores values. In other words, it acts a container for values in a program. Variable names are called identifiers. Following are the naming rules for an identifier − Identifiers cannot be keywords. Identifiers can contain alphabets and numbers. Identifiers cannot contain spaces and special characters, except the underscore (_) and the dollar ($) sign. Variable names cannot begin with a number. Type Syntax A variable must be declared before it is used. Dart uses the var keyword to achieve the same. The syntax for declaring a variable is as given below − Dart supports type-checking by prefixing the variable name with the data type. Type-checking ensures that a variable holds only data specific to a data type. The syntax for the same is given below − All uninitialized variables have an initial value of null. This is because Dart considers all values as objects. Dynamic Keyword Variables declared without a static type are implicitly declared as dynamic. Variables can be also declared using the dynamic keyword in place of the var keyword. Final and Const The final and const keyword are used to declare constants. Dart prevents modifying the values of a variable declared using the final or const keyword. These keywords can be used in conjunction with the variable’s data type or instead of the var keyword. The parse() static function allows parsing a string containing numeric literal into a number. The following illustration demonstrates the same − The above code will result in the following output − 12 10.91 The parse function throws a FormatException if it is passed any value other than numerals. The following code shows how to pass an alpha-numeric value to the parse() function. OPERATORS Arithmetic Operators Equality and Relational Operators Type test Operators Bitwise Operators Assignment Operators Logical Operators ARITHMETIC OPERATORS Operator Meaning + Add - Subtract -expr Unary minus, also known as negation (reverse the sign of the expression) * Multiply / Divide ~/ Divide, returning an integer result % Get the remainder of an integer division (modulo) ++ Increment -- Decrement EQUALITY AND RELATIONAL OPERATORS Operator Description Example > Greater than (A > B) is False < Lesser than (A < B) is True >= Greater than or equal to (A >= B) is False 10) is False. the expressions specified return true OR − The operator returns true if at least || one of the expressions specified return (A > 10 || B > 10) is True. true NOT − The operator returns the inverse of ! the expression’s result. For E.g.: !(7>5) !(A > 10) is True. returns false CONDITIONAL OPERATOR Dart has two operators that let you evaluate expressions that might otherwise require ifelse statements − condition ? expr1 : expr2 If condition is true, then the expression evaluates expr1 (and returns its value); otherwise, it evaluates and returns the value of expr2. expr1 ?? expr2 If expr1 is non-null, returns its value; otherwise, evaluates and returns the value of expr2 DECISION MAKING A conditional/decision-making construct evaluates a condition before the instructions are executed. if statement else…if Ladder if-else statement switch statement LOOPS for loop while loop for in loop do while loop LOOPS At times, certain instructions require repeated execution. Loops are an ideal way to do the same. A loop represents a set of instructions that must be repeated. In a loop’s context, a repetition is termed as an iteration. for loop The for loop is an implementation of a definite loop. The for loop executes the code block for a specified number of times. It can be used to iterate over a fixed set of values, such as an array. for…in Loop The for...in loop is used to loop through an object's properties. while Loop The while loop executes the instructions each time the condition specified evaluates to true. In other words, the loop evaluates the condition before the block of code is executed. do…while Loop The do…while loop is similar to the while loop except that the do...while loop doesn’t evaluate the condition for the first time the loop executes. DART LISTS, MAPS, AND COLLECTIONS PRELIM WEEK 3 LISTS A very commonly used collection in programming is an array. Dart represents arrays in the form of List objects. A List is simply an ordered group of objects. The dart:core library provides the List class that enables creation and manipulation of lists. The logical representation of a list in Dart is given below − Lists can be classified as − Fixed Length List Growable List FIXED LENGTH LIST A fixed length list’s length cannot change at runtime. The syntax for creating a fixed length list is as given below − It will produce the following output − [12, 13, 11] Another way of declaring fixed length list is as given below - It will produce the following output − [1,2,3] GROWABLE LISTS A growable list’s length can change at run-time. The syntax for declaring and initializing a growable list is as given below − It will produce the following output − [12, 13] LIST PROPERTIES The following table lists some commonly used properties of the List class in the dart:core library. Property Description first Returns the first element in the list. isEmpty Returns true if the collection has no elements. isNotEmpty Returns true if the collection has at least one element. length Returns the size of the list. last Returns the last element in the list. reversed Returns an iterable object containing the lists values in the reverse order. Single Checks if the list has only one element and returns it. MAPS The Map object is a simple key/value pair. Keys and values in a map may be of any type. A Map is a dynamic collection. In other words, Maps can grow and shrink at runtime. Maps can be declared in two ways − Using Map Literals Using a Map constructor Declaring a Map using Map Literals Declaring a Map using Map Constructors GENERICS Dart is an optionally typed language. Collections in Dart are heterogeneous by default. In other words, a single Dart collection can host values of various types. However, a Dart collection can be made to hold homogenous values. The concept of Generics can be used to achieve the same. The use of Generics enforces a restriction on the data type of the values that can be contained by the collection. Such collections are termed as type-safe collections. Type safety is a programming feature which ensures that a memory block can only contain data of a specific data type. All Dart collections support type-safety implementation via generics. A pair of angular brackets containing the data type is used to declare a type-safe collection. The syntax for declaring a type-safe collection is as given below. Collections: List Queue Set Map FUNCTIONS Functions are the building blocks of readable, maintainable, and reusable code. A function is a set of statements to perform a specific task. Functions organize the program into logical blocks of code. Once defined, functions may be called to access code. This makes the code reusable. Moreover, functions make it easy to read and maintain the program’s code. A function declaration tells the compiler about a function's name, return type, and parameters. A function definition provides the actual body of the function. Defining a Function A function definition specifies what and how a specific task would be done. Calling a Function A function must be called so as to execute it. Returning Functions Functions may also return value along with control, back to the caller. Parameterized Parameters are a mechanism to pass values to functions. Function OBJECT-ORIENTED PROGRAMMING, LIBRARIES, AND OTHER OPERATORS PRELIM WEEK 4 DART OBJECT-ORIENTED CONCEPTS Dart is an object-oriented programming language, and it supports all the concepts of object- oriented programming such as classes, object, inheritance, mixin, and abstract classes. As the name suggests, it focuses on the object and objects are the real-life entities. The Object- oriented programming approach is used to implement the concept like polymorphism, data- hiding, etc. The main goal of oops is to reduce programming complexity and do several tasks simultaneously. The oops concepts are given below. Class Object Inheritance Polymorphism Interfaces Abstract class CLASSES Use the class keyword to declare a class in Dart. A class definition starts with the keyword class followed by the class name; and the class body enclosed by a pair of curly braces. The syntax for the same is given below − Declaration OBJECTS Dart represents data in the form of objects. Every class in Dart extends the Object class. Given below is a simple example of creating and using an object. CASCADE OPERATOR The cascade operator can be used as a shorthand in cases where there is a sequence of invocations. THE.toString() METHOD The cascade operator can be used as a shorthand in cases where there is a sequence of invocations. IMPORTING LIBRARIES Importing makes the components in a library available to the caller code. The import keyword is used to achieve the same. A dart file can have multiple import statements. The syntax for importing a library in Dart is given below − If you want to use only part of a library, you can selectively import the library. The syntax for the same is given below −