Quite often when architecting an app or implementing a feature, we don’t really think about the Data itself. Sure, we will handle few network requests or database queries but these things just contain some data, we don’t specifically think about the main character. In this talk I will try to show you why Data itself is important and a few tips and tricks on how to manage it
6. JSON
{"wwdc_sessions": [
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."},
{"id": 420, "description": "Introducing Marzipan."}, {"id": 421, "description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."}, {"id": 422, "description": "What's new in Electron."}
]}
7. PRETTY PRINTED
{
"wwdc_sessions": [
{
"id": 420,
"description": "Introducing Marzipan."
},
{
"id": 421,
"description": "Why did we decide to buy React Native and call it Marzipan - the business perspective."
},
{
"id": 422,
"description": "What's new in Electron."
}
]
}
16. If you don't love me at my
if let jsonResponse = data as? NSDictionary {
if let feed = jsonResponse["feed"] as? NSDictionary {
if let entry = feed["entry"] as? NSArray {
if let firstEntry = entry[0] as? NSDictionary {
if let name = firstEntry["name"] as? NSDictionary {
if let label = name["label"] as? NSString {
println("label: (label)")
}
}
}
}
}
}
Then you don't deserve me at my
let decoder = JSONDecoder()
let product = try decoder.decode(Product.self, from: data)
https://twitter.com/harlanhaskins/status/982249952154824704
29. > How do you split the works if you are not working
alone?
30. > How do you split the works if you are not working
alone?
> When do you migrate dependencies?
31. > How do you split the works if you are not working
alone?
> When do you migrate dependencies?
> What if one dependency does not work in newer
version?
32. > How do you split the works if you are not working
alone?
> When do you migrate dependencies?
> What if one dependency does not work in newer
version?
> What if you are 2 major versions behind?
33. > How do you split the works if you are not working
alone?
> When do you migrate dependencies?
> What if one dependency does not work in newer
version?
> What if you are 2 major versions behind?
> Do you use migrator?
34. > How do you split the works if you are not working
alone?
> When do you migrate dependencies?
> What if one dependency does not work in newer
version?
> What if you are 2 major versions behind?
> Do you use migrator?
> How do you test your app after the migration?
35. > How do you split the works if you are not working
alone?
> When do you migrate dependencies?
> What if one dependency does not work in newer
version?
> What if you are 2 major versions behind?
> Do you use migrator?
> How do you test your app after the migration?
> Do you do refactor while migrating the codebase?
52. provider.request(GitHub.repos(repo)) { (result) in
if case .success(let response) = result {
do {
let repos = try response.map(to: [Repository].self)
print(repos)
} catch let error {
print("There was something wrong with the request! Error: (error)")
}
}
}