4 ms·
In regards to the SPAs, what exactly is the alternative? In my mind you have two possibilities: 1. The most ideal is to "pick the right solution for the probl
by tabeth 10y ago
In regards to the SPAs, what exactly is the alternative?
In my mind you have two possibilities:
1. The most ideal is to "pick the right solution for the problem." Meaning, you will analyze the problem and do the right thing, e.g. content mainly? server side rendering. web application? SPA.
2. Do what you know, consistently. In many cases, this means using an SPA basically all of the time, whether or not it's necessary. This also might mean server side rendering all of the time, adding javascript only when absolutely necessary.
In regards to SPAs, I feel there must be a solution. Ember tries to do this with fastboot, allowing you to essentially have the flexibility of an SPA with the SEO and other advantages of serve side rendering, but I'll ignore that for now.
Is there a paradigm/language that allows you to write the same templates for both the server side and SPA view? I guess this would mean the view is the same, and the model and controller would be your choice.
I think it's natural to just do what you know, which is why you're probably seeing what you are.
- sandinmyjoints 10y ago> Is there a paradigm/language that allows you to write the same templates for both the server side and SPA view? https://zeit.co/blog/next https://zeit.co/blog/next
- aurelianito 10y ago> Is there a paradigm/language that allows you to write the same templates for both the server side and SPA view? That's the main motivation behind my web framework Sandro. It is just an experiment, but I do just that! See https://bitbucket.org/aurelito/sandro https://bitbucket.org/aurelito/sandro and https://bitbucket.org/aurelito/sandro-lib https://bitbucket.org/aurelito/sandro-lib It uses rhino and domino to render server side using the DOM API. I am busy with work that pays my bills, but I would love if I were able to work full-time in it ;).
- daliwali 10y agoServer side rendering can be done with any JS framework, though often one must compromise performance by using a more heavyweight implementation like jsdom, or some custom implementation if the framework provides it. Also I have done something similar using domino: https://simulacra.js.org/#server-side-rendering https://simulacra.js.org/#server-side-rendering
- sixdimensional 10y agoDoes isomorphic Javascript count? Example- Meteor js.