Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"Isomorphic" templates are not enough. You also need isomorphic data fetching for client code. If you have to manually reinvent the same data fetching on the client and server, you don't get the full benefits of isomorphic code. You only have brittle templates with two different ways to glue data to view.

So far isomorphic Node + React has been the best (but not perfect) way I've seen to do this. You abstract out the API layer, and now you can define components and their data sources that have the exact same code on the client and server, and it just works. Apollo/GraphQL is probably a giant leap forward in this as well.

Having an option to do hand-glued "isomorphic" data in a few places is probably nicer than Javascript spaghetti on the front end, but it doesn't get you all the way there. Rails has the same problem by the way, the "Rails way" is coffeescript glue to get any kind of modern front end application functionality. Even with React on Rails you have to have to reinvent data fetching, and lose the benefit of a well structured isomorphic codebase.

Until browsers support a different language natively other than Javascript (which will never happen), Node + React is currently the most straightforward path to get there.



> Until browsers support a different language natively other than Javascript (which will never happen), Node + React is currently the most straightforward path to get there.

I think WebAssembly is promising for this. You could write your app in any language you want, as long as it compiles to WebAssembly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: