Are there any features that ReactJS possess, while AngularJS lacks? [closed] - angularjs

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I was playing with ReactJS for a bit, and given a bit of prior exposure to AngularJS, and the way things are done in the latter, I had a hard time to get used to the syntax and the 'flow' of React.
So I had the above-mentioned question, plus: are there scenarios when ReactJS should be preferred to AngularJS?
Could anyone point out what can be done [easier/better/more efficiently] in React rather than in Angular, and other way around.

It's actually the opposite. Angular has a lot of features, apis, configuration options, etc. React tries to be much simpler and let you choose how your application is structured. Controllers, directives, and templates are reduced to just components. Services are just plain JavaScript, there's nothing React specific about it. Things like $q and $timeout don't exist because there's no digress (use anything you like for those).
You use React in your application, vs making your application in angular.

ReactJS uses the concept of virtual DOM which speeds up the rendering of the app.
Watch Pete Hunt's excellent video on Virtual Dom here:
https://www.youtube.com/watch?v=-DX3vJiqxm4
The syntax might be very unconventional but the same thing can be said about Angular's concept of Directives, services, controllers, etc. It just takes time to get used to, but once you feel comfortable, you'll find that thinking in ReactJS really makes sense.

Related

When should you use a front-end framework like Angular or React, and when just use plain HTML/CSS/JS? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I know that for a simple static website, using plain HTML.. is the easiest and quickest way. But, what are some use cases between the two options? Is using a framework mostly the best solution?
You can basically see frameworks as pre-written structures for your App.
In other words, frameworks are meant to help you building applications quicker by addressing common development problems.
So, going back to your question, there are not really times where you would prefer vanilla javascript over frontend frameworks due to the incapacity of scaling well, which could result in inscrutable and unmaintainable spaghetti code.
Other bit you would want to consider about frameworks, is their high performance obtained thanks to their virtual DOM (abstract map of the real DOM), which helps handling events to update parts of the App without the need of re-rendering it.
On the other hand, I would suggest to go with a static website using pure HTML and Vanilla JS, only if learning / instructing someone, or if building something really really simple (but rest assure 99% of your commercial websites may suit better under a framework rather than without).
If you want to read more about it, I would suggest the following articles:
https://stackoverflow.blog/2020/02/03/is-it-time-for-a-front-end-framework/
https://gomakethings.com/why-do-people-choose-frameworks-over-vanilla-js/
https://www.freecodecamp.org/news/do-we-still-need-javascript-frameworks-42576735949b/

Has angular been replaced with typescript? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
So I went through a good tutorial of Angular 1.x.
I visited angular.io to have a look at Angular 2.
All I can see is Typescript, Javascript, and Dart references.
Is what I learnt about Angular pointless now and should I start learning Typescript?
Thanks
TypeScript is only a superset of Javascript. So everything you can do in JS, you can automatically do with TypeScript, too.
With Angular 2 the whole framework changed. Things that partially stayed similar is the template rendering, where only a few keywords changed their name, but the overall concept stayed the same.
The approach for building the app however changed completely.
I'd suggest this article. Be careful though, since a few things stated on that page are already outdated again.
Yes, of course you should start learning Angular2 with Typescript(or any other available platform).
Angular2 framework has been written from the scratch in Typescript.
Believe me by far its one of the best frameworks available nowadays.It provides many features(You'll come to know once you start learning it). Testing components has become so easy.
You can use javascript, dart & typescript with Angular2. I prefer to use Typescript with Angular2. Compare to Javascript, typescript is easy and helpful. There is a separate process which converts your typescript code to javascript code.
while coming from Angular1.x(with JS) background, I understand it is not easy as Angular2.0 is not directly related to Angular1.x.
But soon Angular1.x will be replaced by Angular2.0 and then you will have to learn it so better to start learning now.
Additionally, you can migrate your Angular1.x apps to Angular2.0 with upgrade process
I have so many things to say but I think this much will help to go ahead.

Why should I use Angular 2? What are it's advantages over Angular 1? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Angular 1 excels in data binding and provided a structued MVC MVW framework.
It fails in providing built-in modularity.
What are the core selling points of Angular 2? Im not looking for opinion, just plain simple bullet point facts and Im only interested in core selling points.
Also what other libraries such as bootstrap / polymer gel well with angular 2?
For me? Just off the top of my head:
Support for Functional Reactive Programming using RxJS Observables.
Built from the ground up with Typescript, meaning Types are a first class construct.
Unidirectional data flow.
Native ES6 Modules, no more endless script tags.
Fully component based.
Better template syntax.
An even better Router.
Much better Dependency Injection.
Support for sped up initial loads thanks to server-side prerendering.
ZoneJS Support, no more digest loop!
Of those my favorite feature is definitely the FRP support. We can drastically enhance performance by using Immutable Objects or Observables for our change detection.
The Formbuilder API as well as the HTTP API is fully compatible with RxJS making it very very powerful.
As for libraries, Angular-Material is obviously a big one. Another favorite of mine is NativeScript, which aims to create fully native mobile applications from your Angular 2 App. I'm sure there'll be tons more once it actually releases.

Do i need a JSframework? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I want to add some JS functionality to our site. (wishlist, inquiry, ect) I think it would be nice for the UX that it is going to be build with some JS code
Do i need a JSframework like Angular, ember ect ? Or are JSframeworks only make sense for SPA like editing/backend tools?
That decision is up to you. AngularJS is awesome, but it's not really meant to be used for little pieces of a project. For my taste, I'd write everything with AngularJS. You probably want to check out Backbone if you want to only use it here and there.
From Backbonejs.org:
Philosophically, Backbone is an attempt to discover the minimal set of
data-structuring (models and collections) and user interface (views
and URLs) primitives that are generally useful when building web
applications with JavaScript. In an ecosystem where overarching,
decides-everything-for-you frameworks are commonplace, and many
libraries require your site to be reorganized to suit their look,
feel, and default behavior — Backbone should continue to be a tool
that gives you the freedom to design the full experience of your web
application.
Angular is more like the "overarching, decides-everything-for-you frameworks" it mentions.

Is it better to make Backbone.js applications single page applications? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Since Backbone's Router only work with "#", it means that it should be all in the same page. Should a BB application be only in one page and have only 1 Router?
One of the many nice things about Backbone is that it is very unopinionated about how you work with it. For example, if you just want to use views, then you can do that, and if you want to just use models, you can do that as well.
A Backbone application can be a single-page application, and it certainly provides a lot of functionality to make that easier if that is your goal, but it doesn't have to be. There is absolutely nothing wrong with explicitly calling your views by hand instead of using a router.
To answer the second part of your question... No, you can have as many routers as you like. However, I'd say a large portion of Backbone apps out there make do with just one. I am working on a Backbone app that has over a hundred different views, and I've never run into an issue where I'd have to introduce a secondary router.
Finally, a bit of a correction on your end; The Router object actually doesn't enforce the "#" anymore as long as your browser has pushState functionality. Older browsers (mainly IE) will fallback to the hashtag approach if necessary.
Hope this helps!

Resources