Rack provides a simple interface for building web applications in Ruby. This document outlines how to build a basic web framework on top of Rack by leveraging existing Rack middleware and tools. It demonstrates how to add features like routing, controllers, views, ORM, authentication, testing, and a console using middleware like Usher, Tilt, DataMapper, Warden, rack-test, and racksh. The goal is to create a simple but full-featured framework with minimal code by combining existing Rack components.
Imagine for a while that Rails wouldn't exist. How would we write a MVC app from scratch?
Rack provides a minimal interface for developing web applications in Ruby. In fact it's the solid foundation of all major Ruby powered web frameworks.
During this talk we will dive deep into Rack. We will see the smallest possible Rack Application and learn how it works, by studying Rack internals. We will grow the Application step by step till we implement it in simple MVC style.
Sprockets is an easy solution to managing large JavaScript codebases by letting you structure it, bundle it with related assets, and consolidate it as one single file, with pre-baked command-line tooling, CGI front and Rails plugin. It's a framework-agnostic open-source solution that makes for great serving performance while helping you structure and manage your codebase better.
Imagine for a while that Rails wouldn't exist. How would we write a MVC app from scratch?
Rack provides a minimal interface for developing web applications in Ruby. In fact it's the solid foundation of all major Ruby powered web frameworks.
During this talk we will dive deep into Rack. We will see the smallest possible Rack Application and learn how it works, by studying Rack internals. We will grow the Application step by step till we implement it in simple MVC style.
Sprockets is an easy solution to managing large JavaScript codebases by letting you structure it, bundle it with related assets, and consolidate it as one single file, with pre-baked command-line tooling, CGI front and Rails plugin. It's a framework-agnostic open-source solution that makes for great serving performance while helping you structure and manage your codebase better.
CouchDB for Web Applications - Erlang Factory London 2009Jason Davies
CouchDB is built "of the Web" and it's very exciting to convert the immense
power that CouchDB provides into a usable, real-world Web application. In this
talk I cover case studies of real-world applications that use CouchDB,
including some that can be served from CouchDB itself, and how CouchDB can
shape your Web applications to be highly scalable and flexible by embracing
HTTP philosophies, JavaScript and schemaless documents.
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...Ryan Weaver
If you're like me, you know that being a great backend developer isn't enough. To make *truly* great applications, we need to spend significant time in an area that's moving at a lightning pace: frontend development.
This talk is for you: the backend developer that wants to hook their API's up to rich, interactive JavaScript frontends. To do that, first, we need to demystify a lot of new terms, like ES6/ES2015, ECMAScript, JSX, Babel and the idea that modern JavaScript (surprise) *requires* a build step.
With this in mind, I'll give you a brief introduction into Webpack & the modular development it finally allows.
But the real star is ReactJS. In the frontend world, you never know what new tech will *win*, but React is a star. I'll give you enough of an intro to get you rolling on your project.
The new frontend dev world is huge! Consider the starting line down an exciting new journey.
RSVP Node.js class at www.nycdatascience.com
NYC data science academy's free workshop, given at NYC Open Data Meetup, http://www.meetup.com/NYC-Open-Data/events/163300552/
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsRyan Weaver
Bower, Grunt, and RequireJS are just a few tools that have been re-shaping the frontend development world, replacing cluttered script tags and server-side build solutions with a sophisticated, but sometimes complex approach to dependency management and module loading. In this talk, we'll put on our trendy frontend developer hat and find out how these tools work and how they differ from what we might be used to. Most important, we'll see how using tools like this might look in Symfony2 and how our application can be a friendly place for a frontend guy/gal.
Alfresco’s highly customizable repository can often seem overwhelming. Learn approaches for adding common customizations requests (Extending Javascript API, Content Modeling, Permission Modeling, packaging, etc.) from current and former Alfresco consulting staff. Learn where we often see the most common errors and participate in open Q&A.
Introducing Assetic: Asset Management for PHP 5.3Kris Wallsmith
The performance of your application depends heavily on the number and size of assets on each page. Even your blazingly fastest Symfony2 application can be bogged down by bloated Javascript and CSS files. This session will give you a basic introduction to PHP's new asset management framework, Assetic, and explore how it integrates with Symfony2 for a pleasant, common sense developer experience.
Keeping the frontend under control with Symfony and WebpackIgnacio Martín
Webpack tutorial with tips for Symfony users. Topics covered include: current frontend trends, setup, loaders, dev tools, optimization in production, bundle splitting and tips and tricks for using webpack with existing projects.
Symfony Munich Meetup 2016.
CouchDB for Web Applications - Erlang Factory London 2009Jason Davies
CouchDB is built "of the Web" and it's very exciting to convert the immense
power that CouchDB provides into a usable, real-world Web application. In this
talk I cover case studies of real-world applications that use CouchDB,
including some that can be served from CouchDB itself, and how CouchDB can
shape your Web applications to be highly scalable and flexible by embracing
HTTP philosophies, JavaScript and schemaless documents.
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...Ryan Weaver
If you're like me, you know that being a great backend developer isn't enough. To make *truly* great applications, we need to spend significant time in an area that's moving at a lightning pace: frontend development.
This talk is for you: the backend developer that wants to hook their API's up to rich, interactive JavaScript frontends. To do that, first, we need to demystify a lot of new terms, like ES6/ES2015, ECMAScript, JSX, Babel and the idea that modern JavaScript (surprise) *requires* a build step.
With this in mind, I'll give you a brief introduction into Webpack & the modular development it finally allows.
But the real star is ReactJS. In the frontend world, you never know what new tech will *win*, but React is a star. I'll give you enough of an intro to get you rolling on your project.
The new frontend dev world is huge! Consider the starting line down an exciting new journey.
RSVP Node.js class at www.nycdatascience.com
NYC data science academy's free workshop, given at NYC Open Data Meetup, http://www.meetup.com/NYC-Open-Data/events/163300552/
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other ToolsRyan Weaver
Bower, Grunt, and RequireJS are just a few tools that have been re-shaping the frontend development world, replacing cluttered script tags and server-side build solutions with a sophisticated, but sometimes complex approach to dependency management and module loading. In this talk, we'll put on our trendy frontend developer hat and find out how these tools work and how they differ from what we might be used to. Most important, we'll see how using tools like this might look in Symfony2 and how our application can be a friendly place for a frontend guy/gal.
Alfresco’s highly customizable repository can often seem overwhelming. Learn approaches for adding common customizations requests (Extending Javascript API, Content Modeling, Permission Modeling, packaging, etc.) from current and former Alfresco consulting staff. Learn where we often see the most common errors and participate in open Q&A.
Introducing Assetic: Asset Management for PHP 5.3Kris Wallsmith
The performance of your application depends heavily on the number and size of assets on each page. Even your blazingly fastest Symfony2 application can be bogged down by bloated Javascript and CSS files. This session will give you a basic introduction to PHP's new asset management framework, Assetic, and explore how it integrates with Symfony2 for a pleasant, common sense developer experience.
Keeping the frontend under control with Symfony and WebpackIgnacio Martín
Webpack tutorial with tips for Symfony users. Topics covered include: current frontend trends, setup, loaders, dev tools, optimization in production, bundle splitting and tips and tricks for using webpack with existing projects.
Symfony Munich Meetup 2016.
Based on original presentation by Dan Webb http://slidesha.re/dan_on_rack
Added some bits about Rails at the end, instead of other examples he had originally.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
2. I am:
Senior developer @ Lunar Logic Polska -
agile Ruby on Rails development services
Working with web for 10 years
Using Ruby, Python, Java and others - in
love with Ruby since 2006
3. Open Source contributor:
CodeRack.org - Rack middleware
repository
Open File Fast - Netbeans and JEdit
plugin
racksh - console for Rack apps
and many more (check
github.com/sickill)
4. Why would you need
another framework?
"Because world needs yet another framework ;-)" - Tomash
8. Rack provides everything you'll need, is
extremely simple but extremely
powerful
It will help you to better understand
HTTP
It will make you better developer
Your custom framework will be the
fastest one *
It's fun! A lot of fun :)
28. Let's build our base
controller
every action is valid Rack endpoint
value returned from action becomes
body of the response
29. # lib/base_controller.rb
module Foobar
class BaseController
def call(env)
@request = Rack::Request.new(env)
@response = Rack::Response.new
resp_text = self.send(env['x-rack.action-name'])
@response.write(resp_text)
@response.finish
end
def self.action(name)
lambda do |env|
env['x-rack.action-name'] = name
self.new.call(env)
end
end
end
end
30. # config.ru
require APP_ROOT / "lib" / "base_controller.rb"
Dir[APP_ROOT / "app" / "controllers" / "*.rb"].each do |f|
require f
end
33. Controllers also need following:
session access
setting flash messages
setting HTTP headers
redirects
url generation
34. rack-contrib
"Contributed Rack Middleware and Utilities"
github.com/rack/rack-contrib
rack-flash
"Simple flash hash implementation for Rack apps"
nakajima.github.com/rack-flash
35. # Gemfile
gem "rack-flash"
gem "rack-contrib", :require => 'rack/contrib'
# config.ru
use Rack::Flash
use Rack::Session::Cookie
use Rack::MethodOverride
use Rack::NestedParams
36. # lib/base_controller.rb
module Foobar
class BaseController
def status=(code); @response.status = code; end
def headers; @response.header; end
def session; @request.env['rack.session']; end
def flash; @request.env['x-rack.flash']; end
def url(name, opts={}); Router.generate(name, opts); end
def redirect_to(url)
self.status = 302
headers["Location"] = url
"You're being redirected"
end
end
end
37. Now we can use #session,
#flash and #redirect_to
42. # lib/base_controller.rb
module Foobar
class BaseController
def render(template=nil)
template ||= @request.env['x-rack.action-name']
views_path = "#{APP_ROOT}/app/views"
template_path =
"#{views_path}/#{self.class.to_s.underscore}/" +
"#{template}.html.erb"
layout_path =
"#{views_path}/layouts/application.html.erb"
Tilt.new(layout_path).render(self) do
Tilt.new(template_path).render(self)
end
end
end
end
44. DataMapper
"DataMapper is a Object Relational Mapper written in Ruby. The
goal is to create an ORM which is fast, thread-safe and feature
rich."
datamapper.org
45. # Gemfile
gem "dm-core"
gem "dm-..."
# app/models/user.rb
class User
include DataMapper::Resource
property :id, Serial
property :login, String, :required => true
property :password, String, :required => true
end
# config.ru
Dir[APP_ROOT / "app" / "models" / "*.rb"].each do |f|
require f
end
48. # Gemfile
gem "warden"
# config.ru
use Warden::Manager do |manager|
manager.default_strategies :password
manager.failure_app =
ExceptionsController.action(:unauthenticated)
end
require "#{APP_ROOT}/lib/warden.rb"
49. # lib/warden.rb
Warden::Manager.serialize_into_session do |user|
user.id
end
Warden::Manager.serialize_from_session do |key|
User.get(key)
end
Warden::Strategies.add(:password) do
def authenticate!
u = User.authenticate(
params["username"],
params["password"]
)
u.nil? ? fail!("Could not log in") : success!(u)
end
end
50. # lib/base_controller.rb
module Foobar
class BaseController
def authenticate!
@request.env['warden'].authenticate!
end
def logout!(scope=nil)
@request.env['warden'].logout(scope)
end
def current_user
@request.env['warden'].user
end
end
end
51. Now we can guard our action:
# app/controllers/users_controller.rb
class UsersController < Foobar::BaseController
def index
authenticate!
@users = User.all(:id.not => current_user.id)
render
end
end
53. rack-test
"Rack::Test is a small, simple testing API for Rack apps. It can be
used on its own or as a reusable starting point for Web
frameworks and testing libraries to build on."
github.com/brynary/rack-test
55. require "rack/test"
class UsersControllerTest < Test::Unit::TestCase
include Rack::Test::Methods
def app
Foobar::Router.new
end
def test_redirect_from_old_dashboard
get "/old_dashboard"
follow_redirect!
assert_equal "http://example.org/new_dashboard",
last_request.url
assert last_response.ok?
end
end
57. racksh (aka Rack::Shell)
"racksh is a console for Rack based ruby web applications. It's
like Rails script/console or Merb's merb -i, but for any app built
on Rack"
github.com/sickill/racksh