E
E
Edward2016-01-26 19:17:11
JavaScript
Edward, 2016-01-26 19:17:11

Multi-platform, multi-project Javascript, file organization, how did you solve it?

There are many of the same functionality.
Work with the user, balance, authorization, etc.
There are different designs, different platforms, different projects (phonegap, web, iframe app).
There is no desire to copy code between projects. the config and components that display data really change, as well as a couple of modules for functionality are added if necessary.
The result is:
There are Modules (most often common, they contain logic, forms, validation, etc.)
There are Components (a page, a component with widgets, etc.)
There are widgets for modules. (It would be convenient to store the UI with authorization logic in the User module as a widget and use this widget in other components)
Component_Page > Any_Simple_Component_For example_Block > Authorization_Widget
Received approximately such organization of files.
How do you solve such a problem?
bdbd05f3eb9a43db8363e657d717e135.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Kustikov, 2016-02-04
@edtoken

If git is used, then you can move common things to submodules ( https://git-scm.com/book/en/v2/Git-Tools-Submodules) So it will be clearly visible what the changes are - application code or library

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question