Mobile Apps 2023W Lecture 23

From Soma-notes

Notes

Final lecture
-------------

"Development of applications for mobile environments taking advantage of gesture-based input and using location and presence services. Topics include introduction to low-level network services and mobile platforms, description of architectural patterns, principles of mobile development and interaction styles for network service usage."

We covered most of this.  Location and presence services are pretty straightforward use of standard Android APIs or REST APIs.


Focus for today - where to go from here

Mobile development is programming using a powerful set of proprietary, ever changing, under documented APIs.
 - and most of this is pretty normal
 - only thing that sometimes changes is the "proprietary" part

Modern programming is all about adding your little bit of code to a mass of already existing code


So what are the most relevant courses to mobile development?
 - COMP 2406 (web dev) - web technology should be used where you can because that's cross platform, and many mobile APIs are based on existing web standards or frameworks
   - and in fact, use web technologies unless you have a specific need to not do so, and even then think again

 - COMP 3007 (programming paradigms) - functional, declarative, and even logic programming are increasingly relevant and used, even if they are disguised
    - because state is very hard to manage in a distributed context
    - if you're making a mobile app, it will generally be "distributed" in some way and so make state difficult to manage, even if it runs completely on the device (e.g., multicore)
    - mutating data structures is very hard to scale
       - better to avoid when you can

 - COMP 3000 (operating systems) - need to understand the underlying computation model if you want to understand performance, reliability, and security concerns

 - COMP 3005 (databases) - databases are a tool for concurrent state management.  If you're managing large amounts of state in any non-trivial app, you'll probably want a database or two

- COMP 3008 (HCI) - human factors matter in any modern app, if you don't understand the principles you'll make apps that are very frustrating to users or even insecure

- COMP 3004 - how to architect and build larger programs, with other people!

Because the hard part of doing mobile dev is understading how things work.  And you need to have the right conceptual framework for that, which is what you get from these courses.

So how valuable is learning iOS or Android development?
 - marketable skill certainly
 - but will likely go stale if not kept refreshed

 - can get you exposed to a lot of ideas about how to build programs in a concentrated form
    - concentrated "wisdom" (patterns) of experienced developers, ideas on how programs should be built
    - these patterns can help you understand the code of others, once you understand them

But I know this has been frustrating for a lot of you.  I'll just say...it is frustrating for everyone except people who do this all the time.  And for them, they were frustrated until they learned all the tricks.

And I will say that once you gain experience in one of these environments, it gets *much* easier to work in others
 - because the underlying ideas are often the same, certainly lots of sharing


Remember that if you think things should be done differently, that doesn't mean you are wrong.  Learn how others do it, and when you can try doing it your own way.  You'll then learn whether your ideas are good or not!
 - everything you work with was built by someone who at some point didn't know what they were doing, and to this day probably think they still don't mostly know what they are doing (they know a lot but know there's lots more they don't know)

Another thing you should try learning: security
 - not just cryptography, but that is important
 - more generally, about how attackers break systems and how you can strengthen your apps
    - because almost any app today is subject to security issues because they are on the Internet

In mobile development, code signing is very important
 - you can't install an app on a device if it isn't properly signed
 - so you generally have to generate a certificate before installing an app
   - Apple's dev tools make it clear this is what is happening
   - I know Android needs apps to be signed but I'm not sure how
     Android Studio does it
     - I think it is just using a dummy key and telling Android to trust it
     - iOS is stricter, esp as installed apps expire


My opinion is that longer term, development, even for mobile devices, isn't going to be based on proprietary stacks.  Instead, we're going to use web-based technologies wherever we can.
 - but it won't just be JavaScript, it will be be built on WebAssembly
    - because the code will be sandboxed, portable, and GUI-enabled
    - relatively few apps will need anything more, and they will often use web technology for most of their functionality

Notice the cloud is built almost entirely on open source, non-proprietary technologies
  - best developer experience
  - same will happen with mobile, eventually, as platforms mature

Android as a set of APIs is only useful to learn for job prospects.  But the concepts underlying them are mostly pretty universal so are worth learning, those ideas will show up elsewhere.