Coder Social home page Coder Social logo

thepugapp's Introduction

ThePugApp

The Pug App Swift - iOS Application to handle The Pug challenge using Xcode and Swift

Architecture

The app is using MVVM architecture, the main goal is to mantain everything under a simple but effective MVVM implementation.

  • Modules

    Each Module has ViewModel, Models, Views to handle the base Architecture design.

  • ViewModels

    ViewModel is the main component of this architecture pattern. ViewModel never knows what the view is or what the view does. This makes this architecture more testable and removes complexity from the view. The ViewModel invokes changes in the Model and updates itself with the updated Model, and since we have a binding between the View and the ViewModel, the first is updated accordingly.

  • Models

    Model refers either to a domain model, which represents simple data.

  • Network Layer

    Network layer is a set of Services Protocols to handle the API calls to the Endpoints using an Adapter and Protocol Oriented programming.

Please consider this article if it is your first time using MVVM: https://medium.com/@azamsharp/mvvm-in-ios-from-net-perspective-580eb7f4f129

Frameworks

The app is using some external frameworks dependencies using Cocoapods:

  • Alamofire

    • A network layer to handle REST API requests for HTTP request, used to implement the Service Network API calls.
  • SDWebImage

    • A framework to handle image URL downloads easy and quick to download and display the Pug Images
  • SwiftLint

    • A framework to handle best practices lint rules for Swift used as a best practice

Installation

This project use Xcode 12.4 and CocoaPods for dependencies,

  1. Clone Repo:
    git clone [email protected]:devcarlos/ThePugApp.git

  2. CD Directory:
    cd ThePugApp

  3. Install dependencies:
    pod install

  4. Open Project:
    open ThePugApp.xcworkspace

  5. Build and Execute:
    build using Xcode CMD + R using a Simulator or Device

Structure

In the root of the project we found this folder structure and files:

|-- ThePugApp
  |-- App
  |-- Assets
  |-- Common
  |-- Extensions
  |-- Network
  |-- Modules
    |-- Home
        |-- Views
          |-- Cells
          |-- Storyboards
          |-- Controllers
        |-- Models
        |-- ViewModel
  |-- Storyboards
  |-- SupportFiles
    |-- Info.plist
|-- Podfile
|-- Podfile.lock
|-- LICENSE
|-- README.md
|-- RESULTS.json
|-- .gitignore

Where all app code is hosted in ThePugApp folder, all the Info.plist settings files for xcode project are hosted in SupportFiles. For each module of the app we use the folder structure show it in Modules folder.

thepugapp's People

Contributors

devcarlos avatar

Watchers

 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.