Live data from Hacker News

15 years trying to make everyone separate HTML, JavaScript, CSS – and then

twitter.com

151–160 of 177 posts

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#151
post #98

React is popular because of Facebook just like Angular was popular because of Google. Both are bad ideas. Why programmers insist on running off a cliff every few years like a bunch of lemmings, I don't know.

Why do you think they are bad ideas?

IMHO Angular is a bad idea because you're doing rendering in the client side. Maybe your building an HTML5 image editor or something that requires client rendering. But most CRUD apps doesn't really need client side rendering. There is also a hype of SPA (single page apps) which is usually harder to implement than server-rendered apps. It is harder because you have to avoid the browser refreshing the page and keeping the state in the browser AND syncing with the server. If you do server side rendering you don't have to sync client and server with JS.

Many people said that it was ok to render the view using JS in the client, but often they start having performance issues. Not just the performance, but introducing changes in Angular apps wasn't easy for me because there are lots of things going on. I don't have a lot of experience in Angular but the few code that I hacked it was hard to introduce changes because it's hard to follow the flow of changes in the code.

React may be good if you really want to have an SPA and you can afford it. But the complexity introduced by it may not be worth it in many projects where they'd be fine with just HTML/JS/CSS and server rendering.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#152

Thomas Fuchs is a troll. He has posted before on the alleged complexities of React. Yet, he has never posted a coherent argument against the view framework. Even this attempt was thwarted by Blake Newman: https://twitter.com/blakenewman/status/811142762368221184 However, Thomas had nothing to say in response. He only patted himself, and others, on the back both before and after that tweet as he continues to ignore an…

I don't know who he is but he is with Amy Hoy who I heard of and she runs some businesses online. She's popular enough that I think they are doing well enough with their SaaS businesses.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#153

What this image doesn't show: Refactor safety. When I can include my CSS as modules into my components (which, by the way, is still separated, only now it's completely isolated from demonic CSS side-effects), and when I can TEST my HTML (read that again: TEST my HTML, again, easily separatable meaningfully by utilizing a pure-function mechanism), and when I can use something like Flowtype to identify structures in my…

You're accusing TBL for "demonic" CSS (seriously?) which he didn't invent? You should ask yourself why you're attempting to use a document delivery platform into an app delivery platform for shitty apps that nobody wants anyway.

> shitty apps that nobody wants anyway

Nobody wants Gmail, Facebook, or Google Docs.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#154
post #148
post #120

Earlier quoted context omitted.

I don't disagree with the statement about the importance of experience. But I don't see that that point is relevant here. Here is someone who claims to have gained that experience and learned from it, and now at least gives the impression of aiming to share that knowledge. But that's not what he's doing. He's completely ignoring the fact that there have been many, many responses to the issue he's raising, and maybe h…

> He's completely ignoring the fact that there have been many, many responses to the issue he's raising, and maybe he has some good refutation of those responses based on his experience and wisdom, but in that case he does not share it. It just comes off as arrogant and polemic in my opinion. I've started to get so pissed off every time I read about 'separation of concerns' whenever React is discussed. I had the same…

What perhaps boggles my mind the most about this is how many seem to freak out about the fact that there's "Javascript in the render function", but they are happy to write their markup in some templating language (especially if it's server-side).

Even disregarding the discussion of which concerns exactly are supposed to be separated and why, this seems to be perfectly inconsistent to me. It's as if their rule is "there should never be markup in a .js file or tag", but other logic is perfectly fine, as long as the templating language is not JS. Or maybe I'm missing something they're saying.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#155
post #11

Earlier quoted context omitted.

Agreed. Take the example of people hating XML and trying to reinvent everything good XML already had with JSON and JSON Schema. http://json-schema.org/

My biggest peeve with XML is there's no concrete way to represent a piece of XML in code, it's in my opinion TOO flexible. You can express something as an attribute, a child, multiple children of the same element, a value of a child, etc. It doesn't translate cleanly to any kind of object structure in terms of code. And it goes in reverse too. Now, there are standards like SOAP, etc... In the end, JSON and some clear…

> It doesn't translate cleanly to any kind of object structure in terms of code.

XML translates great to an object tree in many object oriented language.

  
    
    Hello
  


  new foo(new yo(), "hello", bar = 1)
Which is why it's so great to describe documents and static UIs.

I agree though that it's not a great choice for a REST API.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#156

Thomas Fuchs is a troll. He has posted before on the alleged complexities of React. Yet, he has never posted a coherent argument against the view framework. Even this attempt was thwarted by Blake Newman: https://twitter.com/blakenewman/status/811142762368221184 However, Thomas had nothing to say in response. He only patted himself, and others, on the back both before and after that tweet as he continues to ignore an…

I don't know who he is but he is with Amy Hoy who I heard of and she runs some businesses online. She's popular enough that I think they are doing well enough with their SaaS businesses.

Well, given her partner, we can be sure none of their products use React.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#157
post #76

The thing about Fuchs is that he's a very smart guy, who is deeply embedded in the modern JS world, and is absolutely aware of what that code is doing, why it looks the way it does, why the trend in frameworks has moved the way it has, just how many times the argument he's using has been advanced already, and how thoroughly it's been trashed over the years. He knows that what he's said has been said a thousand times…

>No attempt at dialogue To be fair, there has never been any effective dialogue on Twitter. 140 characters and out-of-context replies make it impossible.

Not true. I read through twitter arguments/debates multiple times a week.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#158

In my 15 years I've come to realize that HTML code-generation via JavaScript (or now TypeScript actually) is vastly superior to any type of templating (like JSP, JSF, Velocity, Mustache). Both ways (templating v.s. straight generation) have exactly one sort of 'level of indirection' so they are on the same order of complexity, but generating HTML rather than templating it is a billion times more powerful, so it is ju…

What is 'build = (): string => {' ? Or specifically ():, I know arrow functions.

That strange syntax with the arrow function is only needed so that the 'this' inside the function behaves the way one would expect it to in normal OOP language. It 'captures' the this for the object itself (like C++ would, etc). But that 'build()' function is what constructs a string that is the content for the dialog.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#159

In my 15 years I've come to realize that HTML code-generation via JavaScript (or now TypeScript actually) is vastly superior to any type of templating (like JSP, JSF, Velocity, Mustache). Both ways (templating v.s. straight generation) have exactly one sort of 'level of indirection' so they are on the same order of complexity, but generating HTML rather than templating it is a billion times more powerful, so it is ju…

That's lovely. Beautiful, readable, elegant bit of code. (35 years experience)

Thanks, it actually wasn't a great example to make my point because that file contains actually a few things I do try to avoid, but it does demonstrate that "generated HTML" doesn't have to be ugly and hard to read, using TypeScript or even JavaScript if you have a consistent architecture for how it's done.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#160
post #151
post #98

Earlier quoted context omitted.

Why do you think they are bad ideas?

IMHO Angular is a bad idea because you're doing rendering in the client side. Maybe your building an HTML5 image editor or something that requires client rendering. But most CRUD apps doesn't really need client side rendering. There is also a hype of SPA (single page apps) which is usually harder to implement than server-rendered apps. It is harder because you have to avoid the browser refreshing the page and keeping…

Actually both Angular and React have it's place. I have to say here I absolutely hate Angular but it's a very good tool for Java developers in need of building some simple CRUD admin interface. Familiar concepts/vocabulary help a lot.
Post reply on HN