Giter VIP home page Giter VIP logo

clean_code_sample_arch's Introduction

CLEAN_CODE_SAMPLE_ARCH

this clean code architecture is basically is the updated version of VIPER(View Interactor Presenter Entity(Model) Router). This updated version is called VIP (Viewcontroller Interactor Presenter).

Basic work flow of clean code

  1. ViewController this will inherit the display protocol, this display protocol has some functions to update the view. This view controller is also responsible to initiate its own interactor presenter router data set etc...
  2. Interactor interacts with presenter using protocol, interactor basically is responsible for api calls
  3. Presenter interacts with view controller using display protocol. Presenter is responsible to send data to view controller.
  4. Router routes from one vc to other.

Api calls

  1. Api call be done using worker file. There is one base worker which will be inherited by other workers as per project need, here in this project we have user, posts or photos worker.
  2. Base worker constains only data provider protocols
  3. Data provider protocols contains all services protocol definitions.
  4. All workers, which inherits base worker contains the api service for api calls

Services

  1. There is one base service will be inherited by other services like users etc.
  2. Base service just initiate only network service or other image services
  3. Network services just a wrapper for almofire services

These all services takes request and returns in response

Services also contains the router, this is basically the HTTP routers which contains the http methods, url for api, and parameters as well...

clean_code_sample_arch's People

Contributors

nbnitin avatar

Stargazers

Vaibhav Sadana 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.