zhukov / webogram

Telegram web application, GPL v3
https://web.telegram.org
GNU General Public License v3.0
7.95k stars 2.36k forks source link

What about Components #1413

Open FrancescoBorzi opened 7 years ago

FrancescoBorzi commented 7 years ago

Starting from the 1.5 version of AngularJS, Components have been introduced.

Basically a Component is a special directive that allows us to build component-based applications with a simple API (similar to Web Components). Refactoring an AngularJS app introducing Components would promote modularity across the code and also make it closer to the newest Angular framework (making it easier a future migration, if any).

I was wondering if you considered AngularJS Components and what you think about it.

bartist commented 7 years ago

Some discussion on modularity has been done in #1300 and #1292 , and the general barriers are these

it would make the project more friendly towards (first-time) contributers, but al lot needs to be done first.

FrancescoBorzi commented 7 years ago

I know that there is a lot of code rewriting, but the good news is that we can start converting to Components piece by piece.

The best thing imho would be to prepare a plan (e.g. a TODO list of Controllers that will be converted to Components) so any contributor can help with that.

@bartist also I agree with the module loader suggestion that you mentioned, but that can be also done separately.