Essential Feed Course

Overview

Essential Feed App – Image Feed Feature

Build Status

BDD Specs

Story: Customer requests to see their image feed

Narrative #1

As an online customer
I want the app to automatically load my latest image feed
So I can always enjoy the newest images of my friends

Scenarios (Acceptance criteria)

Given the customer has connectivity
 When the customer requests to see their feed
 Then the app should display the latest feed from remote
  And replace the cache with the new feed

Narrative #2

As an offline customer
I want the app to show the latest saved version of my image feed
So I can always enjoy images of my friends

Scenarios (Acceptance criteria)

Given the customer doesn't have connectivity
  And there’s a cached version of the feed
  And the cache is less than seven days old
 When the customer requests to see the feed
 Then the app should display the latest feed saved

Given the customer doesn't have connectivity
  And there’s a cached version of the feed
  And the cache is seven days old or more
 When the customer requests to see the feed
 Then the app should display an error message

Given the customer doesn't have connectivity
  And the cache is empty
 When the customer requests to see the feed
 Then the app should display an error message

Use Cases

Load Feed From Remote Use Case

Data:

  • URL

Primary course (happy path):

  1. Execute "Load Feed Items" command with above data.
  2. System downloads data from the URL.
  3. System validates downloaded data.
  4. System creates feed items from valid data.
  5. System delivers feed items.

Invalid data – error course (sad path):

  1. System delivers invalid data error.

No connectivity – error course (sad path):

  1. System delivers connectivity error.

Load Feed From Cache Use Case

Primary course:

  1. Execute "Load Feed Items" command with above data.
  2. System fetches feed data from cache.
  3. System validates cache is less than seven days old.
  4. System creates feed items from cached data.
  5. System delivers feed items.

Error course (sad path):

  1. System delivers error.

Expired cache course (sad path):

  1. System deletes cache.
  2. System delivers no feed items.

Empty cache course (sad path):

  1. System delivers no feed items.

Cache Feed Use Case

Data:

  • Feed items

Primary course (happy path):

  1. Execute "Save Feed Items" command with above data.
  2. System deletes old cache data.
  3. System encodes feed items.
  4. System timestamps the new cache.
  5. System saves new cache data.
  6. System delivers success message.

Deleting error course (sad path):

  1. System delivers error.

Saving error course (sad path):

  1. System delivers error.

Flowchart

Feed Loading Feature

Architecture

Feed Loading Feature

Model Specs

Feed Item

Property Type
id UUID
description String (optional)
location String (optional)
imageURL URL

Payload contract

GET *url* (TBD)

200 RESPONSE

{
	"items": [
		{
			"id": "a UUID",
			"description": "a description",
			"location": "a location",
			"image": "https://a-image.url",
		},
		{
			"id": "another UUID",
			"description": "another description",
			"image": "https://another-image.url"
		},
		{
			"id": "even another UUID",
			"location": "even another location",
			"image": "https://even-another-image.url"
		},
		{
			"id": "yet another UUID",
			"image": "https://yet-another-image.url"
		}
		...
	]
}
You might also like...
This is a brain teaser app I created as part of my course with Paul Hudson.
This is a brain teaser app I created as part of my course with Paul Hudson.

RockPaperScissorBrainTeaser This is a brain teaser app I created as part of my course with Paul Hudson. In this app my challenges were: Each turn of t

Create a weather app from scratch with this SwiftUI Crash Course
Create a weather app from scratch with this SwiftUI Crash Course

"Create a weather app from scratch with this SwiftUI Crash Course" https://youtu

Simple iOS app written with SwiftUI (and, of course, Swift) to begin exploring it.
Simple iOS app written with SwiftUI (and, of course, Swift) to begin exploring it.

WishList Tracking: An exploration with SwiftUI Simple iOS app written with SwiftUI (and, of course, Swift) to begin exploring it. Goal: Get used to Vi

100-Days-of-SwiftUI - a free online course created and delivered by Paul Hudson

100-Days-of-SwiftUI DESCRIPTION 100 Days of SwiftUI is a free online course crea

Developing Applications for iOS using SwiftUI [cs193p] course
Developing Applications for iOS using SwiftUI [cs193p] course

Files for Developing Applications for iOS using SwiftUI [cs193p] course Study material for the course Developing Applications for iOS using SwiftUI gi

CS193p-2021 - Stanford University's course CS193p(Developing Applications for iOS using SwiftUI)

🏫 Stanford University's course CS193p - 2021(Developing Applications for iOS us

Nextflix - Integrating project of the IOS development course by Digital House

nextflix Projeto integrador do curso de desenvolvimento IOS pela Digital House A

MyFirstIOSApp - Coding my first IOS app. Following Stanford University's course CS193p (Developing Applications for IOS using SwiftUI)

MyFirstIOSApp 📱 👨‍💻 Coding my first IOS app 📖 Following Stanford University'

Todo is an iOS App written in Swift. This app is used for an online video training course. This app demonstrates how to use UITableViewController.
Todo is an iOS App written in Swift. This app is used for an online video training course. This app demonstrates how to use UITableViewController.

Todo Todo is an iOS App written in Swift. This app is used for an online video training course. This app demonstrates how to use UITableViewController

Owner
Sebastián León
Sebastián León
A News Feed App Built With Swift

News Feed App TabBarController'ımızın ilk tabında "newsapi.org"dan gelen veriyi kullanıcıya gösteriyoruz. Başlangıç url'indeki sonuçları gösteren sayf

Hasan Ali 2 Oct 24, 2022
App for displaying VK news feed (VKSDK API). Clean Swift VIP architecture

VKNewsFeed VKNewsFeed - application for displaying VK news feed with dynamic cells and a collection of images in the post. Data request occurs from th

Areg Vardanian 0 Dec 18, 2021
Realtime feed of ERC721 transfers

Building Notes As a quick hack for handling secrets (like API keys), I just put

PJ Gray 1 Jan 28, 2022
StackOverflowFeed - Simple app that show feed with questions from StackOverflow, using Stack Exchange API

StackOverflowFeed Simple app that show feed with questions from StackOverflow, u

null 0 Jan 18, 2022
iOS app for your pasteboard feed

iCopyPasta iOS app for your pasteboard feed, demo app for experimenting with RxSwift. You can read the story about it on All The Flow blog. ##Install

All The Flow 23 Oct 27, 2022
Stanford University's course CS193p (Developing Applications for iOS using SwiftUI)

Memorize Game ?? Stanford University's course CS193p (Developing Applications for iOS using SwiftUI) About the game You need to turn over the cards on

Sergey Maslennikov 19 Dec 17, 2022
Stanford University's course CS193p (Developing Applications for iOS using SwiftUI)

Memorize Game ?? Stanford University's course CS193p (Developing Applications for iOS using SwiftUI) About the game You need to turn over the cards on

Sergey Obrien 12 Jul 28, 2021
E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy.

Touchdown-SwiftUI E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy. Main components and concepts used: @EnvironmentOb

Jorge Martinez 5 Aug 18, 2022
iOS Course at FMI - Sofia University

iOS 2021/2022 iOS Course at FMI - Sofia University Проекти Моля, попълнете следната форма, след като се запознаете с проектите. Всички проекти може да

null 8 Jun 1, 2022
Intraveneous AR prototype for course project

An AR prototype for intravenous (IV) injection. For Julia Micallef and Matt Chan's project in CSCI 6520G This is a scripted wizard of oz prototype, wh

Matt Chan 0 Nov 25, 2021