One page only javascript applications

前端 未结 8 838
野性不改
野性不改 2021-02-08 23:09

Have you experimented with single page web application, i.e. where the browser only \'GETs\' one page form the server, the rest being handled by client side javascript code (one

相关标签:
8条回答
  • 2021-02-09 00:09

    I'll add that on slower machines, a con is that a large amount of JavaScript will bring the browser to a screeching halt. Since all the rendering is done client-side, if the user doesn't have a higher-end computer, it will ruin the experience. My work computer is a P4 3.0GHZ with 2 GB of ram and JavaScript heavy sites cause it to chug along slower than molasses, which really kills the user experience for me.

    0 讨论(0)
  • 2021-02-09 00:11

    Usually, you will take a framework like GWT, Echo2 or similar.

    The advantage of this approach is that the application feels much more like a desktop app. When the server is fast enough, users won't notice the many little data packets that go back and forth. Also, loading a page from scratch is an expensive operation. If you just modify parts of it, the browser can keep a lot of the existing model in memory and just change the parts that changed.

    Another advantage of these frameworks is that you can develop your application in pure Java. This means you can debug it in your IDE just like any other Java app, you can write unit tests and run them automatically, etc.

    0 讨论(0)
提交回复
热议问题