Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Scalatra in Action
Scalatra in Action
Scalatra in Action
Ebook499 pages2 hours

Scalatra in Action

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Summary

Scalatra in Actionintroduces the Scalatra framework and the Sinatra model. It covers the framework in its entirety, starting with concepts like request routing, input handling, actions, and HTTP responses, then proceeds to more advanced topics, such as data access, handling heavy load, asynchronicity, securing applications, designing and documenting RESTful APIs, and real-time web programming.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Technology

Scalatra is a lightweight Scala web framework similar to the popular Ruby-based Sinatra. It’s perfect for running real-time applications on multicore servers, and is a fast way to spin up web apps and build HTTP APIs for mobile, Backbone.js, and AngularJS apps.

About the Book

Scalatra in Actioncovers the Scalatra framework in its entirety, starting with concepts such as request routing, input handling, actions, and HTTP responses. For readers who don’t already know Scala, the book introduces the Scala language and sbt, the Simple Build Tool. You’ll learn how to use Scalatra’s powerful templating engine, Scalate. It also covers advanced topics such as data access, handling heavy load, asynchronicity, securing your application, designing RESTful APIs, and real-time web programming.

What's Inside

  • Make clean templates using Scalate
  • Integrate with libraries that supplement Scalatra
  • Write tests using Specs2
  • Integrate Scalatra with databases

About the Reader

Readers should be familiar with the basics of HTTP, REST, and web applications. No experience with Scalatra, Sinatra, or Scala is required.

About the Authors

Dave Hrycyszyn is technical director for a London-based agency specializing in agile software design and development. Stefan Ollinger is an active Scalatra contributor. Ross A. Baker is a Senior Cloud Engineer, a Scalate commiter, and organizer of the Indy Scala meetup.

Table of Contents
    PART 1 INTRODUCTION TO SCALATRA
  1. Introduction
  2. A taste of Scalatra
  3. Routing
  4. Working with user input
  5. PART 2 COMMON DEVELOPMENT TASKS
  6. Handling JSON
  7. Handling files
  8. Server-side templating
  9. Testing
  10. Configuration, build, and deployment
  11. Working with a database
  12. PART 3 ADVANCED TOPICS
  13. Authentication
  14. Asynchronous programming
  15. Creating a RESTful JSON API with Swagger
    LanguageEnglish
    PublisherManning
    Release dateMay 4, 2016
    ISBN9781638352914
    Scalatra in Action
    Author

    Ross Baker

    Ross A. Baker is a Senior Cloud Engineer at CrowdStrike. He guided the project from its origins as a blog post to the thriving community it is today. Ross is also a Scalate commiter and organizer of the Indy Scala meetup.

    Related to Scalatra in Action

    Related ebooks

    Internet & Web For You

    View More

    Related articles

    Reviews for Scalatra in Action

    Rating: 0 out of 5 stars
    0 ratings

    0 ratings0 reviews

    What did you think?

    Tap to rate

    Review must be at least 10 words

      Book preview

      Scalatra in Action - Ross Baker

      c|1abook_preview_excerpt.html]YrvJ:")!$ @O,ՀFK{ {'Z7*$;Ovyۺ\xߜr]ŲQ~C?~M osrEf l1wU T*5-UYJ]swDѵQje~}u4lg1禪UjĵESS)doLVm ڀs|̓gS+[N|~) xbWY1pQg"/_mmZf1+06?x6}fEc+ $KD*Sޤ%>8w_UjfhNYML:Quj"lwL(3'Vj, 11r j bg6#E -LS|_f (FM $$;'x,.&æ$P 2sqnMJ|m`RKbUÏW\ݒ UNuUZt:1H3Ccȫ9"dZcml`j;üuIGL}OPղI}P"ݴK]Oڃ֦C˃|n?O7nmNrOՁ:TGz^WXMW@#)TSіrJ*un,c69#o02yNw/zUeH3ߞ$w[/9'3uS7_br,kTbq6NEшW!MF-uILg: ]>K!wGs8{nS=syN`E 81~ޑ&ɰ7?"6r_@V{MI#'{Enpsh+ZSSfn=Qb=œVn Iz{6u)1IKEs2R@@.%ɓkk(E|a)-ƇVoonm&t9#ܬb:9^⢨Ig}3鷶LHޓ#~8|e2-zCLuîQ9r?Fo#A:t&YP Pə#fϒ;}ٞL[ԙ)J:7rfbCHpn8E u~ȬhV;̀@. $o%0`ސ"ZI s*2%1HUYmY(A@ՄQ1hF60pY!YvTc͎oV@LIߴ9E;~>s[1U8O1sح)Lisds^ Tށ CՊZ9nc|_U(mɟ% I#M3v#^)<O#iVkB肯 S;dSDc=ϖՁ^brCAٶvdή:Q2*CW.3|$SَwIHB GWTy@l^s?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