Giter VIP home page Giter VIP logo

stations's Introduction

Bus stations routes and tracking demo

A demo application that plots stations and draws the route that the bus will move through along the ride on the map.

Application Features

  • A user should see a list of available lines
  • On seleting a line, the list of stations will be rendered on the map
  • A user should see a callout with the station details on tapping a specific station
  • Simulate a bus moving on the drawn route
  • Tapping a station callout will present the station details with transition animation
  • A user should be able to bookmark a station

Overall Architecture

The application follows VIP (View - Interactor - Presenter) when possible, but also MVC when it is better to use it

The VIP pattern, this is a unidirectional data flow pattern. The implementation of this pattern is inspired by Clean Swift based on Uncle bob Clean Architecture

View

A View is represented by a UIViewController, this is responsible for receiving user events and pass it to the interactor in a form of request to do some business logic. A View is also responsible for displaying the presentable view model it gets from the presenter. A View can send messages (commads) only to the Interactor, and can receive mesasges only from the Presenter

Interactor

An Interactor is an object, that is responsible for handling the business logic, it gets the data from a store, doing any business validation and passes the results to the Presenter A View can send messages (data objects) only to the Presenter, and can receive mesasges only from the View

Presenter

A Presenter is responsible for mapping the raw data it gets from the Interactor to a form of view model that can easily be displayed by the View without extra processing A Presenter can send messages (view models) only to the View, and can receive mesasges only from the Interactor

Project Structure

Models

This is a directory that contains the app model objects, usually those are just plain object for storing values

Utils

This direcory contains utility/helper classes

Constants

Application constants should be put there, it is prefered also to be grouped by its business domain e.g. Color, Icon, etc.

Networking

This contains the networking module, this module represents the networking access layer that is used to make any network call The API file has the applications APIs that can be called, new APIs should be added there as well

Scenes

This directory contains the application scenes, a scene usually represents a screen. A scene is usually is implemented using the VIP archetecture. So, it usually consists of 3 main files View, Interactor, Presenter, a Models file is created as well when needed.

In case of using MVC, a scene group should have the ViewController plus the other related components it uses

Any new scene should be in a separate directory/group

Libraries

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.