BreakingNews - Breaking News App used the MVVM structure

Overview

Breaking News

Use

Structure:-

I used the MVVM structure with use cases to cleanly achieve separation of concern for the user interface from the application logic. By using this architecture it helped in

  • Independent of UI: The UI can change easily, without changing the rest of the system as we can substitute the table view with a collection view and we will not have to touch our logic
  • Independent of the database and network: I can easily change them without breaking business rules.
  • Testable: The business rules can be tested without the UI, database, web server, or any other external element.

Data Flow

  1. View(UI) calls a method from ViewModel.
  2. ViewModel executes Use Case.
  3. Use Case call network API and return the articles to viewModel.
  4. Information flows back to the View(UI) where we display the list of items.

Caching:-

  1. I used UserDefauls to cache simple configuration(user favorites and date of last caching)
  2. I used documents directory to cache articles and refresh it every 15 minutes:

When thinking about persistence in iOS apps:

The first choice might be Core Data but Core Data is best used when we have a lot of relationships between our objects as it is primarily an object graph manager that happens to have a persistence layer, our second choice might be realm but in our case, the overhead work is not worth it so saving a .plist file to disk allows us to easily add, remove our model objects without much code and the code is more swift friendly and it’s easy to understand

Enums:-

Using enum is very pretty as I can set the cases and extend these cases with variables, I used them in

  • Managing view states
  • Listing differrent categories and countries
  • Build Alamofire network request

Pods

  • Alamofire: HTTP networking library to simplify common REST services.
  • SDWebImage: Async image downloader with cache support.
  • DropDown: Design drop down.

ScreenShots

Video

Breaking.News.Demo.mov

Unit Test Coverage: 43.3%

Comments
  • fix searching and handle dismissing keyboard

    fix searching and handle dismissing keyboard

    Description

    Please include a summary of the change and which issue is fixed

    fix searching and handle dismissing keyboard

    Type of change

    • [x] Bug fix
    • [ ] New feature
    • [ ] Documentation
    opened by Asmaa933 0
  • Caching Articles

    Caching Articles

    Description

    • Caching articles as plist in directory and load from it as making it one source of truth
    • Set timer for 15 from last caching and refresh data after that time

    Type of change

    • [ ] Bug fix
    • [x] New feature
    • [ ] Documentation
    opened by Asmaa933 0
  • Enhancement/on boarding

    Enhancement/on boarding

    Description

    Enhance drop-down design by adding a border and show a label with the drop-down name when selection Also update countries menu

    Type of change

    • [ ] Bug fix
    • [ ] New feature
    • [ ] Documentation
    • [x] Enhancement

    Screenshot

    Notes

    opened by Asmaa933 0
  • Headline Details Screen

    Headline Details Screen

    Description

    Finish details for an article and make it possible to open article url in safari

    Type of change

    • [ ] Bug fix
    • [x] New feature
    • [ ] Documentation

    Screenshot

    opened by Asmaa933 0
  • Home Screen Design

    Home Screen Design

    Description

    Design a home screen that shows a list of headline news and enables a user for search for another headlines

    Type of change

    • [ ] Bug fix
    • [x] New feature
    • [ ] Documentation

    Screenshot

    opened by Asmaa933 0
  • OnBoarding logic Implementation

    OnBoarding logic Implementation

    Description

    • Implement Content of categories and countries drop-down
    • Handle Selection of drop-downs
    • Save user favorite selection
    • handle error state and populated state
    • Check when opening app if the user has favorites navigate him to the home screen otherwise navigate him to the onboarding screen

    Type of change

    • [ ] Bug fix
    • [x] New feature
    • [ ] Documentation

    Screenshot

    opened by Asmaa933 0
  • App Structure

    App Structure

    Description

    This pull request for setup the base structure for the application:

    • Create .gitignore to ignore unwanted files from the tracking
    • Create pull request template
    • Remove Main.storyboard
    • Setup Configuration in info.plist <Appearance, Deployment Info>
    • Create features MVVM files
    • Set root view to onboarding screen which background color is cyan

    Type of change

    • [ ] Bug fix
    • [x] New feature
    • [ ] Documentation

    Test

    The application runs successfully after these changes and a cyan view appears

    ##Screenshots

    opened by Asmaa933 0
Owner
Asmaa Tarek
iOS Developer, Interested in learning new technologies
Asmaa Tarek
Matthew Ogtong 0 Jan 20, 2022
Daily News is a news app with good looking user interface ! Apps architecture is MVVM and used RxSwift for binding.

Daily News Hey ! Daily News is a news app with good looking user interface ! Apps architecture is MVVM and used RxSwift for binding. Architecture I pr

Latif Atci 39 Dec 13, 2022
News app to see daily news from new York Times

News This project is demo project for newyork time apis news feed. Generally thi

kamalesh 0 Dec 18, 2021
News - A news app that use NewsAPI

News app - UIKit This is a news app that use NewsAPI - Features MVC design patte

Muhammed Faruk Söğüt 1 Jan 4, 2022
News App for Latinx News built in UIKit programmatically

LatinxNewsApp News App for Latinx News built in UIKit programmatically Overview LatinxNewsApp is a design taken from a bigger idea. It is a news app t

Bryan Gomez 1 Apr 21, 2022
📰 iOS news app in the style of the NYT, WSJ, CNN, BBC, FB, Twitter, Reddit & more - Includes a tvOS app :tv:

News iOS news app in the style of Apollo, Apple News, Axios, BBC, CNN, Facebook, Facebook News, FastNews, Flipboard, Lil News, NBC News, Reddit, The N

null 119 Dec 17, 2022
Small iOS app to show some COVID-19 health, data, news and tweets ⚡

covid19.swift Small iOS app to show some COVID-19 health, data, news and tweets ⚡ Requirements Xcode 12, iOS 14 Credits API: COVID-19 API: News Tweets

null 26 Nov 30, 2022
Fancy news app that diwnloads data from new.com api and shows it in a paging collectionview.

Fancy news reader PAging collection view that shows latest news from techcurch.com and displays full content in a detail page, was built to practice t

Abdul-Mujeeb Aliu 31 Feb 10, 2022
News app that using the NewsAPI

Appcent-Case It's News app that using the NewsAPI. Features Search News Show News Detail Add Favorite Delete Favorite Clear Favorites Share News Show

Ercan Garip 0 Aug 10, 2022
SimpleRSSReader is a simple app showing the latest Apple news.

SimpleRSSReader SimpleRSSReader is a simple app showing the latest Apple news. It demos the usage of following stuff: How to use XML Parser Delegate t

Milenko 1 Dec 8, 2021
This is my version of the H4X0R News app, taught by Angela Yu on the iOS Development Bootcamp.

H4X0R News ?? (I didn't choose the name btw) What is it about? H4X0R News is an app that shows the front page news from Hacker News Website, and when

Victor Colen 0 Nov 2, 2021
App that shows recently posted articles about Android or iOS on Hacker News

App that shows recently posted articles about Android or iOS on Hacker News

Jose Moffa 0 Nov 9, 2021
Today. News app for iOS

Today - News app for iOS This iOS app displays a list of news, fetched from mediastack API. Running This Project Clone this project and open with XCod

Ege Alpay 0 Nov 28, 2021
Headline News View Example App for iOS. You can display the articles fetched by rss.

HeadLineNews-ObjC Headline News View Example App for iOS. You can display the articles fetched by rss. PiP(Picture in Picture) is also supported DEMO

null 11 May 31, 2022
A beautifully designed app for Apple Developer News

A beautifully designed app for Apple Developer News

Milan Manwar 17 Apr 6, 2020
A small, read-only app for Hacker News.

Hacker News Reader Available on the App Store This is a simple Hacker News front-page reader that I cooked up because I didn't like any existing solut

Ryan Nystrom 259 Dec 11, 2022
Hackers is an elegant iOS app for reading Hacker News written in Swift.

Hackers Hackers is an iPhone and iPad app for reading Hacker News on the go. It's optimised for quickly catching up on the latest news and comments wi

Weiran Zhang 628 Dec 26, 2022
A Hacker News reader iOS app written in Swift.

HackerNews A Hacker News reader iOS app written in Swift. Features View "top", "newest", and "show" posts from Hacker News. Read posts using the SFSaf

Amit Burstein 1.3k Dec 21, 2022
AppNews - Simple app for downloading news from the Internet

Простое приложение для загрузки новостей из интернета с возможностью добавления их в закладки и обновлением списка новостей. Стек: UIKit, MVC,

Evgeny Ganusenko 0 Jun 12, 2022