skip to main content
10.1145/1526709.1526837acmconferencesArticle/Chapter ViewAbstractPublication PagesthewebconfConference Proceedingsconference-collections
research-article

HTML templates that fly: a template engine approach to automated offloading from server to client

Published: 20 April 2009 Publication History

Abstract

Web applications often use HTML templates to separate the webpage presentation from its underlying business logic and objects. This is now the de facto standard programming model for Web application development. This paper proposes a novel implementation for existing server-side template engines, FlyingTemplate, for (a) reduced bandwidth consumption in Web application servers, and (b) off-loading HTML generation tasks to Web clients. Instead of producing a fully-generated HTML page, the proposed template engine produces a skeletal script which includes only the dynamic values of the template parameters and the bootstrap code that runs on a Web browser at the client side. It retrieves a client-side template engine and the payload templates separately. With the goals of efficiency, implementation transparency, security, and standards compliance in mind, we developed FlyingTemplate with two design principles: effective browser cache usage, and reasonable compromises which restrict the template usage patterns and relax the security policies slightly but in a controllable way. This approach allows typical template-based Web applications to run effectively with FlyingTemplate. As an experiment, we tested the SPECweb2005 banking application using FlyingTemplate without any other modifications and saw throughput improvements from 1.6x to 2.0x in its best mode. In addition, FlyingTemplate can enforce compliance with a simple security policy, thus addressing the security problems of client-server partitioning in the Web environment.

References

[1]
K. Amiri, D. Petrou, G. R. Ganger, and G. A. Gibson. Dynamic function placement for data-intensive cluster computing. In Proceedings of the General Track: 2000 USENIX Annual Technical Conference, June 18--23, 2000, San Diego, CA, USA, pages 307--322. USENIX, 2000.
[2]
J. Arnoldus, J. Bijpost, and M. van den Brand. Repleo: a syntax-safe template engine. In Proceedings of GPCE 2007, 6th International Conference, Generative Programming and Component Engineering, Salzburg, Austria, October 1--3, 2007, pages 25--32. ACM, 2007.
[3]
Ashley IT Services Inc. RSLite demo. http://www.ashleyit.com/rs/rslite/.
[4]
H. Bottger, A. Møller, and M. I. Schwartzbach. Contracts for cooperation between Web service programmers and HTML designers. Journal of Web Engineering, 5(1):65--89, 2006.
[5]
S. Ceri, P. Fraternali, and A. Bongio. Web Modeling Language (WebML): a modeling language for designing web sites. Computer Networks: The International Journal of Computer and Telecommunication Networking, 33(1--6):137--157, 2000.
[6]
S. Chong, J. Liu, A. C. Myers, X. Qi, K. Vikram, L. Zheng, and X. Zheng. Secure web application via automatic partitioning. In Proceedings of SOSP 2007, the 21st ACM Symposium on Operating Systems Principles 2007, Stevenson, Washington, USA, October 14--17, 2007, pages 31--44. ACM, 2007.
[7]
D. W. Cornell, D. M. Dias, and P. S. Yu. On multisystem coupling through function request shipping. IEEE Transaction on Software Engineering, 12(10):1006--1017, 1986.
[8]
Document Object Model (DOM) level 3 core specification version 1.0. W3C Recommendation 07 April 2004, http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/.
[9]
P. Domel, A. Lingnau, and O. Drobnik. Mobile agent interaction in heterogeneous environments. In Proceedings of MA'97, First International Workshop on Mobile Agents, Berlin, Germany, April 7--8, 1997, LNCS 1219, pages 136--148. Springer, 1997.
[10]
P. Fraternali. Tools and approaches for developing data-intensive web applications: A survey. ACM Comput. Surv., 31(3):227--263, 1999.
[11]
F. J. Garcia, R. I. Castanedo, and A. A. J. Fuente. A double-model approach to achieve effective model-view separation in template based web applications. In Proceedings of ICWE 2007, 7th International Conference on Web Engineering, Como, Italy, July 16--20, 2007, LNCS 4607, pages 442--456. Springer, 2007.
[12]
J. J. Garrett. Ajax: A new approach to web applications, February 2005. http://adaptivepath.com/ideas/essays/archives/000385.php.
[13]
D. Goodman. Dynamic HTML: The Definitive Reference. O'Reilly, December 2006.
[14]
A vocabulary and associated APIs for HTML and XHTML, 2008. W3C Working Draft 10 June 2008, http://www.w3.org/TR/2008/WD-html5-20080610/.
[15]
Hypertext Transfer Protocol -- HTTP/1.1, 1999. RFC 2616. The application/json media type for JavaScript object notation (JSON), July 1999,2006. RFC 4627.
[16]
F. D. Keukelaere, S. Bhola, M. Steiner, S. Chari, and S. Yoshihama. Smash: secure component model for cross-domain mashups on unmodified browsers. In Proceedings of WWW 2008, the 17th International Conference on World Wide Web, Beijing, China, April 21--25, 2008, pages 535--544. ACM, 2008.
[17]
A. Leff and J. T. Rayfield. Web-application development using the model/view/controller design pattern. In Proceedings of EDOC 2001, 5th International Enterprise Distributed Object Computing Conference, September 4--7, 2001, Seattle, WA, USA, pages 118--127. IEEE Computer Society, 2001.
[18]
New Digital Group, Inc. Smarty: Template engine. http://www.smarty.net/.
[19]
T. J. Parr. Enforcing strict model-view separation in template engines. In Proceedings of WWW 2004, the 13th international conference on World Wide Web, New York, NY, USA, May 17--20, 2004, pages 224--233. ACM, 2004.
[20]
PHP: Hypertext preprocessor. http://php.net/.
[21]
Standard Performance Evaluation Corporation. SPECWeb2005, 2005. http://www.spec.org/web2005/.
[22]
M. Tatsubori, T. Sasaki, S. Chiba, and K. Itano. A bytecode translator for distributed execution of "legacy" Java software. In L. Knudsen, editor, ECOOP 2001 -- Object Oriented Programming, LNCS 2072, pages 236--255, Budapest, Hungary, June 2001. Springer-Verlag.
[23]
E. Tilevich and Y. Smaragdakis. J-Ohrchestra: Automatic Java application partitioning. In B. Magnusson, editor, ECOOP 2002 -- Object Oriented Programming, LNCS 2374, pages 178--204, Malaga, Spain, June 2002. Springer-Verlag.
[24]
A. Tozawa, M. Tatsubori, T. Onodera, and Y. Minamide. Copy-on-write in the PHP language. In Proceedings of POPL 2009, the 36th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Savannah, Georgia, USA, January 21--23, 2009, pages 200--212. ACM, 2009.
[25]
S. Trent, M. Tatsubori, T. Suzumura, A. Tozawa, and T. Onodera. Performance comparison of PHP and JSP as server-side scripting languages. In Proceedings of Middleware 2008, ACM/IFIP/USENIX 9th International Middleware Conference, Leuven, Belgium, December 1--5, 2008, pages 164--182. Springer, 2008.
[26]
The XMLHttpRequest object. W3C Working Draft 15 April 2008, http://www.w3.org/TR/2008/WD-XMLHttpRequest-20080415/.
[27]
F. Yang, N. Gupta, N. Gerner, X. Qi, A. J. Demers, J. Gehrke, and J. Shanmugasundaram. A unified platform for data driven web applications with automatic client--server partitioning. In Proceedings of WWW 2007, the 16th International Conference on World Wide Web, Banff, Alberta, Canada, May 8--12, 2007, pages 341--350. ACM, 2007.
[28]
D. Yu, A. Chander, H. Inamura, and I. Serikov. Better abstractions for secure server-side scripting. In Proceedings of WWW 2008, the 17th International Conference on World Wide Web, Beijing, China, April 21--25, 2008, pages 507--516. ACM, 2008.

Cited By

View all
  • (2021)Survey on Template Engines in JavaITM Web of Conferences10.1051/itmconf/2021370100737(01007)Online publication date: 17-Mar-2021
  • (2019)Handling Duplicates in Dockerfiles Families: Learning from Experts2019 IEEE International Conference on Software Maintenance and Evolution (ICSME)10.1109/ICSME.2019.00086(524-535)Online publication date: Sep-2019
  • (2014)Practice and Evaluation of Pagelet-Based Client-Side Rendering MechanismIEICE Transactions on Information and Systems10.1587/transinf.E97.D.2067E97.D:8(2067-2083)Online publication date: 2014
  • Show More Cited By

Index Terms

  1. HTML templates that fly: a template engine approach to automated offloading from server to client

        Recommendations

        Comments

        Information & Contributors

        Information

        Published In

        cover image ACM Conferences
        WWW '09: Proceedings of the 18th international conference on World wide web
        April 2009
        1280 pages
        ISBN:9781605584874
        DOI:10.1145/1526709

        Sponsors

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        Published: 20 April 2009

        Permissions

        Request permissions for this article.

        Check for updates

        Author Tags

        1. client-server partitioning
        2. template engines
        3. web applications

        Qualifiers

        • Research-article

        Conference

        WWW '09
        Sponsor:

        Acceptance Rates

        Overall Acceptance Rate 1,899 of 8,196 submissions, 23%

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • Downloads (Last 12 months)4
        • Downloads (Last 6 weeks)2
        Reflects downloads up to 22 Feb 2025

        Other Metrics

        Citations

        Cited By

        View all
        • (2021)Survey on Template Engines in JavaITM Web of Conferences10.1051/itmconf/2021370100737(01007)Online publication date: 17-Mar-2021
        • (2019)Handling Duplicates in Dockerfiles Families: Learning from Experts2019 IEEE International Conference on Software Maintenance and Evolution (ICSME)10.1109/ICSME.2019.00086(524-535)Online publication date: Sep-2019
        • (2014)Practice and Evaluation of Pagelet-Based Client-Side Rendering MechanismIEICE Transactions on Information and Systems10.1587/transinf.E97.D.2067E97.D:8(2067-2083)Online publication date: 2014
        • (2013)Cascading tree sheets and recombinant HTMLProceedings of the 22nd international conference on World Wide Web10.1145/2488388.2488399(107-118)Online publication date: 13-May-2013
        • (2013)Supporting Offline Interaction with Web Sites Resilient to Interruptions Applied to E-learning EnvironmentsRevised Selected Papers of the ICWE 2013 International Workshops on Current Trends in Web Engineering - Volume 829510.1007/978-3-319-04244-2_28(310-314)Online publication date: 8-Jul-2013
        • (2013)A Model-Based Approach for Supporting Offline Interaction with Web Sites Resilient to InterruptionsRevised Selected Papers of the ICWE 2013 International Workshops on Current Trends in Web Engineering - Volume 829510.1007/978-3-319-04244-2_15(156-171)Online publication date: 8-Jul-2013
        • (2012)Is the Browser the Side for Templating?IEEE Internet Computing10.1109/MIC.2011.8116:1(61-68)Online publication date: 1-Jan-2012
        • (2010)SVCProceedings of the 2010 USENIX conference on Web application development10.5555/1863166.1863174(8-8)Online publication date: 23-Jun-2010
        • (2010)Problems, solutions and new opportunitiesProceedings of the 12th International Conference on Information Integration and Web-based Applications & Services10.1145/1967486.1967594(679-682)Online publication date: 8-Nov-2010
        • (2010)Sync kitProceedings of the 19th international conference on World wide web10.1145/1772690.1772704(121-130)Online publication date: 26-Apr-2010
        • Show More Cited By

        View Options

        Login options

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Figures

        Tables

        Media

        Share

        Share

        Share this Publication link

        Share on social media