Git Product home page Git Product logo

giphy's Introduction

Giphy

A simple app for showing gif images, it fetches images from Giphy trending API, and when you play each Giphy after 10 seconds it randomly shows another giphy by using random API.

This app has no external dependency.

I've used Combine and SwiftUI in this project. these are new frameworks announced by Apple in WWDC 2019.

Preview

Design Patterns

MVVM, Reactive Programming, Coordinator

  • I used MVVM since it helps to keep the data flow separated from the view itself, as a result, we have more readable and scalable code.

  • Reactive Programming saves us from "callback hell", it also saves time in solving complex data flow problems and provides a unique interface for the app modules

  • Coordinator pattern keeps the modules separated, each module of the app doesn't know anything about the other one, it means they are testable and reusable, it also provides a very clean look for each module so by looking into a coordinator you can see what the module does and how the data flow works.

Project Structure

  • This project contains two coordinators AppCoordinator and GiphyCoordinator as a child, by adding more modules we add more coordinators

  • WebAPI is responsible for performing all web requests at the moment we have one group of endpoints called GiphyEndpoint

  • FileRepository is designed to read and write data from/to the disk in a thread-safe way

  • GiphyRepository is providing all giphy related operators and data, it also keeps the loaded giphy list

  • lastly, we have Views and ViewModels for each part and helper files in the Utilities group

I decided to use mp4 for an animated version of Gif files since it's supported on iOS and macOS natively and also smaller so needs less storage and downloads faster

Usage

You can simply open the project with Xcode and run the app, this project has no external dependency.

You can target iOS, iPadOS, and macOS

giphy's People

Contributors

amirdew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.