Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Play Framework essentials

You're reading from  Play Framework essentials

Product type Book
Published in Sep 2014
Publisher
ISBN-13 9781783982400
Pages 200 pages
Edition 1st Edition
Languages
Author (1):
Julien R Foy Julien R Foy
Author Profile Icon Julien R Foy
Julien R Foy
Toc

Table of Contents (14) Chapters Close

Play Framework Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Building a Web Service 2. Persisting Data and Testing 3. Turning a Web Service into a Web Application 4. Integrating with Client-side Technologies 5. Reactively Handling Long-running Requests 6. Leveraging the Play Stack – Security, Internationalization, Cache, and the HTTP Client 7. Scaling Your Codebase and Deploying Your Application Index

Managing assets from the build system


The previous sections showed how your Play application can serve static files such as JavaScript or CSS files. However, many people prefer not to write JavaScript or CSS code directly. Rather, they generate it from higher-level languages such as CoffeeScript and Less. Furthermore, you might want to minify and gzip these files as they don't need to be read by humans anymore when they are executed by web browsers and compressing them can save some bandwidth.

The build system of your Play application can manage such processing steps for you and make the produced assets available to your application as if they were static files in the public/ directory. This work is achieved by an sbt plugin family named sbt-web, which Play already depends on.

Note

You can find more information about sbt-web from http://github.com/sbt/sbt-web.

The sbt-web plugin defines a dedicated configuration scope named Assets (or web-assets from within the sbt shell) to configure the managed...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime