FPT Software's Technology Community
  • Contact Us

Single Web Page Application

Ting Hsuan Lin | September 27, 2016

Internet is a concept that has been studied from the 50s of last century only becomes popular when Tim Berners-Lee invented the World Wide Web concept early 1990. Since then so far, the evolution of the web has far exceeded a great deal compared to the time it was born. One of the web’s huge progress is Single web Page Application (SWPA)

Internet is a concept that has been studied since the 50s of last century but only becomes popular when Tim Berners-Lee invented the World Wide Web concept in the 1990s. Since then so far, the evolution of the web has far exceeded a great deal compared to the time it was born. One of the web’s huge progress is Single web Page Application (SWPA).

If such a traditional Website is a collection of text documents and other resources, linked by hyperlinks and URLs, the SWPA aims for a user experience which is similar to using the application on Windows. At that time, users used the website in the browser without having to switch links, but they still had full of content and interactive capabilities as traditional sites. Some typical applications we can name here: Google Docs SWPA, Google Spreadsheets, Chrome Extensions Store, Gmail …

In this article, the writer would like to share technology and research use as well as difficulties encountered when deploying SWPA e-commerce floor www.sendo.vn

Client Side

Unlike traditional websites that reload the page content when moving from page to page, the SWPA almost in the stage of “stand still” as users get more content displayed or manipulated, so that the role of Client Side technologies including JavaScript , HMTL, CSS … is placed on top.

If HTML5 and CSS3 is the required selection for applications SWPA by its superior features compared to the old version, the selection of Javascript or Javascript Framework Library is much more difficult because there are so many different options depending on the intention, as well as the habits of programmers.

In Vietnam, as other countries in the world, jQuery library is popular because of it’s small capacity, easy-to-use syntax, many plugins as well as strongly supported by the community. Besides, we should also take into account other competitors such as Mootools, Dojo or YUI …

As for Javascript Framework, the market is much more fragmented because this has been a fairly new concept in web programming industry in recent years. While JavaScript Library is a set of tools or ways of interacting with the DOM, and the common functions of traditional website, Javascript Framework is the backbone of modern websites.

It takes time to maintain code to develop an SWPA application by only pure Javascript or Javascript Library. Meanwhile, by using Javascript Framework, developers only need to focus on data structures, the event changing data, user interaction … Other factors such as display, data binding, DOM browser are processed by the Framework. Some popular JavaScript Framework programmers commonly used are AngularJS, BackboneJS, EmberJS, MeteorJS, KnockoutJS …

Recently, a number of new projects focused on supporting developers, who are not neccesarily having deep knowledge in architect of HTML or CSS, to create Web sites with content, complex features, compatible with all devices. These projects provide ready components such as form of login / register, date cell or even complex graphs tables … Programmers are just re-assembled components together to become a complete website. Some typical projects as polymer-project.org, material-ui.com …

Since most professional display processing task is performed at the Client Side, the Server Side SWPA system merely retrieves the necessary data. For that reason, it is lightly loaded comparing to traditional website system, which retrieves the entire contents displayed when users query a new page.

With such specialties, SWPA system will design Server Side direction of API- equipped, to be jointly used for the Mobile Application, which saves a lot of resources and maintenance cost.

Moreover, the data communication between a client-server system is normally JSON or XML , which usually have much smaller capacities than HTML sites of traditional website, therefore it is highly economic in terms of page loading speed and bandwidth.


Because of characteristic which is similar to Client Side, some applications SWPA capable of running on the user’s browser without internet connection or server. With HTML5 technology, programmers can store data on the Local Storage and customization application even when losing internet connection.

Obstacles when implementing SWPA

Setting aside obstacles as new technology or how to design different from the traditional system, SWPA met two biggest obstacles were managing browser history (browser history) and optimizing Search Engine Optimization (SEO)

For traditional websites, while turning pages and the URL on the browser window changes corresponding to the content simultaneously, users can easily return to the previous web using the Backspace button. It is not such an easy task for pages using SWPA. Most sites SWPA will not change path when users add new content to load, and users can not manage access history or share corresponding link with current view of the site.

Fortunately, the invention of HTML5 technology has solved these problems of programmers. With features like pushState, popstate … programmers are able to actively change url users without reloading pages and easily manage web browser history.

Because of obstacles when deploying, SWPA is normally used in control panel or complex applications instead of applying in news sites, ecommerce or pages which need SEO. The reason is that the Bot Crawler of the search engines cannot access the content if each content does not have specific url and the content should be displayed in html format instead of Javascript.

In late 2014, Google announced their bots were able to scan the content designed by a user javascript which is similar to the ways user interact in browser. However, searching engine giants like Bing, Yahoo or Coc Coc are not necessarily capable of doing this. Therefore if you are going to deploy the system SWPA for system using SEO, you should take into account this obstacle.

Solution of Sendo.vn

As an eCommerce marketplaces, Sendo.vn depends a great deal on traffic from search engines, so it deploys SWPA but still places top priority on optimizing SEO for web .

To address this challenge, Sendo.vn splited user manipulation stream and Crawler Bot users into two independent streams but keep interface and experience intact. This means that if the user stood a page turn to page X is Y will experience if SWPA also go directly to the user or Crawler Bot Y will receive the content that appears similar to the experience in SWPA.

Implemeting following this direction will encounter the problem of two templates Server Side and Client Side coexist for the same features, leading to difficulty in scaling as well as maintaining source code. In this situation Sendo.vn used Smarty template library to use simultaneously in Client Side and Server Side.

Thus, implemeting SWPA is quite an easy task if there is carefully prepared system architect and structural applications architecture. Applying SWPA into products not only brings new experience and convenience for users, but also enhance system performance, and save the bandwidth.

AUTHOR [email protected]


Leave a Reply

Your email address will not be published. Required fields are marked *

Healthcare continues to be an formidable, but divisive bureaucratic topic. Not surprisingly, 41 percent of suitable voters said healthcare was their explanation issue in the mid-term elections in 2018.cialis for sale In 2008, when the ACA became law, only 46 percent of voters supported unique payer healthcare. That party has grown significantly to 59 percent put one’s imprimatur on in anciently 2018.http://my-canadianpharmacyonline.com low cost viagra without a doctor prescription While Medicare-for-all legislation is unlikely to pass both the Quarter and Senate in its progress mould, there is a budge in public conviction with a valid more than half at this very moment in favor.

http://ozhivotnyh.ru/page/27 – where can i buy real viagra online yahoo answers

http://torgrielt.ru/chto_sluchitsya_s_cenami_na_jile_etoi_osenyu_3.php – can i buy viagra over the counter in costa rica

http://blomswe.org/bord/index.php?fid=51&id=12588 – where can l buy viagra

http://greee.info/zdor1/nutrition.html – where can you buy viagra in stores

http://timetanks.org/digital_ru_10.html – where to buy generic viagra forum

http://reductorspb.ru/reduktor88.php – buy generic viagra online india

http://www.tonop.ru/news.html?start=20 – how to buy viagra online without prescription

http://asitai.ru/stoly-peremennoj-vysoty-nezamenimaya-mebel-dlya-delovyx-lyudej/ – is it legal to buy viagra online

http://www.toyotahelp.ru/company/type1/354/mess1/ – legal buy viagra online uk

http://stroiportal48.ru/?sec=goods – where can i buy viagra pills online

which is cheaper viagra cialis or levitra can you go to jail for slipping viagra into girla drink
buy viagra online viagra vs cialis https://lmeed.com/ viagra generic availability viagra without a doctor prescription from canada
ya mama sonugle even her dildo need viagra what happens to expired viagra

viagra and blood pressure meds why viagra afects the eye side
buy viagra online canada pharmacy sildenafil side effects https://edphrm.com/ cheap viagra online canada pharmacy cialis generic
viagra for dogs with congestive heart failure

how to talk to husband about viagra at what point and how long before viagra does not work
sildenafil 20 mg tablet https://ingogf.com/ cheap viagra sildenafil 20 mg tablet vs viagra
why does viagra give you a headache what does viagra for pre workout