TypeScript is a language, a superset of JS that adds syntax for optional types (which are extremely helpful). It can be used for React as well and for any other JS project.
Angular is a UI framework which is in my opinion over-engineered and is built on top of bad practices like mutations (eg. two way data binding). Mutations are useful when performance is needed, but if not encapsulated tend to be the cause of too many hidden bugs difficult to detect or even fix. Newcomers I mentored had problems with Angular since it required too much knowledge to contribute even a little. Another example is the model-view-presenter structure which I've found to be hard to maintain on large projects, it was confusing to too many people and allowed for mistakes to happen very easily. Having such complexity at the very beginning takes focus away from the application. React is a UI library which I believe got it right from the start, it revolves around separation of concerns, app state propagates hierarchically downwards (unidirectional data flow) and changes are done with callbacks instead of directly mutating (these are called controlled components). Mutations can still be used, but are not used by default. React uses virtual DOM and an algorithm called 'reconciliation' that determines when and what to update in the DOM, since state changes generate new objects, to me it's simpler than Angular's Change Detection. All of which is debatable but in React things have mostly worked out of the box for me, while in Angular there were many times an extra step, a solution to a problem that should not have existed in the first place and felt like a workaround. React has JSX syntax that combines HTML and JS and recent updates added 'hooks' syntax which even more simplifies the state management. In short I think that React based projects have bigger chances for community contributions because of ease of use. About NPM, it can sometimes be tricky but I think it's manageable, it shares some problems/solutions from many different package managers, like mismatch of node version between dev environments, incorrect handling of package-lock.json (a file that hardcodes all dependencies of dependencies versions) or some library incompatibilities with another library which solution is usually in github issues comments. I use NPM in all JS projects. This is based on the experience I accumulated over the last 6 years. Reslav On Tue, Jun 29, 2021, 16:19 Linas Vepstas <[email protected]> wrote: > > > On Tue, Jun 29, 2021 at 8:57 AM Reslav Hollos <[email protected]> > wrote: > >> I'm also interested in AtomSpace UI and have had very pleasant dev >> experience with React (as well as TypeScript which I would recommend). >> > > Well, the current code is in "Angular" -- and is TypeScript. How > different is that? Are Angular and React two different versions of the > same thing, or are they completely different? I can code in javascript just > fine, but things like npm and etc. leave me stumped -- when there's a > problem, I don't know how to debug it. > > --linas > > -- > You received this message because you are subscribed to the Google Groups > "opencog" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/opencog/CAHrUA34hy9RZBg897pPX-hwhkcf_%2BbHmE%2B4QRSsE60p%3DnjKb9Q%40mail.gmail.com > <https://groups.google.com/d/msgid/opencog/CAHrUA34hy9RZBg897pPX-hwhkcf_%2BbHmE%2B4QRSsE60p%3DnjKb9Q%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "opencog" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/CANHDs8%3DrtH%3DUwMb5zwetbX9UPk3XiFnTnw2hy--aNmDqXkr3%3DA%40mail.gmail.com.
