|
|
|
|
|
by renegadus
2744 days ago
|
|
I don't think there is any reason, in principle, that Kweb can't be just as efficient as any other web application. This is because Kweb doesn't entirely abstract away the client/server separation in one important sense. When you attach a callback to something you normally do it like this: button.on.click {
header.text("They clicked!")
}
This is less efficient than it could be because it is needlessly doing a server round-trip. So for situations where you're only modifying client state you can do: button.onImmediate.click {
header.text("They clicked!")
}
When the user clicks it will be instant, as the instructions to modify the DOM are "preloaded" to the client on page render.Does that alleviate your concern? If not, can you elaborate on where you think the bottleneck is likely to emerge? |
|
> Kweb ... virtually eliminates the separation between browser and server from the programmer’s perspective.
In my opinion, we can't say the separation has been "eliminated" if I'm constantly having to ask myself "should I handle this event on the server or the client via `onImmediate`?"
What seems more likely to happen, is that inexperienced developers simply won't ask the question at all and months later the customer will ask why their dashboard page is taking 60 seconds to load. The senior engineers will be tasked to fix it only to find out that the page is making dozens or hundreds or thousands of N+1 round trips to the server.
This has been my experience being asked to come in to fix MeteorJS apps. Teams of web developers not understanding that the client/server interface is not free and that poor engineering practices have severe compound effects.