WebFund 2015W Lecture 23
Notes
Two topics for last two lectures:
- What are the fundamentals of web applications?
- Web applications everywhere
Distributed Applications
Applications that run on multiple computers
- separate memory, CPU, storage, communication (I/O)
- can apply this processes, virtual hosts, or physical hosts
Localhost is useful when you want a distributed app on one computer
- GET and POST can go essentially anywhere on the Internet
- allows for flexible combination of code and data
- web applications are the premier form of distributed applications today
- with distributed applications, you don't control all the computers "your" code runs on
Structured Persistence
Before this class, you worked with files
Files are unstructured (on modern systems)
On the web we use "databases"
- really, structured storage
Why structured?
- convenience
- speed for "complex" queries
- concurrency & distribution
Front vs Back end
- separate parts of app for...
- doing computation/storage/real work (back end)
- providing the interface (front end)
Can you do "real work" in the front end?
- Yes, but...
- Don't trust the answers
Front end is untrusted, back end is trusted
Modern web apps have many backends and can have multiple front ends (mobile, desktop)
- but "responsive design" says you should have one front end
So why put stuff in the front end?
- lower the load on the back end
- but main reason is latency (of network communication)
Markup and Templates
Trust
Who do you trust?
- library, runtime authors
- content providers
- ad providers
- whatever else you add to a page
Trust means "who can screw you over"
- if they go bad how badly are you hurt
Amazing the web works at all