Re:V8, Advanced JavaScript, and the Next Performance Frontie...
by richmarr on Tuesday May 30, 2017 @12:12PM
(#14446314)
I suspect that defining web application using implementation details is painting yourself into a corner.
Re:V8, Advanced JavaScript, and the Next Performance Frontie...
by TimJYoung on Tuesday May 30, 2017 @02:06PM
(#14447194)
Perhaps, but it does certainly help in determining what kind of performance one is seeking, because you often need to trade startup time for run time when it comes to DOM manipulation. You either have a large framework that takes longer to load, but keeps you away from direct DOM manipulation (for the most part), or you don't and suffer the performance effects of constantly reading/writing DOM property values that trigger layouts/repaints.
A web site is normally a public-facing collection of HTML and JS where the JS is primarily decorative and the site is primarily page-oriented. Navigation is done via physical pages using the normal browser mechanisms such as links.
A web application is normally a software service that more resembles a desktop application due to its "load once and let the JS take control" architecture. Navigation is normally not done via physical pages, but rather via hash navigation that navigates within areas of the application, as opposed to physical pages. And, you'll see a lot more application-oriented UI techniques like modal dialogs and more elaborate controls (treeviews, listviews, etc).
There are, of course, applications that straddle the line between the two, but it's still helpful to make these distinctions because:
Web sites should optimize for load time first. Otherwise, you're going to have visitors bounce.
Web applications are different, and while they need to keep the load time down, they will most often be already in the browser cache. So, the performance shifts towards focusing more on the actual run-time performance of the application, and that is where issues with raw DOM manipulation may become problematic without something like a virtual DOM or some sort of property caching.