Live data from Hacker News

Show HN: Purview – A server-side component framework

github.com

11–20 of 56 posts

Re: Show HN: Purview – A server-side component framework

#14
In React, forms are often built with this pattern:

* Type/change events fire on the field (e.g. username)

* Username updates the internal model (this.username = 'karthikksv')

* The submit button fires an event so the parent page can act on the entire data model ({ username: 'karthikksv', password: 'fluffykittens' })

I'm concerned that this model won't work well using server-side React components on a network with high latency – each type event would have to round-trip to the server to update in the DOM.

Re: Show HN: Purview – A server-side component framework

#15
Wait, why could we not render the HTML on the server and only let the browser to the compositing? If there only was a protocol that would allow us to exchange input events and some drawing commands over some arbitrary network.. let's phantasize for a moment and call that protocol X. I would use it when it's mature so maybe from X11 on onwards.

Naturally, sending draw commands has a big downside in efficiency. Maybe we could later exchange X with something that only sends bitmaps?

Re: Show HN: Purview – A server-side component framework

#17

I know this comment is a joke, but this is actually how react was created. Facebook made a templating language in php called xhp ( https://docs.hhvm.com/hack/XHP/introduction ) and some people at fb developed react as a natural extension to xhp but in JavaScript.

Time is a flat circle.

Re: Show HN: Purview – A server-side component framework

#19

I know this comment is a joke, but this is actually how react was created. Facebook made a templating language in php called xhp ( https://docs.hhvm.com/hack/XHP/introduction ) and some people at fb developed react as a natural extension to xhp but in JavaScript.

TIL. Thanks for sharing!
Post reply on HN