Giter VIP home page Giter VIP logo

dynamico's Introduction

Dynamico

A remote (web-like) code push work-flow for continuous delivery of specific features native or web.

Known Vulnerabilities Coverage Status npm version CircleCI

React Next 19' talk

Try it out

What Dynamico does best

Why?

Native & Web

  • Client and server framework agnostic

    • Client core and server driver are plugable by design - choose your own frontend framework (or go vanilla) and your own server and components storage
  • Blazing fast feature delivery

    • Continuous Delivery for features
    • Avoid publishing new app version for every feature
    • Allow micro-frontend workflow
    • Remove the hassle of knowing the internals of the host application
  • Reduces bundle size

    • Faster app build time
    • Simpler app build proccess
    • Shorter stores app reviews (Mobile only ๐Ÿ™) learn more here
  • De-monolith-ization ๐Ÿคฏ

    • Team independent feature development, test & release
    • Seperates core main features from lazy-loaded dynamic flows
    • Eliminates pull-requests rebase push race
    • Reduces repository size and complexity
    • Share components across multiple apps
  • Specific feature version management

    • Caches locally and updates immidiatly
    • Smart host dependencies resolution

When?

Dynamico allows a remote code push work-flow for continuous delivery of specific features.

Native

  • Whenever you're using a js based library to create a native app (e.g React Native, Electron, etc..)

Web

  • When you want to avoid a monolith
  • When many developers work in a single repository and need to iterate fast

Future thoughts

  • Micro-frontends framework
  • JSON based configuration that your PM can write and decide what components to show
  • Config based feature rollout and A/B testing

Roadmap

  • Analytics

Native stores complience

Apple appstore

  • This framework, when used properly, complies with section 3.3.2 of the developer agreement and actually encourages safer patterns than the alternatives:

Except as set forth in the next paragraph, an Application may not download or install executable code. Interpreted code may be downloaded toan Application but only so long as such code: (a) does not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store, (b) does not create a store or storefront for other code or applications, and (c) does not bypass signing, sandbox, or other security features of the OS.

dynamico's People

Contributors

dependabot[bot] avatar eladav avatar eladbezalel avatar mikechatsky avatar nadavshlezz avatar nataly87s avatar sis0k0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dynamico's Issues

When initializing a new component dependencies versions should be up-to-date

Now when you create a new component using dcm init it'll generate a package.json file with your dependencies set to some static version we hard-coded. In the process of creating the component dcm can check on npm and see what is the latest version that makes sense and initialize the component with that (i.e. there should be some strategy other than taking the latest but not something too complicated...)

See the code here. Instead of setting RN version to 52, we can now use 60. This can be done for every dependency in package.json files.

Support more ways to control docker images other than environment variables

currently you control docker deployments with setting environment variables which is an easy solution but considered not secure. These environment variables contain connection strings and maybe other sensitive information. We should allow configuration via files and any other way that makes sense for running dynamico in a container.

Pass props to fallback component in react-client

Currently when the component is loading or if there's an issue we just render the fallback component without passing in props. In some cases it might be very useful to use the same props you the dynamic component expects to accept.

See code here. We can pass in props to fallback component instead of just returning it raw.

Add Comparison with Alternative Solutions (Expo, CodePush)

Expo and CodePush are two popular solutions providing seemingly the same functionality as Dynamico (is this wrong? if so please correct me!)

A comparison with the alternatives, or a highlight of specific features not found in those other solutions would be useful for anyone evaluating Dynamico as a tool for their job ๐Ÿ‘.

Support developing multiple components locally

We want to allow users to have multiple components run in dev mode. The solution we suggest is to create a "workspace" mode for dcm that will bundle all components in the workspace. In the host app side you'll need to set either all the components you want to have in dev mode to be in dev mode or set a property that initializes the client in dev mode.

The suggested workflow is:
User sets Dynamico client to dev mode (the react client).
Loads dcm with a workspace configuration.
dcm scans the workspace and bundles and serves every folder with a package.json.
The host app tries to load a component locally and if it fails to get a proper response (or gets a dedicated response) tries to download it from the public registry.

Add dependencies provider

Let's say we have a dynamic component that renders other dynamic components, and wants to add more dependencies for these components to use.
currently we can do it manually by passing a new client through the provider, but I thought we could make a DependenciesProvider

Roadmap

Must haves for open sourcing the project:

  • Publish a component - how do we separate the publish from retrieving the component.
  • Tests...
    • client
      • cli
      • core
      • react
    • server
      • Driver
      • Middleware
      • fs-storage
  • Documentations
  • Replace prettier with tslint
  • Publish middleware from dcmfile
  • Error handling in server
  • Error handling in client
  • Error messages in Cli
  • Example server

Other cool stuff for the future:

  • Dependencies plugins for popular packages
  • Think how a view manager would look like for this framework (how can we use dynamico to create a full blown micro frontends framework?)
  • Optimize performance by getting default version on build time: When you build your app, dynamico pulls code for dynamic components and caches them for first time use.
  • Handle offline in requests in core
  • return the entire exports object instead of just default in the dynamico core
  • use Auth0 free account for authentication

Common types should be exported from a shared package

We want to be able to use the same types in clients and server code. This will allow unified type validations and provide a validation over our client-server contract (both for dcm-middeware and core-middleware.

We should create a @dynamico/common-types package.

When initialization fails component's code should be taken from cache

When the client side core initializes it registers the host with the registry and saves the generated hostId. Component requests are queued until the request succeeds, but they are not released from the queue if the registration fails. We should try to take the code from local cache if it's available and release the queued requests anyways.

Remove initialize step from client

Have an isReady state on client and set an EventEmitter once the server responded with host id,
in the meantime keep all components render in a queue and once the event has been triggered - render.

this will simplify the api of creating a Dynamico client

Rate limit for registerHost endpoint

Currently register host is as exposed as get component route. It might lead to DoS attacks. We should at least recommend on some pattern to help mitigate the risk... see here

dynamico is not a function

I've started a new server according to the steps in
https://github.com/Soluto/dynamico/blob/master/server/readme.md#Storage

and got the error:

TypeError: dynamico is not a function
    at Object.<anonymous> (/Users/ronsivan/Documents/repos/dynamico-registry/index.js:6:28)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

Support async storage providers in driver

Currently the driver uses the storage interface synchronously. To support storage providers other than file system we should have the driver use an async interface of the storage providers.

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.