O'Reilly logo

Learning Sinatra by Manoj Sehrawat, Sudeep Agarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Designing views

Now that we have a clear understanding of the features that we want to implement for our application, we should also talk about the views or user interfaces that we will have to design.

We can use HTML directly and create forms and user interfaces for the application. We can also write our own CSS to design the UI. As we are using Ruby, we should exploit any feature that it provides in order to improve our efficiency.

In the first chapter, we discussed HAML. For our project, we will be using HAML to design our views. HAML is a lightweight templating language over HTML and is very easy to understand and implement. Ruby interprets HAML and generates HTML and then the browser renders it.

It is also important to make our user interfaces ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required