Giter Site home page Giter Site logo

bandlab's Introduction

Bandlab

How to cache audio

  • I'm using NSCache to cache every loading AVPlayerItem, with key is audioLink
  • Using only one instance of AVPlayer to plays all audios in app, avoid create too many players it leading to crash
  • When playing an audio, just checking it whether in cache or not.
    • If cache already had that audio the get corresponding AVPlayerItem and replace to the player.
    • If cache not contains that audio then create new AVPlayerItem, replace into the player and add it into cache

Repo structure

  • Engine: Shared classes, enums, structures, or logic, business on backend, networks, parsers, helpers, caches, data store, etc...
    • Manager: Contains Singleton class to handle Application product
      • Authentication manager
      • Push notifications manager
      • REST manager files
    • Constant:
      • AppConstants file
      • RESTConstants file
      • Constants file
      • ...
    • Utility:
      • AppUtils file
      • RESTUtils file
      • ...
    • Config: Contains everything contribute for configuration app
      • AppConfig file: Configure all setting in app: Feedback, geting started with third party libraries, configure server's hosts, configure logger, ...
    • Extension: Extend class / struct / enum
    • Service:
      • ApiService: Call API
      • SystemService: Handle system service (Push Notification, ...)
    • Persistence: Store entities here
  • ViewModule: Every module contains View, ViewModel & anything related to front end.
    • Component: The views that they will be share between multiple screens. With each screen should be has a folder for itself
    • View: Represent for the screens. With each screen should be has a folder for itself
      • E.g. Feed:
        • FeedViewController.swift file
        • FeedViewModel.swift file
  • Resource: Can be contains Images, Sounds, Layout config file, etc.
    • Assets.xcassets
    • Localizable.strings
    • ...
  • Storyboard: Put all storyboards at here. With each screen should be has a storyboard file for itself => Reduce conflicts when merge Pull Request

bandlab's People

Contributors

levantaj avatar

Watchers

James Cloos 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.