News for hackers. Stuff that matters.
Re:Angular v16 by warent on Wednesday May 03, 2023 @10:45PM (#35810646)
Their own website renders the Angular "template" as a string with no syntax highlighting.

The framework is extremely overengineered requiring multiple files for "hello world"

It introduces a lot of unnecessary complexity for projects of any size

It uses invalid HTML, with attribute syntax including brackets and parentheses

Sadly It's just not a good framework

Re:Angular v16 by stickfigure on Wednesday May 03, 2023 @11:42PM (#35810952)
I wrote this on Quora 8 years ago, and it's still true:

https://qr.ae/pypHJw

It's my answer to what I can tell you agree is the most important question in software engineering - "What programming language has the shortest 'Hello World' program?"

Re:Angular v16 by operatingthetan on Wednesday May 03, 2023 @11:48PM (#35810980)
We're talking about a framework here, not a programming language. I don't think the above poster's assessment about the amount of files needed for hello world offers a charitable conclusion either, given frameworks are not languages. The same file usage would apply to many other popular 'heavy' opinionated frameworks.
Re:Angular v16 by stickfigure on Thursday May 04, 2023 @12:10AM (#35811089)
My point is, nobody writes Hello World webapps for a living. The number of lines or files is irrelevant. There is precisely zero value in this metric.
Re:Angular v16 by operatingthetan on Thursday May 04, 2023 @12:13AM (#35811105)
Sorry, I misread your comment.
Re:Angular v16 by baq on Thursday May 04, 2023 @02:25AM (#35811848)
There’s a grain of truth in that thought. First impressions matter, frameworks aren’t exempt from that basic psychological fact. If you treat ’complexity of hello world’ as a proxy for learning curve steepness (again, people do things like that subconsciously), you may end with a very wrong assessment very early. It’ll probably tell more about the assessor than the framework but it’s a real risk.
Re:Angular v16 by dwaite on Thursday May 04, 2023 @05:35AM (#35813061)
Indeed - if my goal is a minimal Hello, World, I don't even need javascript, I can put "Hello World" in a text file and name it index.html.

Problem is, this doesn't lead me to solve any harder problems.

Re:Angular v16 by operatingthetan on Wednesday May 03, 2023 @11:56PM (#35811012)
>Their own website renders the Angular "template" as a string with no syntax highlighting.

That's not even a criticism of the framework.

Re:Angular v16 by kumarvvr on Thursday May 04, 2023 @01:43AM (#35811635)
> The framework is extremely overengineered requiring multiple files for "hello world"

Is that a valid criticism?

Angular is for writing medium to heavy complexity applications. Sure, if you want to write hello world programs in it, then it is going to be complex.

This is a generic comment thrown about for all large frameworks.

> It introduces a lot of unnecessary complexity for projects of any size

This I agree.

> It uses invalid HTML, with attribute syntax including brackets and parentheses

True, but so does React and other frameworks. To me, it seems like this is a limitation of HTML rather than a transgression of Angular.

> Sadly It's just not a good framework

It is a good choice for a large organization, with team members changing and all sorts of other goodness.

Re:Angular v16 by paulddraper on Thursday May 04, 2023 @01:59AM (#35811715)
Sadly, those statements are objectively false.

> requiring multiple files for "hello world"

False (unless you're counting angular.json conf file for Angular CLI??)

> It uses invalid HTML, with attribute syntax including brackets and parentheses

And what, JSX is valid HTML????

FWIW Angular templates is completely valid HTML. (The only non-standard thing is that the attributes are case-sensitive.)

Re:Angular v16 by snemvalts on Thursday May 04, 2023 @03:06AM (#35812219)
JSX can be syntax highlighted and linted easier. What if a variable that is being referenced is missing at that time in the component's lifecycle?

JSX makes so much more sense, making code the parent of the template, instead of keeping code and template as siblings.

Re:Angular v16 by cout on Thursday May 04, 2023 @08:36AM (#35814293)
This has been a debate since long before React or Angular existed. Keeping code and templates together typically makes sense to programmers while keeping the template as html in a separate file means you can edit it in any html editor, no special tools needed. I've always been partial to keeping them together, but working with designers who prefer it the other way, I can at least respect where they are coming from.
Re:Angular v16 by paulddraper on Thursday May 04, 2023 @10:43AM (#35816152)
I mildly agree.

I note that Vue and Svelte have the same issue, and yet I rarely hear this criticism of them.

Re:Angular v16 by tonis2 on Thursday May 04, 2023 @03:30AM (#35812409)
Lots of web developers love complexity, it makes the work you do seem more important.
Re:Angular v16 by uasi on Thursday May 04, 2023 @06:45AM (#35813479)
> It uses invalid HTML, with attribute syntax including brackets and parentheses

Brackets and parens are valid in attribute names.

Section 13.1.2.3 of the HTML standard[0] states:

> Attribute names must consist of one or more characters other than controls, U+0020 SPACE, U+0022 ("), U+0027 ('), U+003E (>), U+002F (/), U+003D (=), and noncharacters.

[0] https://html.spec.whatwg.org/#attributes-2