liferay-labs-br / fiber

The framework specialized in animated components.
MIT License
5 stars 4 forks source link

Design architecture #5

Closed matuzalemsteles closed 6 years ago

matuzalemsteles commented 7 years ago

Disclaimer

We need to design the architecture of the files thinking of server-side rendering and center the Fiber core as isomorphic.

Suggestion

We can think of a multi-package repository using lerna, but putting all the files in src and packages in packages with an index giving a require to their corresponding files to centralize the share of some libs. Create a folder called isomorphic to center the core of the fiber.

API of component

We can create a src/isomorphic/FiberBaseClass.js file as a Component API contract to be reused with components outside the browser or as a native app in the future.

matuzalemsteles commented 7 years ago

Just putting here, what was said in #5 to continue the speech.

cc @clovisdasilvaneto

New names for the files

My proposal is a consistency of names among the files, we currently have:

.
+-- isomorphic
|   +-- component.js
|   +-- createComponent.js
|   +-- element.js
+-- renderers
|   +-- render.js

My idea is that we use FooBar for filenames and starting with Fiber:

.
+-- isomorphic
|   +-- FiberComponent.js or FiberBaseClass.js
|   +-- FiberCreateComponent.js
|   +-- FiberElement.js
+-- renderers
|   +-- FiberRender.js

What do you think?

clovisdasilvaneto commented 7 years ago

That sounds like good, I think is perfect

matuzalemsteles commented 7 years ago

Okay, I'm going to send a pr with this change.

ray-bot[bot] commented 6 years ago

Hey, Your issue has been resolved 🎉, Thanks!