Thanks for your interest in joining Big Nerd Ranch! This repository has a half- finished app in it. There are some bugs, there's missing functionality, and there's a lot of room for improvement.
Your task is to make this app better. There are some specific issues we'd like you to be sure you fix, but how you choose to improve the app beyond that is entirely up to you. This lets you show your coding ability without being at a whiteboard or having someone look over your shoulder while you code.
We've begun to build an app to showcase all our amazing content from the Big Nerd Ranch Blog. A user of our app should be able to:
- View a quick summary of all of our blog posts
- Group & sort these summaries by author, publish date, or title
- Read a selected blog post in its entirety
Open the project file & run the code on the simulator to see the current state of the app. You should be able to see the title cards of a number of blog posts, and tap into them to see their contents.
We're midway through development on this app. And while we've got a good amount of it written, there are a few things we know we need to fix before we can ship it:
- [x ] Our collection view just shows the blog title for each post. It should show title, author, summary, and publish date. We recommend you build this view in a xib or storyboard.
- [ x] Grouping & sorting are both broken. The menus come up, but the order of the summaries doesn't change when I make a selection.
- [ x] Archibald's massive blog post takes a long time to download from the server, and it's slowing the whole app down. We should delay downloading that post unless we have to, and maybe add a loading state to improve the experience.
- Our unit & UI tests are pretty bare-bones right now. We should add more tests to improve test coverage.
There are 2 REST APIs that this app uses. The first one provides metadata on blog posts. This includes things like the author, a short summary, and the date that the post was published.
GET /post-metadata/42
{
"id": "42",
"title": "Morbi congue diam eu magna",
"publishDate": "2018-07-15T23:03:29Z",
"postId": "1042",
"summary": "Donec dictum ligula purus, ut suscipit arcu cursus ut.",
"author": {
"name": "Kerri Ferguson",
"image": "/images/authors/kerri.jpg",
"title": "iOS Engineer"
}
}
Here's what each of these fields represent:
id
- The ID of the metadata object. It will always match the ID in the URL.title
- The title of the blog postpublishDate
- An ISO 8061 timestamp when the post was first published.postId
- The ID of the post object this metadata references. Usually it will be the same as theid
value, but that's not guaranteed.summary
- A short description of the blog post.author
- An object with author data, specifically:name
- The author's nametitle
- The author's titleimage
- An absolute path to an image of the author. This should be interpreted as hosted on the same domain as the API.
You can also get a list of all metadata objects by issuing a GET request without an ID.
GET /post-metadata
The second API is for retrieving the full content of the blog post:
GET /post/1042
{
"id": "1042",
"metadata": {
"id": "42",
"...": "..."
},
"body": "Lorem ipsum dolor ... posuere lacus tincidunt."
}
Here's what each of these fields represent:
id
- The ID of the post object. It will always match the ID in the URL.metadata
- The metadata for this blog post. All properties on this object match those from thepost-metadata
API.body
- The content of the blog post.
You can also get a list of all post objects by issuing a GET request without an ID:
GET /post
While the Services team is building the production API, we have a mock server we can run locally. This provides the same interface that our production API will and includes some sample data.
This is already hooked up to the Run and the Test actions in Xcode. When you launch the app & when you run UI tests, the mock server will be automatically launched.
If you want to start the mock server without Xcode, just run the
start-mocks.sh
script. To stop it, run stop-mocks.sh
. This launches the
mock server at http://localhost:8106
.
The API design is locked, so you shouldn't need to change the mock server at all.