skip to main content
research-article

Efficient high-level abstractions for web programming

Published:27 October 2013Publication History
Skip Abstract Section

Abstract

Writing large Web applications is known to be difficult. One challenge comes from the fact that the application's logic is scattered into heterogeneous clients and servers, making it difficult to share code between both sides or to move code from one side to the other. Another challenge is performance: while Web applications rely on ever more code on the client-side, they may run on smart phones with limited hardware capabilities. These two challenges raise the following problem: how to benefit from high-level languages and libraries making code complexity easier to manage and abstracting over the clients and servers differences without trading this ease of engineering for performance? This article presents high-level abstractions defined as deep embedded DSLs in Scala that can generate efficient code leveraging the characteristics of both client and server environments. We compare performance on client-side against other candidate technologies and against hand written low-level JavaScript code. Though code written with our DSL has a high level of abstraction, our benchmark on a real world application reports that it runs as fast as hand tuned low-level JavaScript code.

References

  1. J. Ashkenas. Coffeescript, 2011.Google ScholarGoogle Scholar
  2. B. Bibeault and Y. Kats. jQuery in Action. Dreamtech Press, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. K. J. Brown, A. K. Sujeeth, H. J. Lee, T. Rompf, H. Chafi, M. Odersky, and K. Olukotun. A heterogeneous parallel framework for domain-specific languages. In Parallel Architectures and Compilation Techniques (PACT), 2011 International Conference on, pages 89--100. IEEE, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. N. Cannasse. Using haxe. The Essential Guide to Open Source Flash Development, pages 227--244, 2008.Google ScholarGoogle Scholar
  5. P. Chaganti. Google Web Toolkit: GWT Java Ajax Programming. Packt Pub Limited, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. E. Cooper, S. Lindley, P. Wadler, and J. Yallop. Links: Web programming without tiers. In Formal Methods for Components and Objects, pages 266--296. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. C. Elliott, S. Finne, and O. De Moor. Compiling embedded languages. Journal of Functional Programming, 13 (3): 455--481, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. Griffith. The dart programming language for non-programmers-overview. 2011.Google ScholarGoogle Scholar
  9. T. Hoare. Null references: The billion dollar mistake. Presentation at QCon London, 2009.Google ScholarGoogle Scholar
  10. J. Huang, Q. Xu, B. Tiwana, Z. M. Mao, M. Zhang, and P. Bahl. Anatomizing application performance differences on smartphones. In Proceedings of the 8th international conference on Mobile systems, applications, and services, pages 165--178. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. Hudak. Building domain-specific embedded languages. ACM Computing Surveys, 28, 1996. URL http://dsel.ps. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. U. Jørring and W. L. Scherlis. Compilers and staging transformations. In Proceedings of the 13th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, pages 86--96. ACM, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. G. Kossakowski, N. Amin, T. Rompf, and M. Odersky. JavaScript as an Embedded DSL. In J. Noble, editor, ECOOP 2012 - Object-Oriented Programming, volume 7313 of Lecture Notes in Computer Science, pages 409--434, Berlin, Heidelberg, 2012. Springer Berlin Heidelberg. URL https://github.com/js-scala/js-scala/. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. Kuuskeri and T. Mikkonen. Partitioning web applications between the server and the client. In Proceedings of the 2009 ACM symposium on Applied Computing, SAC '09, pages 647--652, New York, NY, USA, 2009. ACM. ISBN 978-1-60558-166-8. URL http://doi.acm.org/10.1145/1529282.1529416. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. McGranaghan. Clojurescript: Functional programming for javascript platforms. Internet Computing, IEEE, 15 (6): 97--102, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. T. Mikkonen and A. Taivalsaari. Web applications - spaghetti code for the 21st century. In Proceedings of the 2008 Sixth International Conference on Software Engineering Research, Management and Applications, pages 319--328, Washington, DC, USA, 2008. IEEE Computer Society. ISBN 978-0-7695-3302-5. URL http://dl.acm.org/citation.cfm?id=1443226.1444030. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Nanda and S. Sinha. Accurate interprocedural null-dereference analysis for java. In Software Engineering, 2009. ICSE 2009. IEEE 31st International Conference on, pages 133--143. IEEE, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. C. Preciado, M. L. Trigueros, F. Sánchez-Figueroa, and S. Comai. Necessity of methodologies to model rich internet applications. In WSE, pages 7--13. IEEE Computer Society, 2005. ISBN 0-7695-2470-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Rodríguez-Echeverría. Ria: more than a nice face. In Proceedings of the Doctoral Consortium of the International Conference on Web Engineering, volume 484. CEUR-WS.org, 2009.Google ScholarGoogle Scholar
  20. T. Rompf. Lightweight Modular Staging and Embedded Compilers: Abstraction without Regret for High-Level High-Performance Programming. PhD thesis, ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE, 2012.Google ScholarGoogle Scholar
  21. T. Rompf, A. Sujeeth, N. Amin, K. Brown, V. Jovanovic, H. Lee, M. Jonnalagedda, K. Olukotun, and M. Odersky. Optimizing Data Structures in High-Level Programs: New Directions for Extensible Compilers based on Staging. Technical report, 2012.Google ScholarGoogle Scholar
  22. S. Souders. High-performance web sites. Communications of the ACM, 51 (12): 36--41, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. A. Van Deursen, P. Klint, and J. Visser. Domain-specific languages: an annotated bibliography. ACM Sigplan Notices, 35 (6): 26--36, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. E. Visser. WebDSL: A case study in domain-specific language engineering. In R. Lämmel, J. Visser, and J. Saraiva, editors, Generative and Transformational Techniques in Software Engineering II, International Summer School, GTTSE 2007, volume 5235 of Lecture Notes in Computer Science, pages 291--373, Braga, Portugal, 2007. Springer. ISBN 978-3-540-88642-6. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Efficient high-level abstractions for web programming

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!