Coder Social home page Coder Social logo

nearby-search's Introduction

Nearby Venues

The app shows venue list near user location.

Base tooling

  • TinyConstraints is programmatically Auto Layout library.
  • Alamofire is an HTTP networking library.

Why Alamofire?

While Alamofire is based on URLSession, it obscures many of the difficulties of making networking calls, freeing you to concentrate on your business logic. You can access data on the internet with little effort, and your code will be cleaner and easier to read.

  • The request is build up within a single initializer
  • A URL encoder is encoding parameters by default
  • Validation is done inline with a simple one-liner and converts into a strongly typed error if validation fails. The response result enum will return this error inside the failure case.
  • A generic completion callback makes it easy to decode the response into our custom Board type

Why TinyConstraints and Auto Layout Programmatically?

  • TinyConstraints library makes easier building UI and saves time.
  • No need to open different windows for storyboards, to understand what’s happening in a single module.
  • Everything is here, you can see very clearly what’s happening in the layout.
  • Makes your compile-time stable, as the project grows.
  • Easy to refactor.
  • Easy to work in a team.
  • Hard to review the code

Architecture

MVVM + R architecture was used in this project

Models

The models won't store business logic. They will only act as data stores.

Views

The Views (or ViewControllers in this case) only responsability will be displaying the data provided by its ViewModel, and forwarding all events to their respective ViewModel.

ViewModel

The ViewModel is the component in charge of managing the state of each view, and any processing necesary of the data to be displayed.

Router

The router is the component in charge of handling the navigation stack of your entire application.

To keep things tidy and isolated, the router does not know how to instantiate the screens that it presents. This is defined separately using the Route protocol. A Route is a component that encapsulates all the necessary logic to instantiate a view, with it's corresponding viewModel and any other parameters forwarded from other routes.

nearby-search's People

Contributors

kburakka avatar

Watchers

James Cloos avatar  avatar

Forkers

ilhansari

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.