7 ms·
The killer feature (and only reason I use it) is being able to render the same templates with the same data on the server (isomorphic/universal/whatever). The
by danielheath 10y ago
The killer feature (and only reason I use it) is being able to render the same templates with the same data on the server (isomorphic/universal/whatever).
The result is a webpage that can do lightening-fast transitions client-side without breaking the back button.
- taspeotis 10y agoFor what it's worth, ReactJS.NET does server side rendering, so you can have a .NET backend. https://reactjs.net/guides/server-side-rendering.html https://reactjs.net/guides/server-side-rendering.html
- vizeroth 10y agoIn most cases, it's probably still easier to use C#, but JScript has always been an option in ASP.Net (and classic ASP). I found that the ability to use the same code on the back-end and front-end was nice when you needed it, but those occasions were quite rare. The code also usually required some (often significant) refactoring of the code in question to make it portable between the front-end and back-end environments. In classic ASP, this usually meant ensuring front-end code moving to the back-end was isolated from any DOM interaction and didn't use any ES5(+) features, while back-end code moving to the front-end had to be isolated from the ASP objects (Application, Server, Session, etc.). It's all stuff that seems like common sense, but wasn't rigorously applied to JScript code which only had to work on IE5 (later 6, finally 7 before the project was put out to pasture), especially since use of JavaScript on the client wasn't significant until the project's last couple of years.
- caseymarquis 10y agoIronES2015 or IronTypeScript. Interesting thought.
- Daishiman 10y agoThat part of the web workflow just doesn't seem big enough to warrant all the other parts that are missing in the NodeJS ecosystem. In practice if those things are important enough there's a variety of template languages that are ubiquitous.
- botw 10y agoso you have to keep the same code on client side for every page that requires re-rendering. kind of bloated?
- erikb 10y agoHm? Other languages also have template systems. PHP actually started as template system. Even today it should be possible to do inline templating stuff just with PHP (although other template languages are easier to use for that purpose). Not a huge fan of PHP either, but templating is not a killer feature. Everybody has that.