Book Image

Learning Sinatra

By : Sudeep Agarwal, Manoj Sehrawat
Book Image

Learning Sinatra

By: Sudeep Agarwal, Manoj Sehrawat

Overview of this book

<p>Sinatra is a Ruby framework that is widely used in the Industry. You can use it to make a single-page web app or a large-scale one. With the increased online footprint, you can create and deploy your own application.</p> <p>Whether you are brand-new to online learning or a seasoned expert, this book will provide you with the skills you need to successfully create, customize, and deploy a Sinatra application. Starting from the beginning, this book will cover how to install Ruby and Sinatra, construct the back-end, design and customize the front-end layout, and utilize the innovative and user-friendly features of ORMs. By sequentially working through the steps in each chapter, you will quickly master Sinatra's features to create your own application.</p> <p>With ample screenshots and code that offers a play-by-play account of how to build an application, Learning Sinatra will ensure your success with this cutting-edge framework.</p>
Table of Contents (17 chapters)
Learning Sinatra
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

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 look good. Just using HTML is not enough as it does not have any designing capability. We will have to design using CSS. Now, if we start to write our own CSS code from scratch, it will take a lot of time. So, we will use some other freely available...