Mobile App Development 2021W Lecture 24

From Soma-notes
Jump to navigation Jump to search

Video

Video from the lecture given on April 12, 2021 is now available.

Notes

Lecture 24
----------
* review session scheduling
* Tutorial 9 solutions
* questions on Assignment 4 & Tutorial 10
* course review & perspective

When you have to look up every solution on stack overflow rather than having basic mechanisms that you can combine to get an answer, your API is probably more complex than it needs to be.


What did we cover?
 - iOS SwiftUI basics
 - Android Kotlin app basics
 - (a little bit of iOS Storyboard)

Key concepts
 - optional types/nullable types
   (references that have to have valid data)
 - functions as first-class data
    - used as event handlers
 - domain-specific lanugages for describing interfaces
    - SwiftUI implemented in Swift
    - android layouts in XML
    - (Storyboard layouts in XML)
 - referencing separately defined UI in code (Android)
 - touch-based interfaces
    - tap, drag, rotate, scale gestures in SwiftUI
    - tap, drag in Android
 - media assets
    - images included in apps
 - a bit on inter-process communication
    - Android intents
 - different approaches to managing state in graphical apps
    - event-driven (android) vs
      declarative state driven (SwiftUI)
    - note how declarative approach separates
      state updates from interface updates, where
      they are connected with event-driven flows

What's left?  LOTS
 - lots more on IPC & networking
   - connecting to services
   - web views
 - lots with touch interfaces
   - multitouch implementation
 - more complex widgets
 - more complex workflows through apps
 - security

A key reason the mobile stream is going away is...mobile apps are apps
 - and aren't that different from web apps

The real heart of mobile development is working with giants
 - Apple, Google
 - living in their walled gardens & programming tools

If you don't want to be here, you're on the web in some form

So, in our curriculum, the mobile development stream is where you get the most interaction with proprietary tools & languages

With mobile apps, you work with what you're given
 - you'll never be able to see, let alone modify,
   most of the code your app depends on
 - very different from web or other development on open platforms


In your career you'll have to decide to what extent you want to depend upon proprietary tools and environments
  - no simple answer

While Android is technically open source, note that the recommended APIs now aren't (all the Compat ones)

All modern platforms abstract A LOT
 - we create on the shoulders of giants
 - and even open source code is created, many times,
   by giant organizations
     - but not always!
 - when you build on a proprietary stack, you lose
   some amount of control.  Question is, what do you get in
   return?

First question when doing mobile development
 - do I need to be doing mobile development?
 - why not web development?
   - should I do a hybrid web/mobile dev?
     e.g., Webviews, which can be Electron-like

Same for any dev project
 - does my tool vendor control my fate?
 - not a moral question, it is a practical one

Note I've been using Emacs for over 30 years
 - because it is open source, it has stuck around
   as long as there were motivated users
 - my basic workflow has evolved over that time, but
   many of my patterns are decades old

Do you know how much MS Word has changed in this time?!  Xcode?  Basically anything controlled by a company?
 - you have to be ready to change at any time
 - so be prepared to constantly adapt