10 ms·
Sinatra 2.0 released
- slackoverflower 10y agoAnywhere to find the major changes for 2.0?
- sb8244 10y agoThere is a changelog at https://github.com/sinatra/sinatra/blob/v2.0.0/CHANGELOG.md https://github.com/sinatra/sinatra/blob/v2.0.0/CHANGELOG.md but I don't see any obvious breaking changes? Edit: some of the security based refactoring and ENV settings might be breaking?
- chucke 10y agoThe URL matching engine, mustermann, breaks a few things, and it's now a separate component. Also, it's now supporting rack 2, which required some changes.
- damagednoob 10y agoI think it's the deprecating of Ruby versions that is breaking: https://github.com/sinatra/sinatra/commit/af18cf588a2fed68edd17e00e30169b4aa5a056c#diff-354f30a63fb0907d4ad57269548329e3 https://github.com/sinatra/sinatra/commit/af18cf588a2fed68ed...
- eropple 10y agoChangelog (because I had to go digging for myself): https://github.com/sinatra/sinatra/blob/v2.0.0/CHANGELOG.md#200--2017-04-10 https://github.com/sinatra/sinatra/blob/v2.0.0/CHANGELOG.md#...
- giancarlostoro 10y agoI never got much into Ruby but everytime I played with it Sinatra is my absolute favorite gem. Although now that I do Python I use CherryPy a lot, which is somewhat similar (though others would pick Flask as a similar framework for Python) glad to see it's still around. Of course this was also the inspiration for NancyFX for .NET which is another one for C# that tries to be similar as well. I'll always enjoy Sinatra as one of the few Ruby projects I've ever played with.
- cyberferret 10y agoWhen Ruby on Rails first hit the ground, I thought that I would try and learn it and get to grips with it. But even with 20+ years of programming background to my name at the time, I really couldn't feel comfortable using it, as much as I wanted to learn Ruby and a corresponding framework. Then I tried playing with Sinatra, and completely fell in love with it. Made perfect sense to me, and seemed to fit my thinking and my concept of a web project a lot better. Now I exclusively build my web apps using it. Well, actually I use Pardrino [0], which is the framework built upon Sinatra. I wonder how soon they will have the Sinatra 2.0 core working with Padrino?!? [1] - http://www.padrinorb.com http://www.padrinorb.com
- jaequery 10y agopadrino definitely is a hidden gem amongst the mists of all the frameworks
- da02 10y agoWhat public websites have you made with it? What other gems do you like? (eg Sequel?)
- cyberferret 10y agoA couple that are still going strong are LogbookHQ (www.logbookhq.com) and our flagship product, HR Partner - http://www.hrpartner.io http://www.hrpartner.io HR Partner is over 30,000 lines of Ruby/HAML code now, and nearing 100 tables. All work to date has been carried out by a single programmer (myself). We started out with Datamapper as our ORM, but since that is a dead project now, we've transitioned all our new projects to Sequel, which once again, I found far more intuitive and approachable than ActiveRecord. We use a stack of existing gems, even rails specific one, however there are quite a few that are now framework agnostic, or designed specifically for Sinatra. For example, we use padrino-warden (a Warden gem tailored for padrino) for all user authentication etc.
- base 10y agoYou can use Padrino with Sinatra 2.0 without any problem. I'm doing it currently since Sinatra 2.0 was in beta.
- grandalf 10y agoThe relevant timeline for Sinatra is as follows: - Rails 1.0 is released, popularizing Ruby - Rails 2.0 is released, deprecating patterns that were best practices in 1.0 and advocating REST patterns. - Sinatra is born, distilling the ideas behind REST into an extremely simple and performant microframework. - Sinatra has been copied/emulated in nearly every programming language, and its clones have also been widely successful. - Rails went on to release subsequent versions, each of which advocated doing a near rewrite of working code and obsoleted/broke many of the libraries in the ecosystem. - Meanwhile, Sinatra has remained very stable and its design has continued to inspire new clones. See Floor, Scotty, Opium, Express, Flask, etc. Bravo to the Sinatra team for building and maintaining a useful product.
- pvinis 10y agoWow, I had no idea Sinatra came before Express! TIL
- BukhariH 10y agoNot only did it come before Express but Express was directly inspired by it. IIRC back when Express first came out it actually said "Sinatra inspired web framework" as its description.
- tlrobinson 10y agoSinatra came before Node.js even existed.
- matt4077 10y ago> - Rails went on to release subsequent versions, each of which advocated doing a near rewrite of working code and obsoleted/broke many of the libraries in the ecosystem. That's simply wrong. I've maintained a moderately-sized Rails app since 3.x, and updating never took more than an hour or so, even for the major version changes. It's also deeply unfair to the Rails team. Your timeline should include, as the first entry: - Rails 1.0 is released, showing the web development community how to structure a project, delivering us from XML, and banishing config.backup.inc.php3 from our nightmares. Rails came about in a world of SQL embedded in html, or (almost worse) the idiotic idea of "templating languages" that were poorly designed re-implementations of php ("but this time it's just for templates!"). Testing meant clicking through your application, and javascript was exclusively used for replacing the deprecated <marquee>.
- dmerrick 10y agoGrats to the Sinatra team! Sinatra is one of my all-time favorite libraries. To me, it is the ideal microframework for rapidly prototyping websites and APIs
- pampa 10y agoAfter using Sinatra for many years, i switched to Roda http://roda.jeremyevans.net/ http://roda.jeremyevans.net/ as my goto web framework. Hello world in Roda doesn't look as neat as in Sinatra, but bigger apps come out cleaner and better structured with it.
- xs 10y agoDoes Jekyll still use Sinatra? If so, does this mean anything cool for Jekyll?
- dermybaby 10y agoLooks like its just plain Ruby --> https://jekyllrb.com/docs/home/ https://jekyllrb.com/docs/home/ "Jekyll is a simple, blog-aware, static site generator. It takes a template directory containing raw text files in various formats, runs it through a converter (like Markdown) and our Liquid renderer, and spits out a complete, ready-to-publish static website suitable for serving with your favorite web server."
- kgilpin 10y agoThat's true but in development mode the site is served dynamically. That said, it doesn't use Sinatra there either. It uses WEBrick which is in the Ruby standard library. https://github.com/jekyll/jekyll/blob/master/Gemfile https://github.com/jekyll/jekyll/blob/master/Gemfile https://github.com/jekyll/jekyll/blob/master/lib/jekyll/commands/serve.rb https://github.com/jekyll/jekyll/blob/master/lib/jekyll/comm...
- stanislavb 10y agoNote: it's been almost a month since v2 has been released
- benlovell 10y agoRubygems states the gem was cut on 7th May - this being the common definition of 'released' in the Ruby world.
- bdcravens 10y agoYou're think of the first RC; final 2.0 was released yesterday https://github.com/sinatra/sinatra/commits/master/lib/sinatra/version.rb https://github.com/sinatra/sinatra/commits/master/lib/sinatr...
- matthewrudy 10y agoI've been running on the 2.0.0 branch since Christmas, and then the RC gem releases, but 2.0.0 was only just released.
- dejv 10y agoSinatra is awesome, but it has some limits. I've written http://notationtraining.com http://notationtraining.com using it and been running this application for 7 or so years. It was great when it was just two screens with a few lines of javascript, but when you keep adding functionality the code gets messy very quickly and you basically start to build some kind of meta framework on top of that DSL. 7 years in development and about million uniq users later I still like it. It just do the job, there is very few things that could go wrong and it is fast.
- pmontra 10y ago> you basically start to build some kind of meta framework on top of that DSL. Exactly. That's why I almost always start with Rails. There are very little projects with a tiny numer of urls. Furthermore I get some scaffolded code for free and the integration with an ORM, a test framework, templating, db migrations. I started with Sinatra sometimes and switched to Rails after I realized that I was adding most of the components and structures of a Rails application. It was not worth doing it by hand instead of using a proven tool.
- lacampbell 10y agoSinatra is what finally made me "get" web applications. A few years back I considered web programming a confusing, scary place, but figured it was my future. I had tried out rails but I was overwhelmed with it all. I had done PHP at university and sort of understood it, but didn't like it. But Sinatra was such a nice abstraction over HTTP, and it came naturally to me. We need more libraries like this. Straightforward, to the point, based around an effective abstraction. It lets you implement the other bells and whistles how you want - or lets you not implement them at all. Really can't say enough good things about this library, but it's numerous clones probably speak for themselves.
- frou_dh 10y agoWriting a handful of #! scripts and serving them out of a CGI directory is another good way to "get" what a dynamic webapp and HTTP are about.
- lacampbell 10y agoBy the time webdev was even on my radar, the only things I "knew" about CGI was that it was old and bad. Or something.
- frou_dh 10y agoIt strikes me as Unix scripting writ large. * Each page of your site could be a script written in a different language if you wanted. * Environment variables (and optionally stdin) arrive to your script representing the request. * Your script writes the response (HTTP headers and page content) to stdout then exits. Security/perf pitfalls aside, I still think it's a nice model. It really emphasises the statelessness of HTTP since a pristine new process is booted up to handle each request.
- mperham 10y agoMy business is built on CGI scripts for processing automated webhooks. There's several non-trivial benefits: 1. Nothing running 24/7. No services to monitor, very light on memory. 2. Immune to memory leaks and bloat. Guaranteed fresh state on every request. It's not ideal for user-facing functionality but has proven extremely reliable and maint-free. My goal was to use something that would require no recurring maintenance, unlike all modern web tech. All that is running 24/7 is Apache.
- bsharitt 10y agoI've always liked Sinatra(though I mostly use its Python equivalent, Flask, these days). It's so simple and straight to the point.