os-guild / dynamico Goto Github PK
View Code? Open in Web Editor NEWDynamico allows a remote (web-like) code push work-flow for continuous delivery of specific features native or web.
License: MIT License
Dynamico allows a remote (web-like) code push work-flow for continuous delivery of specific features native or web.
License: MIT License
Must haves for open sourcing the project:
Other cool stuff for the future:
exports
object instead of just default
in the dynamico coreWe 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.
Enabling keeping the index file in a different storage that is better for map-key such as redis but keep the components code in a different storage.
The image uses the cors package from npm. The package is really configurable, check out
cors on npm. We need to think which configurations make sense and what is the best way to allow people to control them. If #58 is done before this it might affect the solution to this issue.
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 ๐.
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.
At the moment the core initializes upon requesting the first component. The initialization registers the host with the registry and saves the generated hostId
. We should add a way for consumers to trigger initialization when they want to or do it automatically when the app loads.
in order to make it easier to get started we should create a docker image for a server with fs-storage
example of a working server like this can be seen in ./examples/react/proxy.ts
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)
in dev mode - bundle is not minified and gzipped, while in the server it is (after build).
so it will be nice to be able to tell how my new change will affect the final bundle size.
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
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
we should add - bump version command for ease of publishing as there is in lerna version
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.
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
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.
along with types: #17
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.
if server fails to respond with host id and a component still tries to render we get an err from the server which then is saved to localStorage
Adds a basic contributor guide (CONTRIBUTING.md
).
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.
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.
When there's a local version of the component it should use it unless the server returned a new version of it, we think it got introduced on #40
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.