Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is AngularJS called a poor fit for GUI editor apps? [closed]

While evaluating AngularJS for a project, I noticed the following paragraph in its documentation:

Games, and GUI editors are examples of very intensive and tricky DOM manipulation. These kinds of apps are different from CRUD apps, and as a result are not a good fit for Angular. In these cases using something closer to bare metal such as jQuery may be a better fit.

But the docs continue without really explaining why this is so. In order to make an informed decision about what technology we use for our project, I'd like to better understand where this statement comes from and what facts are behind it.

What specific problems would hamper someone trying to build eg an illustration tool, or a video editing suite, in AngularJS?

like image 433
Crashworks Avatar asked Jul 24 '13 19:07

Crashworks


2 Answers

This is a good question. Angular provides great declarative facilities for your run-of-the-mill web page work. To do this it relies on a watchers and constantly checks for changes on watched properties, then updates the UI with changes. The FAQ claims this process is "snappy" with hundreds or thousands of bindings which is good enough for most uses. Games and GUI editors can have complex interfaces with frequent or constant user interaction, so constantly re-evaluating a huge collection of watchers may not be the most performance-conscious way of doing things. Contrast this to a site like Stack Overflow where a user only clicks/presses something every few seconds and cause a re-eval of the watch list. Using a more imperative approach and library(jQuery et al) would cause less overhead.

like image 177
Hippocrates Avatar answered Sep 28 '22 12:09

Hippocrates


Angular has a few limits that come into play here.

First, ng-view doesn't support nested views. So that limits more complex UI design.

Next a "GUI Editor" is usually built around the concept of widgets and dialogs. Angular is built around very different concepts. You can simulate widgets with directives somewhat. But it will feel like you're fighting Angular the whole time.

Basically nested scopes, isolate scopes, and declarative data binding aren't common paradigms for complex GUI work.

like image 41
wmil Avatar answered Sep 28 '22 11:09

wmil