Summary

In this chapter, we have reviewed parts of the Scala language that we'll need in further sections when creating our web application's views using the Scala templating system.

We first introduced the language itself. Then we moved to the definition of an expression, studying some expressions in detail. We also looked at some ways with which Scala allows us to manipulate sequences. Well actually, we've seen enough to tackle most cases encountered when creating views for sequences (for instance, showing a list of users grouped by the first letter of their last name). We've seen how we can transform the elements into a new sequence, filter them, check their existence, and so on.

Such sequences are used most of the time with generics (especially when domain modeling is used with a top-level interface), but it's not a big deal for us as we can now declare and use generics in Scala.

Finally, we are able to create functions that result in functions, which in turn result in other functions, and so on. This will help us when creating templates and especially for creating layouts with them, which will be discussed in the next chapter.

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

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