[GSOC][Idea-2-PatialRendering-for-Nashorn] Idea interest and Calarification

Hi Mark Polak,

I am Dehan currently finishing off my final year at University of Moratuwa, Sri Lanka. I am really interested in web technologies and therefore also this project.

Considering the project idea, it has the idea of partial rendering introduced to increase performance or
as per the article sighted in the project idea page improve web crawler indexing[1]

It’s true that a SPA takes time to load initially, but after the initial loading point the SPA performance is greatly increased because now only a simply JSON/XML data structure is called for each REST call. But there is the obvious drawback when indexing because when using mechanisms like angular routing I assume they will not be crawled again as per the article provided earlier.

But if indeed the startup time is what you are looking at to reduce, wouldn’t it come at a cost of each page taking more time to lead due to the increased markup which now should be brought in for each request?. Isn’t it better to sacrifice more start up time to have more responsiveness when actually using the web app? which is the principal behind SPAs?

Furthermore which version of Spring is used ? Is it Spring 4 and beyond or a version before that?

If we are to work with Nashorn we will have to work with Clojure I guess?[2]

[1] - http://augustl.com/blog/2014/jdk8_react_rendering_on_server/

[2] - https://carouselapps.com/2015/09/11/isomorphic-clojurescriptjavascript-for-pre-rendering-single-page-applications-part-1/

···

best regards,

Dehan de Croos

Hi

We are currently using Spring 4.1.9. We do not want to use Clojure for
this, we are now on Java 8 which has the Nashorn engine available, so we
would want to leverage that (I'm not sure what clojure would bring with it,
but we definitely do not want to include another language)

The rest of the questions I will let the writer of this project answer.

···

On Thu, Mar 10, 2016 at 12:56 AM, Dehan De Croos <dehandecroos@gmail.com> wrote:

Furthermore which version of Spring is used ? Is it Spring 4 and beyond or
a version before that?
If we are to work with Nashorn we will have to work with Clojure I
guess?[2]

--
Morten

Hey Dehan,

Sorry for the slow response from my side.

It is true that SPA applications have better responsiveness while using the app. The goal of the project is then also not to totally replace the SPA stuff with rendering on the server.

The goal of the project is more to see if/how we can utilise the capabilities that Nashorn gives us to pre-render the initial SPA payload on the server. Due to the nature of React its “diffing” of the DOM the SPA could “continue” on the client side. This could potentially save some requests which (in some of our working areas, high latency places) could be a good thing. Also a reduced “perceived loading time” gives a more pleasant user experience in general.

As the product (DHIS2) is primarily a web application, that is behind a login wall, we generally don’t have much to index for search engines. Therefore this benefit is not really of importance. As an additional benefit (not initially part of the task description, but could be added if enough time, the Nashorn integration could enhance our architecture of custom apps (which are currently client side Javascript only) with the ability to run server side code and possibly even interact with the service layer. (I’m just thinking out loud here ;))

Regarding your concern of the increased payload. I don’t believe the payload increase would decrease performance that much, but during the development of the test cases we could see if this concern is legitimate and see if there is perhaps a hybrid/different solution. I think the project in general is more of a prototyping experience and a change to work with cool fairly cutting edge stuff :wink:

Regards,

Mark

···

On Wed, Mar 9, 2016 at 6:56 PM, Dehan De Croos dehandecroos@gmail.com wrote:

Hi Mark Polak,

I am Dehan currently finishing off my final year at University of Moratuwa, Sri Lanka. I am really interested in web technologies and therefore also this project.

Considering the project idea, it has the idea of partial rendering introduced to increase performance or
as per the article sighted in the project idea page improve web crawler indexing[1]

It’s true that a SPA takes time to load initially, but after the initial loading point the SPA performance is greatly increased because now only a simply JSON/XML data structure is called for each REST call. But there is the obvious drawback when indexing because when using mechanisms like angular routing I assume they will not be crawled again as per the article provided earlier.

But if indeed the startup time is what you are looking at to reduce, wouldn’t it come at a cost of each page taking more time to lead due to the increased markup which now should be brought in for each request?. Isn’t it better to sacrifice more start up time to have more responsiveness when actually using the web app? which is the principal behind SPAs?

Furthermore which version of Spring is used ? Is it Spring 4 and beyond or a version before that?

If we are to work with Nashorn we will have to work with Clojure I guess?[2]

[1] - http://augustl.com/blog/2014/jdk8_react_rendering_on_server/

[2] - https://carouselapps.com/2015/09/11/isomorphic-clojurescriptjavascript-for-pre-rendering-single-page-applications-part-1/

best regards,

Dehan de Croos


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp