Giter Site home page Giter Site logo

loblaw-challenge's Introduction

Loblaw iOS Challenge

Two main entities of the project

  1. Product List - The main screen that lists various products from API.
  2. Product Details - Showing the details of the product.

Loblaw's iOS Challenge is following MVVM architecture.

Installation

Need to install cocoa pods

pod install

Directories and Files description

Global files

1.Enums - Storing static keywords, strings, IDs which helps to write code on separate files.

2.Network/API - Handles network calls

  • ProductAPI.swift - Responsible to get the list of products using cart endpoint.

Scenes

Product List

  1. ViewModel - Business logic implemented here, connecting backend and 'View Controller' using adapter.
  2. Adapter - Handles tableview's delegate and data source, confirms 'ProductListProtocol'
  3. Protocol - Defines set of operations 'View Controller' needs to handle.
  4. Model - Defines API response as ProductList structure to handle product details.
  5. View - Connects to UI and responsible to show data on phone, confirms ProductList Protocol. While loading display data using a view model and updates the tableview.

Product Details

  1. View - Simply showing product details on the screen, which is selected from the previous view(ProductList).

Future implementation

  • App should look for the Internet connectivity and notify the user if not available.
  • Lazy loading or Pagination needs to integrate to handle more data.
  • Table view can be animated and show the loading indicator.
  • Label text needs more constraints according to UI design.

Screenshots

  • Product List

image

  • Product details

image

License

MIT

loblaw-challenge's People

Contributors

harshbshah avatar

Watchers

James Cloos avatar  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.