Giter VIP home page Giter VIP logo

downapptest's Introduction

Down App Test

The main focus of my work was to replicate the UI/UX of a Down App as possible while keeping the architecture simple yet testable.

Given the constraints of 4 hours, I decided to go with SwiftUI as it allows me to focus on the UI itself, rather than writing boilerplate code.

This is a quite simple thin client; the only goal of it is to download backend data and display it to the user. There is no heavy client logic, so a simple MV architecture should be enough.

For the sake of time, I made a couple of simplifications:

  • There is no proper Dependency Container. Normally, I'd use Swinject to manage dependencies, but just for one service, it seems to be overkill. Using the SwiftUI Environment for this case is quite enough.
  • Normally, we don't want to use Backend models directly; we'd build a Mapper to transform it into a domain model. But for this test app, it's not that important.
  • Across the views, there are still some magic design numbers, but mostly it's one-time usage, and it's quite straightforward.
  • Networking and ErrorHandler might be a bit overkill for this small app, but it's my common way to handle networking, and it's quite easy to hook up.
  • There is no business logic except for fetching profiles, so there is a UnitTest only to check if the API is working and the model mapping is correct.
  • Most UI States are tested within Previews of SwiftUI.
  • There is room for UI tests, of course, for that I'd need to set up some accessibility ids and write e2e tests.
  • Localization is missing, but it would be easy with the new xcstrings.catalog.
  • I only used NukeUI because AsyncImage still doesn't have built-in caching, and it's just not stable enough to be used every day.

downapptest's People

Contributors

alekseevpg 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.