Giter VIP home page Giter VIP logo

nativecomponentkit's Introduction

NativeComponentKit

Tests Swift Package Manager compatible

NativeComponentKit is a testbed for experimenting with internal plugin systems. Its goal is to solve large-team problems, where the app needs to be divided into vertical feature slices using hard boundaries. The framework defines infrastructure that allows one vertical slice to share components with another vertical slice without explicitly coupling them.

NativeComponentKit supports iOS, macOS, and tvOS.

The NativeComponentTestApp is the macOS/iOS test app for this framework.

Goals

  • Have the app embed an opaque component (e.g. a banner at the top of the window)
  • Have the app embed a collection of components (maybe collection view of product cards)
  • Have the app embed single/collection of components where API response doesn't have component ID (since service may be oblivious to our component concept)
  • Have the app embed a component where the fields have to be requested (e.g. fetch a banner via GraphQL)
  • Have the app embed a component where the API defines the UI; views and layout (e.g. the component kit becomes a view renderer)
  • Have the app embed a component where the API defines the UI and further API calls (e.g. API can define a form that the component kit can render)

Requirements

  • Swift 5.2 or greater
  • iOS/tvOS 13 or greater OR macOS 10.15 or greater

Installation

Currently, NativeComponentKit is only available as a Swift Package.

...using a Package.swift file

Open the Package.swift file and edit it:

  1. Add NativeComponentKit repo to the dependencies array.
  2. Add NativeComponentKit as a dependency of the target that will use it
// swift-tools-version:5.2

import PackageDescription

let package = Package(
  // ...snip...
  dependencies: [
    .package(url: "https://github.com/andyfinnell/NativeComponentKit.git", from: "0.0.1")
  ],
  targets: [
    .target(name: "MyTarget", dependencies: ["NativeComponentKit"])
  ]
)

Then build to pull down the dependencies:

$ swift build

...using Xcode

Use the Swift Packages tab on the project to add NativeComponentKit:

  1. Open the Xcode workspace or project that you want to add NativeComponentKit to
  2. In the file browser, select the project to show the list of projects/targets on the right
  3. In the list of projects/targets on the right, select the project
  4. Select the "Swift Packages" tab
  5. Click on the "+" button to add a package
  6. In the "Choose Package Repository" sheet, search for "https://github.com/andyfinnell/NativeComponentKit.git"
  7. Click "Next"
  8. Choose the version rule you want
  9. Click "Next"
  10. Choose the target you want to add NativeComponentKit to
  11. Click "Finish"

Usage

TBD

nativecomponentkit's People

Contributors

andyfinnell 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.