r/Angular2 • • Jul 30 '20

Discussion This thing never ends.. ( crosspost from /webdev )

Post image
130 Upvotes

37 comments sorted by

2

u/boogermanus Jul 30 '20

Is Angular Hashirama or Madara?!?

7

u/eneajaho Jul 30 '20

I like Hashirama as I like my Angular.

1

u/estacks Jul 30 '20

Angular is the one that slapped its opponent off to the living death of webshit. Corporate code is king.

21

u/[deleted] Jul 30 '20

Aren't stencil and svelte different frameworks for completely different use cases? Doesn't Vuejs exist and is pretty popular?

3

u/frontend-guy Jul 30 '20

I think stencil and svelte can do the exact same things in pretty different ways

4

u/[deleted] Jul 30 '20

Stencil is a web components library, and it's well optimized for that case. Svelte is a compiler, with which you can build web components. Last time I checked stencil's bundles are much smaller and its features are a huge plus for it as a wc lib, especially the documentation. Svelte has other use cases that it is better at.

5

u/frontend-guy Jul 30 '20 edited Jul 30 '20

I think they market themselves very differently, but you can do just about the same thing with any of the two.

Stencil is a compiler too, particularly specialized for design systems thanks to their lazy loading system.

Some applications are built fully with Stencil, ex DeckDeckGo

Their approach is different, their use-cases similar. I was deciding between the two recently and decided to go with Stencil, but svelte would have worked decently as well. I just prefer the component class system.

2

u/columferry Jul 30 '20

You could argue that Angular can build to web components too with Angular Elements

4

u/frontend-guy Jul 30 '20

And a compiler too :)

1

u/[deleted] Jul 31 '20

But why would you want to do that? the bundle size difference between stencil's wc and elements' is huge.

1

u/columferry Aug 01 '20

There are use cases, such as integrating components made with newer versions of angular into a legacy angular system, but my main point was that the comparison picture didn't account for Angular also compiling web components

1

u/BrunnerLivio Jul 30 '20

I was thinking about that as well. Though I wouldn't go in this direction unless it's your "last resort". Don't get me wrong -- Angular Elements is great. Though if you let' say build a new UI Kit for a Design System and want to go with Web Components, I would not go with Angular, simply because its "slow by default". You have to ship Angular in order to just use your library.

Let's say a React application is using your library and only uses maybe 2-3 components. Is it really worth shipping the whole Angular framework for that? Hell no.

Not to diminish Angular Elements - it has its use cases and is very well done, though if you know your target is a Web Components library from the beginning of the project it does not make sense to use Angular.

1

u/frontend-guy Jul 31 '20

May be wrong here but you don't ship the whole framework for using elements

1

u/BrunnerLivio Jul 31 '20

Off course it depends on what you’re using & Ivy is gonna help a lot. More on that with this article. Its possible to minimize the components drastically and may be a viable solution for shipping bigger components. Though if you have the choice to choose a different framework & you wanna go framework agnostic, I’d definitely go with either Svelte or Stencil. You are almost certainly never be able to shrink down your bundle size with Angular as much as with Svelte or Stencil — since Angulars main intention was never to be compiled and shipped into different frameworks.

1

u/catapop Jul 31 '20

Svelte for web components is very limited. You need to do a lot of hacking especially if you want to define component events.

Svelte wasn't build for generating web components, it just happened that he could do that as well, but it's clear it wasn't the main focus.

-1

u/PewPaw-Grams Jul 31 '20

React exist and it’s very popular

1

u/LdouceT Jul 31 '20

Yeah, and it's not a framework either.

1

u/PewPaw-Grams Jul 31 '20

and VueJS is? LOL

7

u/vontanio Jul 30 '20

My boss wants to do everything in svelt now, what you guys think? Been doing angular since angular 2 i feel i am cheating .

13

u/Lykeuhfox Jul 30 '20

I'd embrace the opportunity to try something new. A lot of companies will stick to one thing and you'll languish there.

3

u/jdc_code Jul 30 '20

I'd love the opportunity to write a shipping product in Svelte. I'm actually going to pitch the idea to my boss about a new experimental thing we've started on that's really just a couple of API endpoints right now. I say take advantage of it and be thankful you're not maintaining some garbage legacy codebase.

-7

u/Lhaer Jul 30 '20

Vue.js beats all of those

5

u/ZobbL Jul 30 '20

in which way? what does Vue better than the rest? genuinely curious coz the last time I looked at Vue it didn't strike me as the best option

-3

u/Lhaer Jul 30 '20

I particularly like Vue because it's not strongly opinionated like Angular and at the same times it's not as minimal as React.js. Angular is just way too big, I think it's just unnecessarily complicated. I like React.js too but I find Vue just much easier to pick up and build projects with it, it has a decent declarative template syntax (or you can also use JSX or render functions), single file components, decent SSR support, it's very simple to use, very versatile, and has decent performance.

The framework you choose mostly depends on personal preference though, as you can basically achieve the same things with these three frameworks, it's just that certain tools make it easier to achieve certain things

17

u/tooObviously Jul 30 '20

Everyone says angular is too heavy but for anything bigger than a pet project I would appreciate the opinionated nature and all of the tools angular provides like observable, pipes, etc

-1

u/jdc_code Jul 30 '20

I do appreciate having a lot of that stuff at the ready, but using anything in Angular is just sooooo boilerplate-heavy.

6

u/tooObviously Jul 30 '20

I mean that's the whole point, if your project is big enough then the boilerplate is nothing compared to setting up everything on your own like reacts router library

0

u/jdc_code Jul 30 '20

I guess, but it's not like low-boilerplate and feature-rich are necessarily mutually exclusive.

9

u/tooObviously Jul 30 '20

What's the boilerplate? The angular cli sets up everything. If you don't touch or make any pipes you'll never realize it's there. The CRA boilerplate imo is far bulkier and difficult to dig into.

Im primarily a react guy buy after learning angular for just a month or two I was so impressed by the documentation, tools, and how my code was just way easier to modify and split up

2

u/jiggity_john Jul 30 '20

Thanks for your perspective! I wish there were more people who could just admit that each tool has its pros and cons. I have more experience writing Angular code than React code, but there are some React features I'm envious of. HMR and the functional components / hooks feature are really great.

I do however think that Angular has much more expressive templating which I miss in React. Directives and selective content projection allow you to create some really fluent and flexible APIs. I also dislike that component-scoped styles aren't out of the box with React and you pretty much have to ship one of these css-in-js libraries nowadays if you want to do anything sensible.

I've been leaning towards Vue these days because I think v3 promises to be quite good, offering native typescript support, and improved performance. It also seems to be a good mix of Angular style templating and styling with React style composition apis, as well as a fairly large and growing community.

2

u/tooObviously Jul 30 '20

Yeah honestly I want to learn vue, they say it's a good balance between react and angular and that sounds very intriguing.

I just don't entirely understand the hate with angular app setup, it feels heavy but once you're in the flow it's very well designed.

React just let's you do anything so everyone does the same thing slightly differently and you have to depend on outside libraries for components and freaking styling like you said.

Also I love typescript but I don't think it's nearly as good in react as it is with angular

→ More replies (0)

1

u/jdc_code Aug 01 '20

Generated boilerplate is still a bitch to maintain. And I was (mentally) comparing the boilerplate to that of Svelte; I realize that React is also pretty bp-heavy.

0

u/[deleted] Jul 30 '20

[deleted]

1

u/dse78759 Jul 30 '20

Which day was that? It was ALWAYS Commodore 64 vs Apple, and commodore always won because it was way cheaper!