Skip to content

digwey/bonial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

Bonial iOS development task

Language License

Table of Contents

Required Task

  1. FETCH LIST WITH BROCHURES
  1. DISPLAY BROCHURES LIST IN A UICOLLECTIONVIEW
  • Every sector object contains a list of “brochures”
  • Present each sector in one collection view section. Collection view cells should
  • Present the associated brochures.
  • The collection view sections should be alphabetically ordered by “sector->name”
  1. CREATE A CUSTOM VIEW FOR SECTION HEADER, WHICH DISPLAYS
  • Sector image (you find the url in sector -> url)
  • Sector name
  • Number of brochures, contained in section
  1. CREATE A CUSTOM CELL VIEW FOR COLLECTION VIEW CELLS, WHICH DISPLAYS:
  • Preview image (coverUrl)
  • RetailerName
  • Title
  1. WRITE UNIT TESTS
  • Cover at least one class with unit tests
  • We would like to see that you are familiar with writing unit tests

Note:

  • Do not use any third party libraries
  • Focus rather on code quality and clean architecture than UI and animations • make sure that you follow the Clean Architecture
  • Divides an app’s logical structure into distinct layers of responsibility • isolate dependencies
  • Easy to test
  • Conforms to the Single Responsibility Principle

#Features

Layout Design

Layout Design

  • Protocol-Oriented Programming - Still learning though and finding the best practise of that.

How to build

  1. Clone the repository
$ git clone https://github.com/digwey/bonial.git
  1. Install pods
$ cd CodingChallenge
$ pod install
  1. Open the workspace in Xcode
$ open "CodingChallenge.xcworkspace"
  1. Compile and run the app in your simulator or your iOS device

  2. If you don't see any data, please check internet connection as the application doesn't check the connectivity status.

Bonier task is an iOS app developed in Swift 2. The app has been actively upgrading to adopt the latest features of iOS and Swift language.

Notices

The current version is working with Xcode Version 7.3. If you are using different Xcode version, please check out the previous versions.

Screenshots

![Screenshot1] (https://raw.githubusercontent.com/digwey/bonial/master/CodingChallenge/screenshots/BonialScreenShot1.png) ![Screenshot2] (https://raw.githubusercontent.com/digwey/bonial/master/CodingChallenge/screenshots/BonialScreenShot2.png)

Gif file using Xcode Emulator ![Gif1] (https://raw.githubusercontent.com/digwey/bonial/master/CodingChallenge/screenshots/Viewing.gif)

Unit testing

  • Using XCTest
func testInitSectorModel(){
//Generating Nil Sector model
let sectorModel = SectorModel(id: -1, name: "TestedModel", url: "MYURL")

//It should be success because Sector Model with negative ID generate nil Model
XCTAssertNil(sectorModel)

//Successfully generated Sector model
let sectorModelSuccessed = SectorModel(id: 1, name: "TestedModel 1", url: "MYURL")

//Test to insure mapping between model consturctor and model properties
XCTAssertEqual(sectorModelSuccessed!.id,1)
XCTAssertEqual(sectorModelSuccessed!.name,"TestedModel 1")
XCTAssertEqual(sectorModelSuccessed!.url,"MYURL")

}

Requirements

  • Xcode 7
  • iOS 9

#UML This is consider a very simple UML that consider only one view controller in iOS You can also render sequence diagrams like this:

Title: Bonial Simple Sequence diagrams
iOS Application->Webserver: Send HTTP Get request
Note right of iOS Application: Parse and display Sectors and Brouchors
Webserver->iOS Application: Response JSON response 

![BonialSeqDiagram] (https://raw.githubusercontent.com/digwey/bonial/master/CodingChallenge/screenshots/BonialSeqDiagram.png)

About

Application at Bonial.com /Coding Challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published