GithubHelp home page GithubHelp logo

rijks-museum's Introduction

rijksmuseum

First checkout the project and start the rijksmuseum.xcodeproj file, there are no third party dependencies, so it’s pretty simple. In case you want to build on a real device, add your bundle ID project settings.

User Interface:

  • Just build the app and you will see the loading screen while the art list data is being fetched from the API.
  • You can scroll down to the bottom of the list to fetch more.
  • After the successful data retrieval, art list is shown in collection view list with 2 columns.
  • In case of any error an alert is presented (turn the internet off and restart the app or try to tap a destination to try it out). Of course, this can be done in much more detail if Reachability class is used, but it would go outside of scope of this test project and it was mentioned to avoid 3rd party libs or other solutions.
  • To see the art details tap on the cell and Art Details Screen will appear. Tap again on the image and you will be able to explore it by zooming and panning

Architecture:

  • MVP + Coordinator
  • Networking module is independent and can be implemented anywhere. It is based on Apple's “URLSession” and generics so no third party libs have been used.
  • Repository separate presenter layer and services layer. It also converts Response models to Domain models.
  • Test Coverage 83.7%
  • Unit tests are made for presenters, repository and moc JSON of art products list and details, they are just examples and many more tests can be done.
  • UI tests for main flow and pagination mechanic.
  • File organisation:
├── AppDelegate.swift
├── SceneDelegate.swift - Coordinator started
├── Features
│   ├── DetailPage
│   │   ├── DetailPageConfigure.swift - Builder for Detail Page feature
│   │   ├── DetailPagePresenter.swift
│   │   └── DetailPageView.swift
│   └── List
│       ├── Cells
│       │   ├── ArtCell.swift
│       │   ├── HeaderView.swift
│       │   └── IndicatorCell.swift
│       ├── Common
│       │   └── ListViewItemsSourcing.swift
│       ├── ListConfigure.swift - Builder for List feature
│       ├── ListPresenter.swift
│       ├── ListSectionModel.swift
│       └── ListView.swift
├── Coordinator
│   ├── CoordinatorProtocol.swift
│   └── MainCoordinator.swift
├── Dependency
│   └── Dependency.swift – Build Repository and Services (NetworkService)
└── Views
│   └── ArtImageView.swift
├── Models - Domain models
│   ├── ArtCollection.swift
│   ├── ArtCollectionObject.swift
│   ├── ArtDetails.swift
│   └── ArtImage.swift
├── Network
│   ├── ImageDownloader
│   │   ├── ImageCache.swift - Simple example how to cache images without NSCache and FileManager
│   │   └── ImageDownloader.swift
│   ├── NetworkManager
│   │   ├── NetworkEnvironmentProtocol.swift
│   │   ├── NetworkError.swift
│   │   └── NetworkRouteProtocol.swift
│   ├── Response - Response models
│   │   ├── ArtCollectionResponse.swift
│   │   ├── ArtDetailObjectResponse.swift
│   │   ├── ArtDetailsResponse.swift
│   │   ├── ArtObjectResponse.swift
│   │   └── ArtWebImageResponse.swift
│   ├── RijksEnvironment.swift
│   └── RijksNetworkService.swift
├── Repository
│   └── RijksRepository.swift
└── Resources
    ├── Assets.xcassets
    ├── Constants.swift
    └── Localizable.strings

rijks-museum's People

Contributors

dmitryshliugaev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.