Giter VIP home page Giter VIP logo

flickapp's Introduction

ReadMe

  1. This application enable user input any text, then there will be a list of entities and their details returned over network. User can see output in grid/collection view with four columns. (It have two targets one for dev and other for prod, environment can be configured from AppConfig file)

  1. This application uses lazy loading technique for best performance.

  1. The architecture of the project is MVVM. The project have plenty of unit test cases as well as a UI test case.

  1. I am using simple in memory cache for saving imags from cloud.

  1. I am using custom view for search and collection view, created programmatically. Have prefered programmatic autolayouting becuase it's less prone to conflicts, easy to reuse and share. Also saves development time as it does not hangs system.

  1. I am using latest codable protocol for parsing json returned.

  1. Main Classes:
  • ImageCache.swift Created my own simple to use Image Cache. The very first time image will be saved from cloud into cache and next time will be fetched from cache only.

  • UtilityExtensions.swift I love extensions most in swift, as they can be easily reused. Created one extension to show alert.

  • CollectionViewDataSourceHandler.swift Have implementation of cellForRowAt method and numberOfRowsInSection.

  • CollectionViewDelegateHandler.swift Have implementation of didSelectRowAt.

  • CollectionViewDelegateFlowLayoutHandler.swift Implements delegate method related to positionings and margins of collection view cells.

  • SearchBarDelegateHandler.swift Implements delegate method related to UISearchBar actions like didEndEditing, searchBarSearchButtonClicked.

  • APIHandler.swift It takes care of networking, uses simple URLSession class.

  • CustomCollectionView.swift I am using custom view for search and collection view, created programmatically. Have prefered programmatic autolayouting becuase it's less prone to conflicts, easy to reuse and share. Also saves development time as it does not hangs system.

  • ViewController.swift This is the initial view controller. It is very lightweight and I am assigning my customview in load view.

I * t have two targets - one development and other production. Based on configuration in folders "ProductionConfiguration" & "DevelopmentConfiguration".


  • Root.swift, Photo.swift and Photos.swift are the models and these are conforming to codable protocol

  • ViewModelFlicker.swift This is where the business logic of th eapp resides.This is most important part od MVVM.

  1. 12 Factors Apps

It have two targets - one development and other production. Based on configuration in folders "ProductionConfiguration" & "DevelopmentConfiguration".


  1. Unit Testing
  • FlickerSearchTests: There are test files in test folder. As name claimed, each file responsible for different test cases.

  • APIHandlerTests.swift: include test for API request used in application

  • UISearchBarDelegateHandlerMock.swift: Mock a class that conform to Protocol, used for testing search bar tdid end editing.

  • SearchBarTests.swift: include test for UISearchBar and delegation.

  • InitializationTests.swift: Test basic initialization of some of the classes.

  • TestSingleton.swift: include test for singleton class

  1. UI FlickerSearchUITests
  • FlickerSearchUITests.swift: inclused test case for UISearch bar search text entry and result

flickapp's People

Contributors

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