-
Caching
After watching this video; you will be able to set cache headers; cache control; and content expiration in Sinatra with the headers; cache_control; and expires helpers.
-
Connecting to Databases
After watching this video; you will be able to connect to different databases such as SQLite and Mongo from a Sinatra application.
-
Handling Errors
After watching this video; you will be able to Use the not_found and error blocks to handle errors in Sinatra.
-
Using Filters
After watching this video; you will be able to use filters to modify requests and responses in Sinatra.
-
Working with Sessions
After watching this video; you will be able to enable and destroy sessions using the configure block and session.clear in Sinatra.
-
Working with Bindings
After watching this video; you will be able to compare how to dynamically change the binding of a block in Sinatra by using instance_eval or by dynamically creating a method from the block; getting the unbound method object; and removing the method.
-
Working with Cookies
After watching this video; you will be able to set cookies in Sinatra.
-
Working with Return Values
After watching this video; you will be able to describe how to work with return values in modular applications including Sinatra applications used as rack middleware.
-
Working with Settings
After watching this video; you will be able to use set: or enable:key or the settings object to apply settings at class or top level in Sinatra.
-
Working with Subclasses
After watching this video; you will be able to use inheritance in Sinatra to build a controller architecture.
-
Creating a REST Service
After watching this video; you will be able to create a REST service in Sinatra.
-
B1Using MongoMapper
After watching this video; you will be able to generate and use a MongoMapper model in a Sinatra application.
-
Cascading Classes
After watching this video; you will be able to use Rack::Cascade to cascade applications as an alternative to a middleware chain.
-
Chaining Classes
After watching this video; you will be able to use a Sinatra application as middleware in front of another application.
-
Configuration in Sinatra
After watching this video; you will be able to use the configure block to apply configuration in Sinatra.
-
Configuring Content Streaming
After watching this video; you will be able to configure content streaming including finite streaming in a Sinatra application.
-
Configuring Routes
After watching this video; you will be able to configure routes to share the same handler; use parameters; including query string parameters and wildcards.
-
Creating Extensions
After watching this video; you will be able to create extensions in Sinatra.
-
Defining Routes
After watching this video; you will be able to declare routes using various route verbs in Sinatra .
-
Deploying with Apache and Passenger
After watching this video; you will be able to use Apache and Passenger to deploy Sinatra applications.
-
Deploying with Heroku
After watching this video; you will be able to use Heroku to deploy a Sinatra application.
-
Dispatching in Sinatra
After watching this video; you will be able to demonstrate the dispatch action that Sinatra uses when running as middleware.
-
Dynamic Subclasses
After watching this video; you will be able to use Sinatra.new() to generate an anonymous modular application and show to inherit from a different superclass.
-
ETags
After watching this video; you will be able to define and generate ETags (entity tags) including weak ETags.
-
Exercise: Configuring a Basic Sinatra Application
After watching this video; you will be able to develop and configure a basic application in Sinatra.
-
Helpers and Extensions in Modular Applications
After watching this video; you will be able to use helpers and extensions in modular Sinatra applications.
-
HTTP Headers
After watching this video; you will be able to use the headers method in Sinatra to set HTTP headers in response objects to provide information to servers and clients .
-
Installing and Using Sinatra
After watching this video; you will be able to describe how to install Sinatra and the Thin server on UNIX based platforms; and create and run a simple application.
-
Managing Assets
After watching this video; you will be able to use the Sinatra asset-pack gem to manage assets in an application.
-
Managing Requests
After watching this video; you will be able to halt; pass; trigger; and redirect requests in Sinatra.
-
Matching Routes
After watching this video; you will be able to describe how the first match is used and how routes can be matched using regular expressions in Sinatra.
-
Passing Data to Views
After watching this video; you will be able to use instance variables to pass data to views; and use filters in Sinatra.
-
Rack HTTP Authentication
After watching this video; you will be able to implement Rack authentication in a Sinatra application.
-
Rack Testing
After watching this video; you will be able to using Rack::Test to test a Sinatra application.
-
Reloading an Application
After watching this video; you will be able to use the shotgun gem to enable Sinatra code to be reloaded automatically.
-
RSS Feed with Builder
After watching this video; you will be able to use RSS feed templates with builder in Sinatra applications.
-
Running a Modular Application
After watching this video; you will be able to run a Sinatra-based modular application checking that the file containing the modular code has been executed and using config.ru.
-
Running an Application with Rack
After watching this video; you will be able to describe Rack and port an application defined using Sinatra to Rack.
-
Scopes and Bindings
After watching this video; you will be able to describe application/class scope; request/instance scope; delegation scope; and associated bindings in Sinatra applications.
-
Sending Attachments
After watching this video; you will be able to configure Sinatra to send attachments to a client.
-
Serving Static Content without Routes
After watching this video; you will be able to deliver static content from default public folder and other locations without using routing.
-
Subclass Architecture
After watching this video; you will be able to describe how Sinatra can subclass subclasses and describe how all elements; routes; settings; and methods are inherited by all subclasses.
-
The request Object
After watching this video; you will be able to access information via the request object in Sinatra.
-
Using a Router to Combine Classes
After watching this video; you will be able to use a Rack router to combine apps as an alternative to chaining or cascading.
-
Using ActiveRecord
After watching this video; you will be able to generate and use ActiveRecord models in a Sinatra application.
-
Using Bundler
After watching this video; you will be able to manage Sinatra dependencies with Bundler.
-
Using DataMapper
After watching this video; you will be able to generate and use DataMapper models in a Sinatra application.
-
Using Extensions with Helpers
After watching this video; you will be able to use Sinatra's registered method to combine helpers and extensions in an application.
-
Using Finite Streaming
After watching this video; you will be able to configure finite streaming in a Sinatra application.
-
Using Helpers
After watching this video; you will be able to create and use helper methods in modules in Sinatra.
-
Using Helpers without Modules
After watching this video; you will be able to create and use helper methods in blocks in Sinatra.
-
Using Inline and External Templates
After watching this video; you will be able to define inline and external templates to work with views in Sinatra.
-
Using Partials
After watching this video; you will be able to implement a Rails style partial handler in a Sinatra application.
-
Using Rack Middleware
After watching this video; you will be able to use Rack middleware with Sinatra.
-
Using the CoffeeScript template
After watching this video; you will be able to use the CoffeeScript template in Sinatra applications.
-
What is Sinatra?
After watching this video; you will be able to define Sinatra and describe its characteristics.
-
Sinatra Fundamentals
At the core of Sinatra is the ability to respond to routes. This course includes how to install and use Sinatra with the Thin server. It shows various aspects of route configuration, and covers the use of templates, views, and models, including ActiveRecord and DataMapper. It covers attachments and content streaming, as well as the basics of extensions and helpers, and dynamic modification of block binding. Finally, you'll learn about various aspects of application configuration to support features such as sessions, cookies, caching, and error handling.
- start the course
- define Sinatra and describe its characteristics
- describe how to install Sinatra and the Thin server on UNIX based platforms, and create and run a simple application
- declare routes using various route verbs in Sinatra
- configure routes to share the same handler, use parameters, including query string parameters and wildcards
- describe how the first match is used and how routes can be matched using regular expressions in Sinatra
- halt, pass, trigger, and redirect requests in Sinatra
- use filters to modify requests and responses in Sinatra
- deliver static content from default public folder and other locations without using routing
- define inline and external templates to work with views in Sinatra
- use instance variables to pass data to views, and use filters in Sinatra
- generate and use ActiveRecord models in a Sinatra application
- generate and use DataMapper models in a Sinatra application
- configure Sinatra to send attachments to a client
- configure content streaming including finite streaming in a Sinatra application
- configure finite streaming in a Sinatra application
- use the not_found and error blocks to handle errors in Sinatra
- describe application/class scope, request/instance scope, delegation scope, and associated bindings in Sinatra applications
- create extensions in Sinatra
- create and use helper methods in modules in Sinatra
- use the configure block to apply configuration in Sinatra
- use set: or enable:key or the settings object to apply settings at class or top level in Sinatra
- use the headers method in Sinatra to set HTTP headers in response objects to provide information to servers and clients
- access information via the request object in Sinatra
- set cache headers, cache control, and content expiration in Sinatra with the headers, cache_control, and expires helpers
- define and generate ETags (entity tags) including weak ETags
- enable and destroy sessions using the configure block and session.clear in Sinatra
- set cookies in Sinatra
- manage Sinatra dependencies with Bundler
- develop and configure a basic application in Sinatra
-
Working with Sinatra
In common with Ruby frameworks, Sinatra uses the Rack interface. This allows it to harness the functionality of Rack and enables the generation of Sinatra applications as a combination of middleware applications. After covering more advanced features of extensions, helpers, templates, views, and databases in the context of Sinatra applications, this course covers using Rack middleware with Sinatra. It also covers generating subclasses to create modular Sinatra applications. You'll also learn how to create a REST service using Sinatra. Finally, you'll learn how to manage Sinatra dependencies and assets, reload code, and deploy applications using Heroku or Apache Passenger.
- start the course
- create and use helper methods in blocks in Sinatra
- use Sinatra's registered method to combine helpers and extensions in an application
- compare how to dynamically change the binding of a block in Sinatra by using instance_eval or by dynamically creating a method from the block, getting the unbound method object, and removing the method
- implement a Rails style partial handler in a Sinatra application
- use the CoffeeScript template in Sinatra applications
- use RSS feed templates with builder in Sinatra applications
- generate and use a MongoMapper model in a Sinatra application
- connect to different databases such as SQLite and Mongo from a Sinatra application
- describe Rack and port an application defined using Sinatra to Rack
- use Rack middleware with Sinatra
- demonstrate the dispatch action that Sinatra uses when running as middleware
- implement Rack authentication in a Sinatra application
- using Rack::Test to test a Sinatra application
- define Sinatra::Base and use it to create a subclass and run the application in Sinatra using run
- describe how Sinatra can subclass subclasses and describe how all elements, routes, settings, and methods are inherited by all subclasses
- use inheritance in Sinatra to build a controller architecture
- run a Sinatra-based modular application checking that the file containing the modular code has been executed and using config.ru
- use Sinatra.new() to generate an anonymous modular application and show to inherit from a different superclass
- use helpers and extensions in modular Sinatra applications
- use a Sinatra application as middleware in front of another application
- use Rack::Cascade to cascade applications as an alternative to a middleware chain
- use a Rack router to combine apps as an alternative to chaining or cascading
- describe how to work with return values in modular applications including Sinatra applications used as Rack middleware
- create a REST service using Sinatra
- use the Sinatra asset-pack gem to manage assets in an application
- use the shotgun gem to enable Sinatra code to be reloaded automatically
- use Heroku to deploy a Sinatra application
- use Apache and Passenger to deploy Sinatra applications
- create a REST service in Sinatra
-
Creating a REST Service
After watching this video; you will be able to create a REST service using Sinatra.
-
Creating a Subclass
After watching this video; you will be able to define Sinatra::Base and use it to create a subclass and run the application in Sinatra using run!.