We Talked Sinatra with the Experts…

Sarah Hawk

After a couple of months hiatus we’re back into the swing of our Talk with the Experts sessions. This morning’s session saw us talking about all things Sinatra with Darren Jones – author of the latest book (released yesterday) in our new series, Jump Start Sinatra, and Konstantin Haase – expert reviewer of said book. It was a fun and informal session, with the majority of participants being new to the subject. If you missed it, fear not… below is a list of resources that came out of the chat, as well as a full transcript.

Session related resources:

Darren is answering Sinatra questions (book related or not) here.

If you’re new to Ruby or Sinatra and need some support, why not join this Podling group?

If you missed this session because you forgot, you can sign up for email reminders of future sessions here.

If you haven’t already seen it, check out Darren’s new book here. 

And while I’m on the subject of the book, a free copy is going out to nicksh for his awesome participation in today’s session. Congratulations!


General Ruby and Sinatra resources mentioned in the session:

Here is Sinatra itself http://www.sinatrarb.com/wild

Here’s are a couple of good places to learn basic Ruby: http://pine.fm/LearnToProgram/ and http://tryruby.org/

Here is a blog post of how Darren built and deployed a simple site in a couple of hours using Sinatra: http://www.sitepoint.com/sinatra-heroku-super-fast-deployment/

Here is a complete chat implementation, with everything in one file: https://github.com/sinatra/sinatra/blob/master/examples/chat.rb

Security – this Rack protection gem comes with Sinatra: https://github.com/rkh/rack-protection

For Sinatra articles check out http://www.sitepoint.com/

Here’s an article comparing Sinatra and Rails: http://www.sitepoint.com/rails-or-sinatra-the-best-of-both-worlds/

Here’s the SitePoint Ruby forum: http://www.sitepoint.com/forums/forumdisplay.php?227-Ruby-amp-Rails

And finally, here is the full transcript. Enjoy…

HAWK HAWK
Ok, we may as well kick off then. For those of your that don’t know, @daz4126 is the author of Jump Start Sinatra, and @rkh is the expert reviewer. They are today’s experts. So what are your interests in Sinatra. Anyone already a user?
George George
I work for rundavoo. Live in Los Angeles. Developing Sinatra API.
srpsco srpsco
Any one else already start reading the book?
HAWK HAWK
What are your thoughts on it so far @srpsco
daz4126 daz4126
Hi guys!
rkh rkh
And @daz4126 is here. :)
nicksh nicksh
I haven’t used Sinatra yet
molona molona
I didn’t have the time to start the book but I’m looking forward to it
nicksh nicksh
but it’s cool
ServerSt… ServerStorm
I am interested if the abstraction of Sinatra hurts underlining development?
rkh rkh
@ServerStorm how do you mean?
srpsco srpsco
@HAWK So far so good I am only 1/3 done
daz4126 daz4126
@serverStorm, what sort of abstractions?
ServerSt… ServerStorm
As you are not working with RAILS directly, what happens if something breaks can you easily debug it in Sinatra or do you have to climb into RAILS deeper to do this?
HAWK HAWK
For those of you that haven’t seen the book yet, you’ll find it here http://www.sitepoint.com/launch/8396b1
srpsco srpsco
@HAWK I am thinking of doing a review for dzone when I am done
rkh rkh
@ServerStorm Sinatra does not sit on top of Rails.
George George
I have a question. I would like to develop a Sinatra API for a stock exchange. I imagine that most existing stock exchanges use C++/C#/Java. Is it practical to develop a high volume API in Sinatra?
daz4126 daz4126
@serverStorm You don’t need to use Rails at all, Sinatra only uses Rack and Ruby
HAWK HAWK
Sounds great @srpsco – if you’re on Twitter, make sure you tweet us a link
nicksh nicksh
@George I think Sinatra is for simpler applications
ServerSt… ServerStorm
Oh ok then I have much to learn ;)
George George
Can it scale to millions of requests per second?
srpsco srpsco
@HAWK will do
daz4126 daz4126
Thanks @srpsco!
rkh rkh
@George Scalability is not really a question of language or framework.
It’s more about architecture
alme1304 alme1304
I’m quite curious about Sinatra but I have yet to make time to start learning. Would Sinatra be a equivalent to PHP’s Codeigniter? as far as weight and liberties go?
rkh rkh
@George I know of Sinatra apps having response times of under 24 ms.
George George
Is it practical to create the architecture that supports such a Sinatra API?
daz4126 daz4126
I think you could write this sort of thing in Sinatra, it would depend on the api used by the stock exchanges you were connecting to
ServerSt… ServerStorm
What are the key strengths of Sinatra over competing frameworks?
srpsco srpsco
@alme1304 I think it is closer to laravel
George George
I am creating the exchange. Other people connect to it using REST.
HAWK HAWK
I’ll jump in here and let you know that I’ll be giving away a couple of free copies of Darren’s book at the end of the session to people that ask great questions.
daz4126 daz4126
@alme1304 Sinatra is much more lightweight than CodeIgniter
Code Igniter is based on Rails
HAWK HAWK
Welcome @Hiro – we’ve just kicked off. Feel free to jump in with questions at any time, or just to lurk if you’d prefer!
mib mib
Is getting it up and running on Windows difficult?
rkh rkh
@mib not at all, using the “Ruby Installer” it’s actually quite easy to get it running on Windows.
Just tried that a few days ago.
nicksh nicksh
Windows is such a mess..
but yea should be easy
rkh rkh
@Hiro Asari?
Hiro Hiro
@HAWK thanks
Hiro Hiro
@rkh Yes, sir.
molona molona
How about security? Is it too difficult to enforce security with Sinatra? I would assume that it has functions for hashing and all that
George George
Is Darren here? Do you have an answer to my question?
nicksh nicksh
@molona good question
alme1304 alme1304
@srpsco and as far as deployment goes, how does it work, do I have to use something like heroku or is the wider selection of deployment options compared rail?
rkh rkh
@molona in contrast to Rails, etc, Sinatra is only about HTTP, but it does provide security mechanisms out of the box.
alme1304 alme1304
rails*
daz4126 daz4126
@serverStorm Sinatra isn’t really a framework, it’s a DSL (domain specific language). It’s strength is in its flexibility – you can choose how to construct the architecture of your application
daz4126 daz4126
I’m on it George!
daz4126 daz4126
If you are using a REST API then you should easily be able to build it with Sinatra
rkh rkh
@alme1304 anything that can run rails can run sinatra, there is a wide selection, and you basically just need to get ruby running.
ServerSt… ServerStorm
Do it use OOP conventions or procedural or both?
molona molona
thanks
watjen watjen
I know very little about Sinatra. Does it manage sessions and cookies?
srpsco srpsco
@alme1304 Heroku is an option and one that is very easy, ut it can be done with a vps, aws I also think engine yard offers support
daz4126 daz4126
@watjen yes Sinatra handles sessions and cookies for you. It’s covered in the book
rkh rkh
@ServerStorm internally, it is object oriented and you can easily write fully object oriented apps, but the DSL is declerative
ServerSt… ServerStorm
Thanks you
nicksh nicksh
Don’t forget Appfog
HAWK HAWK
Welcome @dorthe. Feel free to jump in with questions if you have any.
ServerSt… ServerStorm
yikes maybe I can learn to speak English today :(
daz4126 daz4126
Yes there are loads of deployment options nowadays, anything that supports Ruby
nicksh nicksh
@ServerStorm You speak French?
ServerSt… ServerStorm
Yes some but I’m supposed to be a native English speaker, it just isn’t showing well currently
Hiro Hiro
Am I allowed to plug in the PaaS that I work on? ;-)
daz4126 daz4126
haha
dorthe dorthe
Tx -i don’t know anything about sinatra – was just curious
rkh rkh
(@Hiro is from RedHat and on the JRuby team)
molona molona
I assume that even if it doesn’t need Rails it should do fine with Rails too? or am I assuming too much?
HAWK HAWK
@dorthe Sweet – feel free to lurk then!
nicksh nicksh
@haWK is offtopic link-posting allowed?
rkh rkh
@molona it works fine with rails
molona molona
@ServerStorm… you still speak better English than I do :D
ServerSt… ServerStorm
Do you know of any larger commercial projects that have been developed using Sinatra?
HAWK HAWK
@nicksh Yeah – this is pretty informal. I may edit them from the transcript though
rkh rkh
@molona github is one rails app and ~30 sinatra apps, all running in the same process
molona molona
and no, I don’t speak French :p
rkh rkh
@ServerStorm yes, lots
daz4126 daz4126
@dorthe Sinatra is a Domain Specific Language that lets you build web apps in Ruby by helping you connect to HTTP
watjen watjen
Is Sinatra a stand alone server?
rkh rkh
daz4126 daz4126
@serverStorm gaug.es uses it
ServerSt… ServerStorm
Thanks rkh
rkh rkh
@watjen ruby ships with a server and sinatra can manage it for you
srpsco srpsco
does siantra or rack cahe views and layouts
rkh rkh
yes
daz4126 daz4126
@srpsco yes
rkh rkh
@srpsco it does
daz4126 daz4126
There is a bit in the book about caching
The cache control is really easy to use
srpsco srpsco
@daz4126 thanks I have only gotten to chapter 3 will finish the rest tonight
ServerSt… ServerStorm
What are the best tools to use when developing Sinatra? Are there specific IDEs or do you use simple text editors
daz4126 daz4126
@srpsco great, would love to know what you think. I wrote a bit about caching here too http://www.sitepoint.com/sinatras-little-helpers/
dorthe dorthe
ahh. I’m new to Ruby but i’m thinking to get the sitepoint book
watjen watjen
Will a Sinatra app run on Passenger?
daz4126 daz4126
@serverStorm definitely just a text editor! I use gedit
nicksh nicksh
@ServerStorm I prefer Sublime Text 2 for everything
rkh rkh
@ServerStorm I use textmate, there is a bundle for it, you can also use the RubyMine IDE.
nicksh nicksh
Gedit is also good with plugins
rkh rkh
@watjen yes
ServerSt… ServerStorm
I use eclipse but I’m sure it will work too :)
rkh rkh
probably
daz4126 daz4126
@serverStorm should do
rkh rkh
I used NetBeans at one time to do Sinatra development
ServerSt… ServerStorm
How long has Sinatra been around?
rkh rkh
since 2007
daz4126 daz4126
You can build apps in a single file, so you could even use …(shock horror) … notepad!!!
nicksh nicksh
(scary music)
molona molona
Hey! I use Notepad… ++ :p
nicksh nicksh
At least Notepad++
daz4126 daz4126
It has really come on loads since @rkh started maintaining it
ServerSt… ServerStorm
Is it a real advantage to cram it all into one file?
daz4126 daz4126
Was started by Blake Mizerany (of Heroku)
rkh rkh
companies using Sinatra include Apple, the BBC, GitHub, LinkedIn, houghtbot and many more
Greg-Tek… Greg-Tekamba
my current 2 favorite apps for dev are PHPStorm (though a bit overkill at times (read that as slow) but lately I’ve been enjoying working in Sublime Text 2
ServerSt… ServerStorm
Good job rkh!
daz4126 daz4126
@serverStorm not for big apps, but it’s cool to do it for little demos
dorthe dorthe
Is it possible to make a quick guide to get started – maybo put on on the Facebook page
rkh rkh
@ServerStorm thanks
daz4126 daz4126
get ‘/’ do
“hello world”
end
That’s your basic app
HAWK HAWK
Wow – even I could do that ;)
daz4126 daz4126
To get started … install Ruby, install the Sinatra gem
molona molona
It seems that “Hello World” is the only application that I’ve learnt to write in any programming language :p
daz4126 daz4126
save the lines above as hello.rb
rkh rkh
if you have a decent ruby version installed, you can also run this on the command line: ruby -rsinatra -e “get(‘/’) { ‘Hello World’ }”
daz4126 daz4126
then type hello.rb into a terminal/console
@molona ha ha, same here for me with many languages
ServerSt… ServerStorm
If you considered building the same small application in ASP.NET, Symphony, Node.js using Coffee Script, and Sinatra is the development cycle faster, slower? Is the code base the smallest?
rkh rkh
here is a complete chat implementation, everything in one file: https://github.com/sinatra/sinatra/blob/master/examples/chat.rb
ServerSt… ServerStorm
thanks rkh
daz4126 daz4126
@serverStorm some of them are languages (like ruby) and some are frameworks so not easy to compare
molona molona
@rkh thanks. Great resource :D
alme1304 alme1304
Is there a set of community standards or guidelines when developing apps or does everyone have different methods
daz4126 daz4126
@alme1304 great question!
rkh rkh
there are a lot of sinatra clones in other languages, btw.
daz4126 daz4126
There aren’t really any standards – this is a good and bad thing!
nicksh nicksh
Is Node.JS’s Express similar to Sinatra?
rkh rkh
yes
daz4126 daz4126
Although it’s easy to build a MVC architecture using Sinatra (like Rails uses)
ServerSt… ServerStorm
Yes, I’m just trying to understand what advantages it has over other framework choices in other languages. I know this is a loaded question, but never written a line in Sinatra it is a valid question
rkh rkh
@nicksh express was written by a former sinatra contributor
and is inspired by it
daz4126 daz4126
The advantages are that development is very quick and you get to choose how it is set out
molona molona
I’m wondering about resources… the book seems to be a good starting point but where would be possible to find more examples/advanced information?
ServerSt… ServerStorm
Thanks daz
daz4126 daz4126
There is also minimal amount of fuss and set up when you are getting started
rkh rkh
@ServerStorm simplicity, security, maturity
ServerSt… ServerStorm
Cool
rkh rkh
some larger companies use it because they can do a complete security review in a week or less
daz4126 daz4126
For those interested in an example, here is a blog post of how I built and deployed a simple site in a couple of hours using Sinatrahttp://www.sitepoint.com/sinatra-heroku-super-fast-deployment/
rkh rkh
some companies use it because it plays nice with their pre-existing software
watzit watzit
what about security? Sinatra can’t possibly be buttoned as tightly as Rails? http://guides.rubyonrails.org/security.html
rkh rkh
for instance, linkedin added it on top of their java business logic
daz4126 daz4126
A big advantage is it uses Ruby … and Ruby is a nice language!
rkh rkh
@watzit it can’t indeed, because it does not know about your database
Hiro Hiro
*JRuby* ;-)
nicksh nicksh
@daz4126 Can’t agree more :D
watjen watjen
Why would I want to use Sinatra instead of Rails?
rkh rkh
@watzit this comes with sinatra: https://github.com/rkh/rack-protection
daz4126 daz4126
@molona RubySource has articles and there are other things floating around on the net
nicksh nicksh
@watjen Simplicity
molona molona
I don’t know Ruby… would you suggest me to learn Ruby first? or should I be fine if I learn as I learn Sinatray
?
HAWK HAWK
daz4126 daz4126
But after reading the book, the main thing would be to improve your Ruby … because anything written in Ruby can then be plugged into the web using Sinatra
So the limiting factor becomes your Ruby Skills
molona molona
Yes, there’s lots of information around the net but it is always so hard to know what’s good and what’s bad :(
daz4126 daz4126
The Sinatra google group is always a good place to go for info too
rkh rkh
@molona Sinatra is straight forward and really simple, so the big thing will be learning Ruby anyways.
@molona that’s why @daz4126 wrote a book :)
daz4126 daz4126
Here’s a good place to learn basic Ruby http://pine.fm/LearnToProgram/
molona molona
@rkh good reply :D
dorthe dorthe
@daz4126 nice link
nicksh nicksh
@daz4126 Don’t forget TryRuby :D
HAWK HAWK
For anyone that is planning on getting into Ruby/Sinatra, I’ve started a Podling group for support https://podling.com/invitations/298-talk-sinatra-with-the-experts/325/edHfz8B6yP
ServerSt… ServerStorm
Is Sinatra’s handling of AJAX pretty easy? What about database connectivity?
daz4126 daz4126
@watjen Here’s a link where people compared using Sinatra and Rails http://www.sitepoint.com/rails-or-sinatra-the-best-of-both-worlds/
HAWK HAWK
rkh rkh
@ServerStorm yes, doing ajax is straight forward.
daz4126 daz4126
Of course @nicksh the interactive one http://tryruby.org/
srpsco srpsco
@serverStorm db connection is very easy and supportsseveral different DB’s
HAWK HAWK
And specifically this thread, where @daz4126 is answering questions specifically http://www.sitepoint.com/forums/showthread.php?960208-New-Book-Jump-Start-Sinatra&p=5299210#post5299210
rkh rkh
@ServerStorm there are a couple of database libraries to choose from
ServerSt… ServerStorm
thanks rkh and srpsco
daz4126 daz4126
@serverStorm you can connect to any database really easy. In the book we use DataMapper to connect to a sqlite database
But you can also use things like MongoDB if nosql is your thing
ServerSt… ServerStorm
What about NoSQL support
daz4126 daz4126
Ajax is covered in chapter 6 of the book
rkh rkh
for our product we use ActiveRecord, which originally comes from Rails
daz4126 daz4126
nicksh nicksh
I love ActiveRecord
rkh rkh
@ServerStorm there are libraries for any popular and most unpopular nosql solutions out there. sinatra it self does not care.
srpsco srpsco
@serverStorm and postgres for heroku folks you can test locally with sqlite and with nearly no changes move to heroku/postgres
daz4126 daz4126
I never really liked it, but I gather it’s got better recently
rkh rkh
for us it’s that we moved from a rails app to many sinatra apps
ServerSt… ServerStorm
That’s nice srpsco
daz4126 daz4126
@srpsco yes in the book, that’s what we do – sqlite locally and then use postgres on Heroku for live deployment
I really like the mongo syntax and the whole idea of schemaless dbs so will be trying to use that this year
molona molona
Have to try that too… I’ve never used a no sql database
nicksh nicksh
btw I just installed sinatra
ServerSt… ServerStorm
Yes I’m still not clear on the support for mongoDB or other NoSQL databases
daz4126 daz4126
@serverStorm yes it supports most of them
srpsco srpsco
@serverStorm mongodb is supported
ServerSt… ServerStorm
great
daz4126 daz4126
@nicksh nice one!
you’ll love it
rkh rkh
@ServerStorm there is a library called MongoMapper and an alternative called Mongoid that give you top MongoDB support with Sinatra
ServerSt… ServerStorm
Thank you rkh :)
daz4126 daz4126
Another thing I really like about Sinatra is that you get to see what is happening more … there’s less magic going on, so you get more control over how your app behaves
HAWK HAWK
I’ll compile all these resources into a post on sitepoint.com along with the transcript, later today
rkh rkh
@ServerStorm MongoMapper also has a similar API to DataMapper, which is used to talk to SQL databases in the book
nicksh nicksh
How do I make it run on port 80?
rkh rkh
-p 80
daz4126 daz4126
ruby main.rb -p 80
ServerSt… ServerStorm
Yes I’m quite familiar with different Database patterns so I’ll look forward to this in the book
molona molona
@daz4126 are you saying that Sinatra is easier to debug?
rkh rkh
probably with a sudo
dorthe dorthe
tx hawk
daz4126 daz4126
@molona not necessarily … that depends on your code!
nicksh nicksh
@rkh still runs on 4567
daz4126 daz4126
But you just have more of an idea how everything in your app fits together, so if you want to change something then you know how it works
HAWK HAWK
Welcome @guido2004 and @richybailey – feel free to jump in at any time
Our experts are @daz4126 and @rkh
daz4126 daz4126
@richybailey hi mate!
nicksh nicksh
btw I love the start and stop messages of Sinatra
View / Edit paste

== Sinatra has ended his set (crowd applauds)
daz4126 daz4126
@nicksh have you seen the page missing and error pages yet?
rkh rkh
@nicksh strange, works for me
nicksh nicksh
No
guido200… guido2004
Hi all
HAWK HAWK
@nicksh That’s hilarious!
nicksh nicksh
Haha awesome
molona molona
@guido2004
hi
srpsco srpsco
@Daz4126 I saw in the book that you used a url like ‘what/time/is/it/in/:number/hours’ would you do this in production where many of the intermediate URLs would not exist?
guido200… guido2004
hi molona :)
molona molona
welcome to the Sinatra world :p
ServerSt… ServerStorm
@guido2004
Hi
nicksh nicksh
@daz4126 the error page is amazing :D
guido200… guido2004
hi serverstorm
daz4126 daz4126
@srpsco probably not (unless I linked to it directly) that was just to demonstrate named params
@nicksh it’s great isn’t it … you can make your own really easy though
ServerSt… ServerStorm
Yes sing me a song guido2004, Sinatra here :0
srpsco srpsco
@daz4126 thanks just wanted to clarify
daz4126 daz4126
@nicksh not_found { “That page is missing” }
nicksh nicksh
wow nice
daz4126 daz4126
That’s how you do your own custom missing pages
nicksh nicksh
Oh I forgot to set port to 80
watjen watjen
How would I run a Sinatra app on a server running Apache?
rkh rkh
@watjen with passenger (aka mod_ruby)
which would basically work much like mod_php
ServerSt… ServerStorm
How does NGINX support Sinatra?
rkh rkh
ah, modrails is the name
srpsco srpsco
@watjen you can also setup a proxy to forward to the sinatra port
molona molona
I was thinking the same question @serverStorm
richybai… richybailey
Hi daz. Hi all. I’m an intruder cos I use .net but as daz has been trying to convert me I thought I’d see what the community think of Sinatra compared to the alternatives.
watjen watjen
cool
nicksh nicksh
Btw how do I pass arguments/parameters?
daz4126 daz4126
@nicksh to what?
nicksh nicksh
I mean access stuff from URL
ServerSt… ServerStorm
I use C#, Node.js, PHP
daz4126 daz4126
@nicksh for the url ‘/hello/:name’
rkh rkh
@nicksh: that’s what you use params for
daz4126 daz4126
You can access the part of the url that says :name using params[:name]
nicksh nicksh
thanks
daz4126 daz4126
That’s called a named parameter
nicksh nicksh
oh
HAWK HAWK
Welcome @headmin and @sebastien
daz4126 daz4126
So you could do
get ‘/hello/:name’ do
rkh rkh
btw, for all non-native speakers (like me), the official sinatra documentation has been translated into 10 different languages besides english
daz4126 daz4126
“hello #{params[:name]}”
end
nicksh nicksh
@daz4126 thanks
daz4126 daz4126
@nicksh np
ServerSt… ServerStorm
@molona one option for NGINX is Phusion Passenger http://www.modrails.com/documentation/Users%20guide%20Nginx.html
daz4126 daz4126
@richybailey Sinatra is simpler than most other alternatives and lets you take a more hands on approach to building the app
molona molona
Cool. It is good to see that the documentation is in Spanish too… after all it is the best language in the world (at least for me, because that’s what I speak best :p)
headmin headmin
a bit just late today and read the sinatra jumpstart sample besides lurking here…
rkh rkh
unfortunately @daz4126 book is in English only
ServerSt… ServerStorm
Spanish is a beautiful language not the English hodgepog
daz4126 daz4126
@headmin hope you liked it :)
nicksh nicksh
Here’s what I wrote so far
View / Edit paste

require 'sinatra'

set :port, 80

get "/" do
	"Ahoy World!"
end

get "/hello/:name" do
	"Hello, #{params[:name]}"
end

not_found do
	"Yerr port not scoured!"
end
daz4126 daz4126
@rkh you didn’t offer to translate!
molona molona
@serverStorm Tanks :D
daz4126 daz4126
@nicksh nice work!
rkh rkh
@daz4126 I didn’t even translate the readme, other people do that ;)
molona molona
I meant Thanks :D
daz4126 daz4126
@rkh … you’re so lazy ;)
srpsco srpsco
@nick “yerr port …” looks like you are all set for talk like a pirate day
nicksh nicksh
btw if anyone’s interested here’s my GitHub account https://github.com/shvelo maybe I’ll post some Sinatra code soon
daz4126 daz4126
@nicksh would definitely like to see it tweet me when you do @daz4126
HAWK HAWK
We’ve got 15 mins left of the session so if you have any unanswered questions, now would be the time to get them in
nicksh nicksh
@srpsco Yes I am
@daz4126 sure
daz4126 daz4126
@nicksh and @srpsco feel free to translate the book into pirate :)
ServerSt… ServerStorm
Is there a roadmap of the language development yet? If so, how often will the framework be updates?
nicksh nicksh
@daz4126 good idea!
daz4126 daz4126
@richybailey … and you get to use Ruby with Sinatra
ServerSt… ServerStorm
updated
daz4126 daz4126
@serverStorm atm Sinatra just gets incremental updates because it basically does what it needs to do
watjen watjen
Does Sinatra have built-in support for object relational mapping? Or do I need to install something like ActiveRecord?
srpsco srpsco
thanks for that image of Sinatra singing what made that scurvy, peglegged ant think it could move that rubber tree palnt aye maties
rkh rkh
@watjen you need to install something, but that’s really easy
daz4126 daz4126
@watjen no, you need to install whichever ORM you want to use
nicksh nicksh
@daz4126 Can I sell the translation? :D
ServerSt… ServerStorm
Thanks @daz4126
daz4126 daz4126
@nicksh of course … 50% royalties though!
dorthe dorthe
@hawk can you put the best link to where I can install ruby in the sitepoint post with de other material from this session
nicksh nicksh
Got to go now
too late
daz4126 daz4126
@serverStorm If you have a look at the Sinatra codebase you’ll see the closest thing to perfect code I’ve ever seen. It basically does everything it needs to and nothing more.
HAWK HAWK
@dorthe Not quite sure I understand your question. The best link to where you can install Ruby?
ServerSt… ServerStorm
dorthe are you on Linux, Mac or Windows?
dorthe dorthe
yes
HAWK HAWK
Before you go @nicksh
daz4126 daz4126
Great to hear from you @nicksh, hopefully catch you on Twitter
dorthe dorthe
windows
HAWK HAWK
I think your effort today has definitely earned you a free copy of Darren’s book (if you don’t already have it)?
nicksh nicksh
oh and btw my twitter handle is @shvelo96
no I don’t
srpsco srpsco
@Daz4126 do you have any guidance on when to use a gem vs rack middle ware and riolling your own
nicksh nicksh
wow thanks
ServerSt… ServerStorm
Thanks @nicksh
daz4126 daz4126
@serverStorm …. and most updates to Sinatra are basically bug fixes or to implement something new (like PATCH requests)
nicksh nicksh
You’re all welcome, see ya
rkh rkh
@srpsco rack middleware is what the code is, gem is how you install it. most rack middleware is a gem.
daz4126 daz4126
@nicksh see ya
ServerSt… ServerStorm
Ok @daz4126
Thanks
dorthe dorthe
thanks
HAWK HAWK
Are there any questions that people don’t have sufficient answers to?
molona molona
i do think that I will have some serious reading during this weekend :)
daz4126 daz4126
@srpsco I always like rolling my own (lots of fun and learning) … but for production you’re usually safer using an already existing gem
let me know how you get on @molona
dorthe dorthe
@molona – me too
daz4126 daz4126
same @dorthe
ServerSt… ServerStorm
I’m all out so I’m bidding ado. Thanks to @rkh and @daz4126
ServerSt… ServerStorm
and @mibsrpsco
HAWK HAWK
See ya Steve.
daz4126 daz4126
@serverStorm thanks for all the questions, will catch you on Twitter
molona molona
@daz4126 sure… I’m truly looking forward to this. Never tried Rube and I guess this is a good excuse to start
ServerSt… ServerStorm
Yes you will, I’m going to look into Sinatra in greater detail and will get started with your book, thanks!
dorthe dorthe
it was a pleasure to join this session
ServerSt… ServerStorm
Bye
daz4126 daz4126
@molona it’s great fun and Sinatra will make it easy for you to get started building apps quickly
@serverStorm byeee!
watjen watjen
I think I’ll have to give Sinatra a try!
daz4126 daz4126
@dorthe pleasure to have you here!
daz4126 daz4126
@watjen you definitely should!
daz4126 daz4126
if anybody thinks of any questions, then post them to the forum and I’ll try to answer them http://www.sitepoint.com/forums/showthread.php?960208-New-Book-Jump-Start-Sinatra&p=5299210
watjen watjen
Is it hard to port a rails app to Sinatra?
daz4126 daz4126
@george was the answer about the stocks api okay for you?
srpsco srpsco
@daz4126 thankjs for your time and the myway series of posts was a big help when I was learning Sinatra (about the same time as you were writing the posts.
daz4126 daz4126
@srpsco wow, great to hear that
rkh rkh
@watjen depends on the app, but generally not, we did that
daz4126 daz4126
I’m hoping to get I Did It My Way back online soon!
watjen watjen
nice
rkh rkh
since both use rack and ruby a lot of the parts are really similar
HAWK HAWK
Last call for questions before I cut our experts loose…
molona molona
@daz4126 In a day like this, it would be more “strangers in the night”… it is night time around these areas and after all most of us have never met :p
daz4126 daz4126
@molona … oh dear …. :o
rkh rkh
“The best revenge is massive success.”
molona molona
I’m heading off to bed too. It has been great. Thank you for answering my questions (here and in the forum). I do appreciate your time (yours too @rkh)
@rkh LOL
rkh rkh
whatever the revenge is for, but it’s a nice Sinatra quote
dorthe dorthe
@molona a good one. I’m watching denmark plaing handball in spain :-)
daz4126 daz4126
@rkh great quote, not heard it before
rkh rkh
@molona sure thing
daz4126 daz4126
@dorthe I’ve never quite got what handball is all about!
@rkh need to try and get that quote on the website or in the codebase somewhere ;)
HAWK HAWK
Well, that’s a wrap my friends. I’d like to say a huge thanks to Darren and Konstantin for their time.
daz4126 daz4126
no problem, it was loads of fun!
HAWK HAWK
Feel free to stick around here as long as you like and chat, but there will be no moderation (for what that’s worth).
daz4126 daz4126
I’ll be around for a bit while I wait for some food to cook :)
rkh rkh
I’ll need to leave soon, late dinner for me.
HAWK HAWK
Excellent. I have to run as I have nagging kids giving me grief, but I’ll see you round cyberspace.
daz4126 daz4126
@rkh you’ve earned it :D
HAWK HAWK
I’ll post the transcript up later today.
daz4126 daz4126
@HAWK np, catch you soon
dorthe dorthe
@hawk see u
rkh rkh
@daz4126 thanks… but you wrote the book :D
daz4126 daz4126
@rkh with lots of help … and you maintain Sinatra!

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

No Reader comments

Comments on this post are closed.