lecture 1 - 1 - Introduction.pdf
Document Details
Uploaded by LegendaryDecagon
Tags
Full Transcript
CSIT242Mobile Application Development LECTURE 1 - 1 - INTRODUCTION 1 CSIT242 – SIM 2024 Lecture Plan 1. What you need to know about lectures, labs, tutorials, assignments and exams 2. Android Overview 3. Android Studio 4. iOS Overview 5. Xcode 2 CSIT242 – SIM 2024 Lecturer/Coordinator and Tutor Lect...
CSIT242Mobile Application Development LECTURE 1 - 1 - INTRODUCTION 1 CSIT242 – SIM 2024 Lecture Plan 1. What you need to know about lectures, labs, tutorials, assignments and exams 2. Android Overview 3. Android Studio 4. iOS Overview 5. Xcode 2 CSIT242 – SIM 2024 Lecturer/Coordinator and Tutor Lecturer: Dr. Xueqiao Liu Office: Tutor Room 1 E-mail: [email protected] Tutor: Yeo Sze Wee Aaron E-mail: [email protected] 3 CSIT242 – SIM 2024 Subject structure Lectures : 3 hours per session, 7 lectures Laboratories: 3 hours per session, 8 sessions All labs will be marked Assignments : 2 assignments This is a 6 credit point subject. 4 CSIT242 – SIM 2024 Assessment Assessment Items Percentage of Final Mark Marks for the Item Labs 1 - 5 Assignment 1 & 2 6 * 5 = 30 10 * 2 = 20 Due Date Minimum required for a pass N/A As scheduled As scheduled Final Exam 50 20 Exam week as per schedule Total 100 50 The mark must be ≥50 to pass the subject 5 CSIT242 – SIM 2024 Lectures The lectures will introduce fundamental concepts and the principles of mobile application design, development and implementation. The lectures will contain a sufficient number of examples to facilitate explanation of complex technical aspects. It is highly recommended that you implement all examples, compile and run the programs on your computer. You are encouraged to participate actively in the lecture sessions answering questions and making your own notes that will help you to better understand the material. 6 CSIT242 – SIM 2024 Labs You have to enrol into the lab session. The laboratory sessions provide sufficient time for preparation. All lab tasks will be on the subject web site. Students are expected to complete the lab tasks during a supervised 3-hrs lab session. If more time is required to complete all exercises, this can be done at home. During scheduled labs, the tutor will assess your solution (for the given lab task) and give you a mark according to the quality of your solution and the level of your understanding. Attendance rolls will be kept for the Labs. You need to attend and complete at least 80% of the labs to be eligible for a Pass in this subject. 7 CSIT242 – SIM 2024 Additional materials Additional materials (readings and videos) will be posted on the subject web site. It is a good practice for you to read/watch/implement these materials/solutions before scheduled lecture or labs. 8 CSIT242 – SIM 2024 Assignments There will be two programming assignments. When an assignment is released, download the assignment description from the subject web site. Read carefully the specifications. Make sure you understand the requirements. You may work at home or in the laboratory (when it’s available). Your solutions must be submitted electronically via the subject web site (Moodle). No submission via email will be accepted. Late assignments will not be accepted without a granted special consideration. Exact time after which the submitted assignment will not be accepted will be indicated in every assignment. 9 CSIT242 – SIM 2024 Assignments All assignments must be completed individually When you submit an assessment task, you are declaring the following: It is your own work and you have not copied anything from others and you have not discussed your work with others. You have not plagiarised from published work (including various internet sources). You have read your responsibilities under the UOW’s policy on plagiarism and you understand possible consequences. You have not used storage devices which can be accessed by others without passwords. Plagiarism = Big problems You may be asked to have a formal meeting with the lecturer to explain your assignment solution if there are doubts that you worked on your assignment yourself 10 CSIT242 – SIM 2024 Subject web site All important notices related to CSIT242 will be posted on the Subject web site. Check it frequently! Note: Any information posted to the subject web site is deemed to have been notified to all students! The discussion forum on the subject web site can be used by students to discuss only subject related issues! The forum is not to be used to answer any assignment questions. Students who publish their assignment solutions, or provide assistance to other students may get 0 for their assignment. Forum post that are not related to the subject will be deleted! 11 CSIT242 – SIM 2024 Self-directed Study Listening passively is useless! Download lecture notes from the subject web site and look through the lecture notes prior to lectures. Attend all lectures. Take your own notes and add your own comments or questions during the lectures. Read/watch/implement all materials/solutions posted on the subject web site. Implement examples discussed at lectures or developed during labs on your computer at home. If you have any questions, attend consultations. 12 CSIT242 – SIM 2024 Subject Materials Recommended books: SwiftUI Essentials - iOS 16 Edition: Learn to Develop iOS Apps Using SwiftUI, Swift, and Xcode 14, Neil Smyth, Payload Media Inc., 2022. iOS 15 Programming Fundamentals with Swift - Swift, XCode and Cocoa Basics, Matt Neuburg, O'Reilly Media Inc., 2021. iOS 16 Programming for Beginners - 7th Edition, Ahmad Sahar & Craig Clayton, Packt, 2022. Android Studio Dolphin Essentials - Java Edition, Neil Smyth, Payload Media Inc., 2022. Android Studio 4.1 Essentials - Java Edition, Neil Smyth, Payload Media Inc., 2020. Learn Android Studio 4: Efficient Java-Based Android Apps Development, Ted Hagos, Apress, 2nd ed. edition, 2020. Programming iOS 14: Dive Deep into Views,View Controllers, and Frameworks, Matt Neuburg, O'Reilly Media Inc., 2020. Head First Android Development, Dawn Griffiths and David Griffiths, O’Reilly Media, 2017. Lecture notes & Labs exercises: The lecture notes are available on the subject web site (The lecture notes may not include some examples and explanations given in lectures). The Labs exercises are available on the subject web site. Additional materials Additional materials may be posted on the subject web site. 13 CSIT242 – SIM 2024 Software requirements Software installed in labs Xcode v14.2 (https://apps.apple.com/us/app/xcode/id497799835?mt=12)(Mac) Android Studio (Electrical Eel 2022.1.1)(Mac and Windows) (https://developer.android.com/studio/releases#top_of_page, https://www.techspot.com/downloads/6831-android-studio.html) including - Android Emulator - Android SDK Build Tools (33.0.1), - Android SDK Tools (33), - Android SDK Platform-Tools, - Gradle (7.5), - Android Gradle plugin, - Google Play services libraries (Google play services added in Android SDK) - HAXM installer (may be needed for the Android Emulator) 14 CSIT242 – SIM 2024 Android - History & Overview Developed by Android Inc. Bought by Google in 2005 Majority of Android software is licensed with Apache 2.0 Version numbers (before version 10) are associated alphabetically with desserts Developers program using an API level associated with a specific version (shown in next slide) 15 CSIT242 – SIM 2024 Android - History & Overview … … … Check Android versions preview at: https://developer.android.com/about/dashboards 16 CSIT242 – SIM 2024 Android - History & Overview Current status on Platform and Versions The most recent version of Android is Android 13, which was released in August 2022 (API 33). source: https://en.wikipedia.org/wiki/Android_version_history https://apilevels.com/ 17 CSIT242 – SIM 2024 Android - History & Overview Android is a comprehensive open source platform based on Linux and championed by Google. It’s a powerful development framework that includes everything you need to build great apps using a mix of Java/Kotlin and XML. Android provides an adaptive app framework that allows you to provide unique resources for different device configurations. Android does not use a Java Virtual Machine. Android does not use Abstract Window Toolkit or Swing library. Android used Dalvik, specialized VM, now is using ART – Android Runtime. 18 CSIT242 – SIM 2024 Android - Overview Android provides a rich application framework that allows you to build innovative apps and games for mobile devices in a Java or Kotlin language environment. Apps provide multiple entry points. Android apps are built as a combination of distinct components that can be invoked individually. For instance, an individual activity provides a single screen for a user interface, and a service independently performs work in the background. Android provides an adaptive app framework that allows you to provide unique resources for different device configurations. Apps adapt to different devices. For example, you can create different XML layout files for different screen sizes and the system determines which layout to apply based on the current device's screen size. 19 CSIT242 – SIM 2024 Android - architecture 20 CSIT242 – SIM 2024 Source: Head First Android Development, Dawn Griffiths and David Griffiths, O’Reilly Media, 2017. https://developer.android.com/guide/platform Typical Android Applications A typical Android app is comprised of one or more screens.You define what each screen looks like using a layout to define its appearance. Layouts are usually defined using XML, and can include GUI components such as buttons, text fields, and labels. Source: Head First Android Development, Dawn Griffiths and David Griffiths, O’Reilly Media, 2017. 21 CSIT242 – SIM 2024 Android Applications Behavior Every Android app is a collection of screens, and each screen is comprised of an activity and a layout. The device launches your app and creates an activity object. The activity object specifies a layout. The activity tells Android to display the layout on screen. The user interacts with the layout that’s displayed on the device. The activity responds to these interactions by running application code. The activity updates the display......which the user sees on the device. Source: Head First Android Development, Dawn Griffiths and David Griffiths, O’Reilly Media, 2017. 22 CSIT242 – SIM 2024 Android Development Tools Android Studio - is the official IDE for Android application development, based on IntelliJ IDEA. Android Studio offers: Flexible Gradle-based build system; Build variants and multiple apk file generation; Code templates to help you build common app features; Rich layout editor with support for drag and drop theme editing; Tools to catch performance, usability, version compatibility, and other problems; ProGuard and app-signing capabilities; Built-in support for Google Cloud Platform… For the code files we will use Java. 23 CSIT242 – SIM 2024 Android Studio Design View 24 CSIT242 – SIM 2024 Android Studio Text View (Code) 25 CSIT242 – SIM 2024 iOS - History & Overview iPhone released in 2007 In June 2010 Apple rebranded iPhone OS as iOS Software Development Kit released in 2008 Developers make iOS apps using the iOS SDK and Xcode Applications can be developed in Objective-C and Swift Each major version of iOS comes with the next version of Xcode Current version as of writing this slide is iOS 16 and Xcode 14 All development resources come fromApple (https://developer.apple.com/) 26 CSIT242 – SIM 2024 iOS - History & Overview Source: https://en.wikipedia.org/wiki/IOS_version_history 27 CSIT242 – SIM 2024 iOS - Architecture Architecture of iOS is a layered architecture. At the uppermost level iOS works as an intermediary between the underlying hardware and the apps you make. Apps do not communicate to the underlying hardware directly. Apps talk with the hardware through a collection of well defined system interfaces. These interfaces make it simple to write apps that work constantly on devices having various hardware abilities. Lower layers gives the basic services which all application relies on and higher level layer gives sophisticated graphics and interface related services. Source: iOS 12 App Development Essentials, Neil Smyth, Payload Media, Inc., 2018. 28 CSIT242 – SIM 2024 iOS - Architecture The Cocoa touch layer incorporates frameworks for building iOS applications. Media layer offer technologies that incorporates graphics, audio and video. Core Services layer technologies provide essential services to apps but have no direct bearing on the app’s user interface. The Core OS layer holds the low level features that most other technologies are built upon. 29 CSIT242 – SIM 2024 iOS - Architecture Cocoa Touch Layer EventKit framework; GameKit Framework; iAd Framework; MapKit Framework; PushKitFramework; UIKit Framework (Multitasking support, Basic app management and infrastructure, User interface management, Support for Touch and Motion event, Cut, copy and paste support, …) + more Media Layer UIKit Graphics; Core Graphics framework; Core Animation; Core Images; OpenGl ES and GLKit; Metal; Media Player Framework; AV Foundation; OpenAL; AV Kit framework; AV Foundation; Core Media, … Core Services Layer Address book framework; Cloud Kit framework; Core data Framework; Core Foundation framework; Core Location framework; Core Motion Framework; Foundation Framework; Healthkit framework; Homekit framework; Social framework; StoreKit framework, … Core OS Layer 30 CSIT242 – SIM 2024 Accelerate Framework; Core Bluetooth Framework; External Accessory Framework; Security Services Framework; Local Authentication Framework, … iOS - Applications Every iOS app is a collection of Views and View Controllers. Apps need to work with the iOS to ensure that they deliver a great user experience. iOS apps should: have good design - app’s design and user interface, be fast and responsive, use as little power as possible, need to support all of the latest iOS devices (while still appearing as if the app was tailored for the current device). 31 CSIT242 – SIM 2024 iOS Development Tools Xcode – free from developer.apple.com 32 CSIT242 – SIM 2024 Interface Builder (Built into Xcode 14) iOS simulator – installed together with Xcode Instruments Debugging Apple documentation – include Swift programming document as free iBook Xcode Xcode offers: 33 CSIT242 – SIM 2024 Complete toolset for building OS X and iOS applications, Full featured IDE, Code, Create, Compile, Run, On-the-fly syntax and logic checking Integrated Debugger, Integrated Interface Builder, Drag & Drop User Interface creation Inbuilt visual storyboarding. Xcode main window 34 CSIT242 – SIM 2024 Xcode Interface Builder 35 CSIT242 – SIM 2024 Xcode Assistant Editor 36 CSIT242 – SIM 2024 Xcode Source Editor Complete with code completion, code folding, syntax highlighting, and message bubbles that display warning, errors, and other contextsensitive information inline with your code. Assistant Editor The Assistant button splits the editor in two, creating a secondary pane that automatically displays files that are most helpful to you based on the code you are actively editing. It can show the header counterpart, the superclass, callers, callees, or other helpful files. Version Editor Xcode’s Version editor displays a running timeline of commits, helps you determine blame, and graphically goes back in time to compare source files, with full support for Subversion and Git source control (SCM) systems. Interface Builder Built In Design and test your user interface without writing a line of code, prototype in minutes, then graphically connect your interface to the source within the Xcode editor. iOS Simulator With the iOS SDK, Xcode can build, install, run, and debug Cocoa Touch apps in a Mac-based iOS Simulator for a streamlined development workflow. Integrated Build System Handles the most complex builds, scaling to maximize the power of multi-core Macs, and will automatically sign, provision, and install iPad and iPhone apps onto a device. 37 CSIT242 – SIM 2024 Xcode Compilers The powerful open-source compiler for C, C++, Objective-C, Swift is built into Xcode and available from Terminal. With it, your code compiles quickly, and is optimized by Apple. Graphical Debugger Debug your app directly within the Xcode editor. Hover over any variable to drill into its contents, use Quick Look to see the data it contains, or right-click to add the variable to the watch list. Asset Catalog The asset catalog editor in Xcode manages your app’s images, grouping together various resolutions of the same asset. When building, Xcode compiles the asset catalog into the most efficient bundle for final distribution. Complete Documentation Search for anything within Xcode and the documentation viewer will find it, either on your Mac or on the Apple Developer website. Live Issues Just like a word processor highlights spelling errors, Live Issues highlights common coding mistakes, without the need to click ‘build’ first. Fix-it Xcode goes beyond just reporting errors. When you make a coding mistake, Xcode will immediately alert you, and a single keyboard shortcut will instantly fix the issue, so you won’t miss a beat while coding. 38 CSIT242 – SIM 2024 iOS vs Android iOS Android Closed Open-source Limited customization Highly customizable 40 Languages 100+ Languages macOS Linux OS family What about: Internet browsing, Maps, Video chat, Voice commands, Cloud services, Biometric authentication… 39 CSIT242 – SIM 2024 Google Play vs App Store – interesting statistics Number of apps available in leading app stores as of 3rd quarter 2022 Source: https://www.statista.com/statistics/276623/number-of-apps-available-in-leading-app-stores/ 40 CSIT242 – SIM 2024 Google Play vs App Store – interesting statistics Source: https://sensortower.com/blog/app-revenue-and-downloads-q3-2022 41 CSIT242 – SIM 2024 New Features in Android 13 Personalization Themed app icons New media controls Per-app language preference Privacy Photo picker Notification permissions Cleared clipboard history … 42 CSIT242 – SIM 2024 New Features in iOS 16 Lock screen upgrades iCloud Shared Photo Library sharing and collaboration improvements Messages advanced functionalities Mail advanced functionalities Safari extensions Passkeys security Live Text Siri improvements... 43 CSIT242 – SIM 2024 Resources Head First Android Development, Dawn Griffiths and David Griffiths, O’Reilly Media, 2017 iOS 12 App Development Essentials, Neil Smyth, Payload Media, Inc., 2018. iOS 16 Programming for Beginners - 7th Edition, Ahmad Sahar & Craig Clayton, Packt, 2022. https://developer.android.com/guide/platform https://developer.apple.com/ios/ https://intellipaat.com/tutorial/ios-tutorial/ https://www.android.com/android-13/ https://www.apple.com/au/ios/ios-16/features/ 44 CSIT242 – SIM 2024