Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isomorphic capabilities? #24

Closed
trueadm opened this issue Feb 24, 2015 · 6 comments
Closed

Isomorphic capabilities? #24

trueadm opened this issue Feb 24, 2015 · 6 comments

Comments

@trueadm
Copy link

trueadm commented Feb 24, 2015

First I want to say, great work on Bobril, it's something I've been utilising for a framework I'm currently designing.

The only lacking feature I see is isomorphic support for NodeJS? So, like React, components can be rendered on the server and, upon the client loading the rendered output, initialise from the pre-rendered DOM. React makes use of data-reactid to link up the nodes to their respective virtual dom counterparts, so I'd imagine something similar could be applied to Bobril.

I believe this a key feature that would certainly add massively to Bobril and its uptake in the community.

@Bobris
Copy link
Owner

Bobris commented Feb 26, 2015

Thanks for interest, quickly looked at your InfernoJS, humbled that you used Bobril as backend, but I am not sure if you will not find some blockers (events normalization, shouldUpdate, b.invalidate(ctx) intergation) in future, so you will need to reimplement it anyway.

Isomorphic support is something very controversial for me, let me explain:
There could be 2 benefits for isomorphic support - SEO and faster showing of page

  • SEO is useless for applications behind authentication which is primary target for SPA.
  • Faster showing has problem that you cannot specialize for target browser as it is not good to trust user agent, application looks broken for some time (no click handlers), you cannot use advanced layouting done by JS, and finally page is longer to download because it basically contains everything twice. Facebook does not use isomorphic JS for exactly these reasons (I think this was acknowledged in one ReactJS conf video), heretics :-)

So finally best result you get when you generate JS with included data so you don't need to do any AJAX requests which would add ping penalty and application is working from first displayed version. Because this is currently pure model problem it is outside of Bobril competence for now.

If this would be implemented I would definitely made it optional as it would be usually useless payload. I don't think it would be needed to add data-reactid, you can basically create cached VDOM out of original HTML so diffing engine would solve it correctly even in case of HTML be unsynced to wanted result.

Let me know if this makes sense to you. On the other hand, you are completely correct with helping to uptake in community, so I will definitely consider it in my future plans.

@trueadm
Copy link
Author

trueadm commented Feb 26, 2015

I can see valid uses for SEO still, I've got a large experience with working in the eCommerce world with the big brands who want responsive website-app-stores that are SPA (mobile-first) with all the benefits of SEO.

In regards to the faster showing: it would always be the case where the server would render the content with the data model (like in React's case on NodeJS) and re-attaching the DOM quickly with their react-id methods.

I'll see what I can do with inferno in regards to this in the future. I'm still trying to refine the DSL syntax so it's future-proof without losing the ability to write nice virtual markup in JS.

Thanks for getting back to me :)

@Bobris
Copy link
Owner

Bobris commented Feb 28, 2015

Just tested how Google bot sees Bobril and it does not have any problems. So SEO problem in Google is matter of past. Hope other search engines will follow Google.

@trueadm
Copy link
Author

trueadm commented Feb 28, 2015

Do you have an example?

@Bobris
Copy link
Owner

Bobris commented Feb 28, 2015

image
Just used their Webmaster Tools.

@trueadm
Copy link
Author

trueadm commented Feb 28, 2015

Nice, so Google did change how their bots parse websites then. Given that Google do that (probably to push Angular too) I wonder what affect that will have on other frameworks in terms of SEO.

@Bobris Bobris closed this as completed Mar 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants