Preface

Most web frameworks have a lot of assumptions built into them. When you’re building whatever the framework designers envisaged, they work very well. But if you need to depart from their happy paths, all that prescriptiveness starts to work against you.

Full-stack web frameworks with server-side rendering, using a relational database are common, and in the past I used them all the time. But over time, I progressively departed from using their standard components.

I began to build web APIs and microservices, often using nonrelational data stores, asynchronous requests, and server-push technologies. I was installing more dependencies to layer extra functionality on top of already large and complex frameworks. Simple tasks were difficult, because I was fighting against the basic assumptions of the frameworks I was using.

Then I discovered Scalatra. The language was unfamiliar at first, but the friendly community and incredibly simple HTTP DSL made it easy to get started.

Suddenly I was working in the environment I always wanted. The Scala language gave me all the speed and correctness benefits of static typing without the Java or C# boilerplate, a simple and productive language syntax akin to Ruby or Python, and access to a wealth of high-quality libraries.

Scalatra, with its minimalistic style, does one thing well: it makes HTTP actions trivially easy to express. Beyond that, it gets out of your way. This makes it easy to pick and choose from tens of thousands of Java and Scala libraries to build exactly the application you need.

We wrote this book to bring this minimal style of application development to a wider audience. The web’s not new technology any more, and if the history of computing tells us anything, it’s that common tasks get simpler over time.

The modern internet wouldn’t be much fun if people sent input using punched cards and had to wait several hours to get their output back, as though it were the 1960s. We think that the acrobatics coders go through to quickly set up high-performance HTTP interfaces to their programs are similarly outdated. It’s not 1996 anymore. HTTP can be easy.

Scalatra is one of the easiest ways to build a web application. This book will show you pretty much the entirety of the framework in the first four chapters. The other nine chapters explain how to integrate with other interesting components, customize the framework, and deploy your applications. Because really, it’s not about us: it’s about you, your ambitions, and the next thing you want to make.

DAVE HRYCYSZYN

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.212.124