The Data loading process is a common pattern where the Web Server is the system of record, and the application has the responsibility to sync to the Web Api. This is an asynchronous process, including cleaning and writing new data to the database, and updating the UI as the data returns.
- [Instructor] I want you to know how we're loading…the data within the application.…We're following a pretty common model where we load the data…first from our local database and present it,…then we send off a request to a web server…and download the latest changes.…Next, we insert those changes into our local database,…and then finally we re-query our local database…and present those changes.…So, looking at the SpyListViewController on line 28,…you can see that we're loading the data…and when that's finished, on line 29,…we just notify that new data has been received…and we say from what source,…and really we have two different types of source,…we have local database, and then we have the network.…
And that's so that we can send off a notification…to the user that data has come from a specific source.…So diving down into that loadData method,…we have a couple pass throughs,…and that's just to make the code transition easier…as we start putting it into the different layers.…But this loadData method really shows…
Author
Released
6/27/2017- Moving pieces of architecture
- Designing an MVA app
- Walking through a demo application
- Converting to MVP
- Moving non-view logic to a presenter
- Breaking logic into layers
- Using entities
- Setting up dependency injection
- Implementing the coordination pattern
- Adding data binding with RxSwift
Skill Level Intermediate
Duration
Views
Related Courses
-
Introduction
-
Welcome48s
-
-
1. Moving Pieces of Architecture
-
Why architecture?3m 32s
-
Architecture pieces2m 19s
-
Common architectures3m 42s
-
-
2. Demo Application Walkthrough
-
UI overview41s
-
Code overview1m 18s
-
Load data2m 51s
-
-
3. Convert to MVP
-
Create presenter3m 14s
-
Create presenter, part 23m 28s
-
Create presenter, part 32m 36s
-
Create presenter, part 43m 21s
-
-
4. Expand Layers
-
Expand layers5m 59s
-
Expand layers, part 24m 14s
-
Entities2m 49s
-
-
5. Dependency Injection
-
Swinject overview6m 27s
-
Swinject storyboard3m 14s
-
Presenter conversion5m 45s
-
Protocol injection8m 53s
-
-
6. Navigation Coordinators
-
Coordinator walkthrough3m 15s
-
-
7. Data Binding
-
RxSwift – observables11m 15s
-
RxCocoa – data binding6m 46s
-
-
Conclusion
-
Next steps42s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Load data