Giter Site home page Giter Site logo

employeedirectory's Introduction

Square Take Home Assignment

by Yariv Nissim

Builds Tools and Versions

Xcode 12.4 Swift 5

Libraries

UIKit Combine

Focus Areas

The architecture is a variation of MVVM with unidirectional data flow with Combine. The Employee Directory object fetches the data and returns a FetchState object that's a twist on Result since I wanted an initial state as well (aka none). The UI is updated automatically whenever the state changes (kind of like SwiftUI) in a single method updateUI.

Images are cached using a custom URLCache object defined on a custom URLSession. I decided to prefetch the small images while loading the directory. The images seemed relatively small (~24KB) and they all loaded very quickly even on a cellular connection. The full size images are currently not fetched at all. If there was a detail view then they would be loaded lazily and cached as well.

I created a custom icon as well and used the new UILaunchScreen key in info.plist. I left the main Storyboard even though it only adds a NavigationController. Sometimes less code is better.

Dependencies

None.

Device Focus

The app is universal and will work on iPhones and iPad an either orientation. It also supports dark mode, adaptive text sizes, and localized text.

Work Time

I spent about 6~7 hours on this project.

Anything else?

It's been a while since I built a project from scratch. Tried including some new frameworks like Combine, DiffableDataSource, List Layout, Cell Registration and Configuration.

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.