Hacker News new | past | comments | ask | show | jobs | submit login

Angular: Learn about property binding, event binding, pipes, templates, views, metadata, attribute directives, structural directives, services, modules, components, injectors.

React: Write a function that generates a piece of HTML. Use standard event handlers to manage user interactions. Update state via setState methods. Ship it.




The first time I saw this in Angular's material implementation I was completely floored: https://material.angular.io/components/dialog/overview#shari...

The method for passing data to a dialog component is to import a magic constant and inject a data field into it's constructor? It's a completely over-engineered, nonsensical solution for a problem that doesn't even exist in React. There's so much stuff you have to be familiar with in Angular just to build the simplest features.


Don't use this library as an example of Angular code. I've written dozens of Angular apps and none of them were so over-engineered. AngularMaterial is a good example how to not design API. I'm sorry if it insults some people - we all make mistakes, it's ok, I'm sure you'll next library will be better and I understand it's too late to change API in a project, when some huge Google apps are using it.


Not only is @angular/material the most popular component library by a huge margin but it's maintained by the Angular team itself. If it's as bad as you say it is that really doesn't inspire confidence.


Yes.

Take a look at what you have to go through if you want to create a custom component in angular material (that can sit inside a form):

https://material.angular.io/guide/creating-a-custom-form-fie...

Something has gone completely wrong here.


Agreed, I've had to use angular material in the past and never would again. I generally enjoy Angular though.


The last time I looked at Angular Material was quite some time ago, but at the time I was really surprised because it didn't follow the conventions established in the docs, and the conventions it did use seemed nonsensical given the design of the Angular framework.

I can only guess that "same team" was a design-centric subteam for Angular while the engineering-centric team worked on the framework/documentation itself, or that Angular Material was under pressure to get implemented before all the best practices were established and by then they were stuck with the API.


Having suffered on a large Angular code based on Angular 7 and then Angular 8 for a couple of years, I just wish Angular would fucking die. Every small thing is a giant shit-pile of services, components and HTML templates that are all accidental complexity.


It reminds me of the whole .NET ecosystem. All of these custom magical special ways to do everything, compared to ‘dumb’ setups like node/ruby/go where the actual logic is just right there in front of you

And every release .NET just keeps moving closer to the dumb systems. Simple and raw is good, keep the magic away


I am really glad there are other people who think this way. I am experienced with Python/JS/Ruby web app development models and recently had a look at ASP.NET Core web api projects.

The amount of complexity is mind boggling.

I mean, look at Flask in Python. Or even Expressjs in Node, why can't Microsoft come up with a simple framework that can run well on the .NET runtime?

I am a huge fan of C#, having used it for Desktop app development.

I would love to have a framework like flask in the .NET ecosystem.


Ah, yes, expressjs, or as I like to call it, "the mutation ecosystem," where who knows what middleware has mutated which object in which way, and whether any state has leaked or whether any assumptions about control flow will actually hold true. Where it's common to see callbacks, streams, Promises, generators, and async/await patterns all thrown together in a mishmash that requires continuous syntactical context-switching.

Honestly I'd rather develop in vanilla NodeJS where the approach is at least consistent, than in the Express ecosystem where sure your problems may have been solved 1000 different ways already but where none of them really fit what you want to do, and where there are many layers of hidden incompatibility that are going to require you to make adapters for each library anyway.


What's so complex about ASP.NET Core web api, other than having to learn to use a DI framework?

I found it very simple and minimal (again, other than the DI) when learning it.


Can you elaborate on the "mind boggling" complexity?

Flask is self-described as a "micro framework", which makes it simple to start with, but IMHO difficult to grow into something bigger.

I like the balance the ASP.NET Core 3.0 strikes.

  dotnet new webapp -o HelloWorld
Yields a fully functional site with * HTTPS * Logging * HTML templating * CSS/JS bundling & minification

And all of this is easy to customize and change.

"Web API" projects are even simpler-- it's just a small handful of files.


Is something like Nancy [0] close to what you're after? I've not used it myself because I prefer the structure of the full approach but from my extremely brief interaction with Express in Node it seems similar?

[0]: https://github.com/NancyFx/Nancy


Angular really shines in Enterprise context. 13+ teams and all use the same stack. Enter React and you are in maintenance hell, is my experience.


If you have enough governance in an enterprise org to standardize on Angular, you should also have enough to standardize on a particular React stack, and not just "React".


Yes, same goes for Vue etc. You can hardly govern the freedom React provides. If you do, you can use Angular in the first place, because it has solutions out of the box. This is not to discredit React or Vue.

I am judging from my experience developing applications with 200+ developers across continents. You can write crappy code in Angular as well, but it helps you govern your architecture and your app. If you want modular components that can be reused, go for Angular. For smaller things or landing pages use Vue, React.

My experience.


Most popular re-usable component libraries and websites are written in React.


I haven't used the more recent version of Angular so not sure what their "stack" is, but doesn't `create-react-app` take care of much of that?


React: discover that function alone doesn't do all that is expected from an UI Framework, go hunting for a myriad of libraries to handle state, communications across components, tune performance 'cause FP approach makes GC do overtime, endless hours explaining to fellow devs what is this FP stuff all about,....


And honestly, if misused you can really tank performance quite easily. The learning curve can make it incredibly difficult to introduce to a team of developers with variable skillsets.


But then all your colleagues also have to learn(read do it that way) versus each coming up with their own nonsense...


Yep, when I was studying Angular I kinda felt it was trying to reinvent everything, so personally I can wrap my head around React a little bit more. However I know people consider React more of a library, maybe Angular is more of a full on framework?


Stencil provides similar experience to React, plus Stencil compiles every component into typed web component, so it works with other frameworks as well.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: