Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ReactApplicationRoot / DuktapeEngine / UIManager #9

Closed
nick-thompson opened this issue Jun 26, 2019 · 3 comments
Closed

Refactor ReactApplicationRoot / DuktapeEngine / UIManager #9

nick-thompson opened this issue Jun 26, 2019 · 3 comments
Assignees

Comments

@nick-thompson
Copy link
Collaborator

Right now the ReactApplicationRoot is kind of a monolith of duplicate codepaths that generally breaks down into interacting with and providing an interface for the duktape context, and providing an interface for constructing the View heirarchy. I'd like to split those distinct responsibilities into a DuktapeEngine class and a UIManager class, and let the ReactApplicationRoot be just a simple wrapper composing those two pieces.

This would allow cleaning up, for example, the multiple different ways of registering a native method in Duktape, and the multiple different implementations of marshaling the juce::var to/from duktape.

@nick-thompson
Copy link
Collaborator Author

This also needs complete type conversion from js types to var types. Right now some of the interfacing has it but, for example, the setViewProperty stuff is restricted to the easy cases (bool, number, string). Ideally this all goes through one code path for converting from js->var and back.

@nick-thompson
Copy link
Collaborator Author

Largely addressed in edb738b after the introduction of the EcmascriptEngine. Right now ReactApplicationRoot still does a lot of work that could be refactored into a ViewManager class, but there's some coupling in there that should be carefully looked at during a refactor

@nick-thompson
Copy link
Collaborator Author

This is completed now as of #46 thanks to @JoshMarler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant