MakeSchool-Tutorials / Makestagram-Swift-V3

14 stars 7 forks source link

15. Improving the Upload Code and Adding a Post Class #79

Closed byzantinist closed 7 years ago

byzantinist commented 7 years ago

Grammar and spelling:

You'll get some compiler errors for not having an initialiers or default values for certain properties.

should be

You'll get some compiler errors for not having any initializers or default values for certain properties.


We don't want to be able to create a new post in the database without a image URL and aspect height.

should be

We don't want to be able to create a new post in the database without an image URL and aspect height.


Next let's setup the code to create a new Post JSON object in our database:

should be

Next let's set up the code to create a new Post JSON object in our database:


If all of the posts stored within each respective user, then anytime we want to fetch the a user object from Firebase, we'll also fetching all of the user's posts within the snapshot as well.

should be

If all of the posts are stored within each respective user, then any time we want to fetch a user object from Firebase, we'll also fetch all of the user's posts within the snapshot as well.


However, in the scenario that a user has hundreds of thousands of posts, reading the user object from Firebase will return a slow response.

should be

However, in the scenario that a user has hundreds of thousands of posts, reading the user object from Firebase will result in a slow response.


The solution, as we've already implement is flattening our Firebase database JSON tree by separating Post objects into it's own root level node.

should be

The solution, as we've already implemented is flattening our Firebase database JSON tree by separating Post objects into its own root level node.


Right now, since we're storing all of our images at the same path.

should be

Right now, we're storing all of our images through the same path.


Before we move on, let's test our code. To do that we'll need to clean out some of old data.

should be

Before we move on, let's test our code. To do that we'll need to clean out some of our old data.

or

Before we move on, let's test our code. To do that we'll need to clean out some of the old data.


Delete you test image or any other previous images from Firebase Storage:

should be

Delete your test image or any other previous images from Firebase Storage:

ocwang commented 7 years ago

Fixed.