SitePoint Sponsor

User Tag List

Results 1 to 19 of 19
  1. #1
    Galactic Overlord gold trophysilver trophybronze trophy
    HAWK's Avatar
    Join Date
    Aug 2003
    Location
    New Zealand
    Posts
    12,540
    Mentioned
    956 Post(s)
    Tagged
    14 Thread(s)

    New Book : Jump Start Sinatra

    APPLE, GITHUB, AND THE BBC USE SINATRA. WHY? Sinatra has become the natural choice for building fast and efficient Ruby applications without the weight of Rails. In fact, consider that the entire Sinatra codebase weighs in at less than 2,000 lines—around 1% the size of Rails! And, unlike Rails, you have the freedom to choose the tools you prefer. So, for instance, you can write database-agnostic code complete with Ajax.

    sinatra.jpg

    If you're interested in learning more, then the latest book in our Jump Start series might just be for you. With Jump Start Sinatra by Darren Jones, you could learn everything from setting up to deploying apps. Get information about pricing and content, or grab some sample chapters here.


    You can check out a short video introduction of the book with Darren here.

    Or you can watch a short Getting Started with Sinatra video tutorial with John Barton here.

    Make sure join us for a free Talk Sinatra with the Experts session with Darren (and expert reviewer Konstantin Haase) in a few hours time.

    I invite you to ask any Sinatra questions that you have here - Darren is hanging around and is keen to help you out (or encourage you to get started if Sinatra is new to you). And remember, there is no such thing as a stupid question around this place. And keep your eyes out for some fun Sinatra based quizes and contests that we have in the pipeline.

  2. #2
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,222
    Mentioned
    237 Post(s)
    Tagged
    1 Thread(s)
    I have two questions. I have no clue about Ruby (and of course, even less about Sinatra)

    1) Is it better to set up a test environment in Windows or Linux?

    2) How easy is to integrate Sinatra in existing applications or CMS (let's say an exisiting website in WordPress or Joomla)?

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,176
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Hi Darren! Another complete programming noob here. I did dip my nose into a Ruby book once, but didn't get far. One thing that worried me about the concept of Rails was that it didn't seem all that straightforward to host whatever you build. It didn't seem possible to run a Rails-based site on my current hosting account, for example, while I don't have to think twice about using PHP on most servers.

    What is the situation with Sinatra? I assume something special is needed in this case too? What kind of hosting does one need to organize?

  4. #4
    SitePoint Member daz4126's Avatar
    Join Date
    Jan 2013
    Location
    Manchester
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Molona!



    Quote Originally Posted by molona View Post
    I have two questions. I have no clue about Ruby (and of course, even less about Sinatra)

    1) Is it better to set up a test environment in Windows or Linux?
    I'd probably say Linux, basically because that's what I use! Traditionally it was quite hard setting up Ruby on Windows, but now it's fairly easy I think, so both would probably be fine.

    Quote Originally Posted by molona View Post
    2) How easy is to integrate Sinatra in existing applications or CMS (let's say an exisiting website in WordPress or Joomla)?
    Sinatra would be difficult to integrate with WordPress or Joomla because they're both based on PHP, but it is very easy to integrate into a Ruby on Rails application using Rails Metal (http://weblog.rubyonrails.org/2008/1...g-rails-metal/). It's also not too difficult to produce your own simple CMS using Sinatra, such as Scanty (https://github.com/adamwiggins/scanty)
    .
    Hope that helps,

    DAZ

  5. #5
    SitePoint Member daz4126's Avatar
    Join Date
    Jan 2013
    Location
    Manchester
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Hi Darren! Another complete programming noob here. I did dip my nose into a Ruby book once, but didn't get far. One thing that worried me about the concept of Rails was that it didn't seem all that straightforward to host whatever you build. It didn't seem possible to run a Rails-based site on my current hosting account, for example, while I don't have to think twice about using PHP on most servers.

    What is the situation with Sinatra? I assume something special is needed in this case too? What kind of hosting does one need to organize?
    Hi Ralph,

    You basically need Ruby and the Sinatra gem installed on your server for it to run, so you'd have to check with your current hosts if they provide that (more and more are). In the book I recommend using a platform as a service such as Heroku (http://www.heroku.com/) that allows you to deploy Sinatra applications very easily.Their basic packages are free, so you can use them to experiment with.

    Hope that helps,

    DAZ

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,176
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by daz4126 View Post
    Hope that helps
    It does indeed. Thanks, DAZ! Good luck with the book, too.

  7. #7
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,222
    Mentioned
    237 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by daz4126 View Post
    Hope that helps,DAZ
    it does help, thank you.

    I do wonder about the hosting though. If my server does not have Ruby or Sinatra gem installed, I assume that you can use Heroku' services to deploy business applications and to host the application that can't be hosted in my own server (even if that means to pay their fees). Or would it be easier to contract another web server where Ruby and Sinatra are installed?

  8. #8
    SitePoint Member daz4126's Avatar
    Join Date
    Jan 2013
    Location
    Manchester
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by molona View Post
    it does help, thank you.

    I do wonder about the hosting though. If my server does not have Ruby or Sinatra gem installed, I assume that you can use Heroku' services to deploy business applications and to host the application that can't be hosted in my own server (even if that means to pay their fees). Or would it be easier to contract another web server where Ruby and Sinatra are installed?
    Yes Heroku make it very easy to host as they deal with all the deployment and dependency issues you might run into. They have a free tier as well, so you can try things out first before deploying a big business application (lots of them are run on Heroku and they have a lot of experience of running Ruby apps). My own Cards in the Cloud site is running on Heroku (http://www.cardsinthecloud.com/). This would certainly be my preferred option, but there are also lots of other hosts that would provide you with Ruby and Sinatra hosting such as Engine Yard (https://www.engineyard.com/) or you could even deploy it yourself using Amazon's cloud services.

    Hope that makes things clearer!

    DAZ

  9. #9
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,631
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by molona View Post
    I have two questions. I have no clue about Ruby (and of course, even less about Sinatra)

    1) Is it better to set up a test environment in Windows or Linux?
    The best way to handle rails development is to use vagrant to spin up a VM with appropriate bits. If you really want to run totally locally, something *nix based is easier though you can get there on windows. You'll certainly want to look at RVM to run it properly and allow you to have multiple ruby stacks on the same box.

    2) How easy is to integrate Sinatra in existing applications or CMS (let's say an exisiting website in WordPress or Joomla)?
    Depends on what you are doing. One angle could be building the sinatra app to handle something specific and exposing a RESTful service layer that the WP / Joomla site could consume.

  10. #10
    SitePoint Member daz4126's Avatar
    Join Date
    Jan 2013
    Location
    Manchester
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    The best way to handle rails development is to use vagrant to spin up a VM with appropriate bits. If you really want to run totally locally, something *nix based is easier though you can get there on windows. You'll certainly want to look at RVM to run it properly and allow you to have multiple ruby stacks on the same box.



    Depends on what you are doing. One angle could be building the sinatra app to handle something specific and exposing a RESTful service layer that the WP / Joomla site could consume.
    +1 for using RVM or RBenv for managing your Ruby installation!

    DAZ

  11. #11
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,222
    Mentioned
    237 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by daz4126 View Post
    +1 for using RVM or RBenv for managing your Ruby installation!

    DAZ
    I see that I have lots of learning to do here

  12. #12
    SitePoint Member daz4126's Avatar
    Join Date
    Jan 2013
    Location
    Manchester
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by molona View Post
    I see that I have lots of learning to do here
    It's not too bad ... and all covered in the book!

    DAZ

  13. #13
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,128
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Since I know absolutely nothing about Ruby nor Sinatra, I guess my question is, what expectations are there for someone who is new to Ruby and has never heard of Sinatra in regards to your book?

    Would it be wise for me to pick up a Ruby book first or at least to go side-by-side with Jump Start Sinatra?

  14. #14
    SitePoint Member daz4126's Avatar
    Join Date
    Jan 2013
    Location
    Manchester
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cpradio View Post
    Since I know absolutely nothing about Ruby nor Sinatra, I guess my question is, what expectations are there for someone who is new to Ruby and has never heard of Sinatra in regards to your book?

    Would it be wise for me to pick up a Ruby book first or at least to go side-by-side with Jump Start Sinatra?
    Hi cpradio!

    You should be able to get along fine with the book if you are new to both Sinatra and Ruby, as long as you know a bit about HTML and CSS and have done a little programming before. You'll definitely learn how Sinatra works and hopefully learn a little bit of Ruby. Having said that, things will probably make more sense if you know more Ruby. A great place to start is with this online resource http://pine.fm/LearnToProgram/ as well as the interactive http://tryruby.org/levels/1/challenges/0

    This should be enough to get you started with Ruby and Sinatra ... and after that, the better you get at Ruby the better you'll be at Sinatra.

    Hope that helps,

    DAZ

  15. #15
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,128
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    That does, Thanks. Ruby has been one of those languages that seemingly always sits on my To Do List but never gets past that list *sigh*. I'll get to it someday, maybe sooner now that we are using it a bit at work on some of our teams

  16. #16
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    If you're already familiar with similar "micro frameworks" like Python's bottle or flask, or Perl's Dancer, which are all really based on Sinatra, then I think you kinda know what to expect getting into Sinatra. The bigger difference might be the environment: Ruby, and Rails.

  17. #17
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,128
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    If you're already familiar with similar "micro frameworks" like Python's bottle or flask, or Perl's Dancer, which are all really based on Sinatra, then I think you kinda know what to expect getting into Sinatra. The bigger difference might be the environment: Ruby, and Rails.
    Unfortunately, I never jumped on the Python bandwagon (although I have written some snippets for systems that used a python plugin architecture). As for Perl, I haven't touched that for 7-8 years? Most of my work has been around .NET and the occasional PHP. Ruby has been on my radar for years and I tried getting into it a few years ago, but I just didn't have the free time then. Now I'm finding more free time, I may need to dig up that book and get back at it.

  18. #18
    SitePoint Member
    Join Date
    Mar 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this the right place to ask technical questions about this book? I am working through it and am getting errors in chapter 3. Sinatra is reporting a line that doesn't even exist in my file.

  19. #19
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,128
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Definitely the right site, but I'd probably post any questions in the Ruby & Rails forum so you get the attention from the correct set of experts


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •