Live data from Hacker News

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

twitter.com

81–90 of 177 posts

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

#82

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.

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

#85
post #2

It is amazing how much react resembles php and classic asp from 15 years ago. I guess that's what happens when you don't hire anyone over 30.

Bitter over 30 year-old? (I'm 43 btw so not trying to be ageist, just asking what seems like an obvious question) It does look similar but it is night and day different beyond the superficial appearance. Are you actually trying to say that the in-browser experience in web apps from 15 years ago were in the same ballpark as even simple single page javascript apps from today? That is laughable. So something must be dif…

[deleted]

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

#86

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.

() = empty arguments. you can only omit the braces when you have 1 argument. 0 and 2+ require the braces. #tc39

the colon refers to flow and typescripts type annotation "colon something". none-objects are lowercased

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

#87
post #75

Earlier quoted context omitted.

And how often are the presentation and logic changed in isolation of each other... they aren't separate concerns at many levels. The concern is sepearated in React at a component level... how a component is rendered is just as important as how it raises/accepts changes outside of itself, and often interacts. Also, having JSX in my JS is much easier to deal with than remembering some abstract DSL for how to iterate th…

Anywhere from never to always. A Pure logic change shouldn't need a ui change. At some companies the ui and logic are different responsibilities (this used to be common). Other times there will be multiple UIs for the same logic.

React is for UI logic, application logic may be in a different place.

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

#88

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.

[deleted]

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

#89

Inlining styles and lots of javascript looks pretty awful to me, but I don't mind binding actions directly to the UI elements they are associated with, so long as it is declarative (like anchor tags and forms do already) Now, have I told you all about intercooler.js...

http://i.imgur.com/QmrvkOl.png

;-)

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

#90
Don't take this too seriously (CSS is still separated), it's not important to separate html and Javascript, but to separate something. You can choose your own abstractions and how you organise the code-base to make it maintainable and simple. There is not absolute right/wrong.
Post reply on HN