#Padrino

  • Upgrading a Padrino app to 0.15.2

    I’m a big fan of Padrino . It’s always filled this “more than Sinatra, no Rails bulk” gap for me while still being batteries included. Friendly community. Easy to understand and use. Most importantly, it’s helped me get apps built. Fast. And have them run well and without issue in production.

    Code Reuse

    Case in point: A scientific app for a conservation NGO, chugging away happily without bugs or major issues for almost a decade ago (with a big upgrade 5 years ago) and despite traffic and time.

  • Supercharging Padrino admin with Datatables, will_paginate, and RABL

    One of the best things about Padrino is the drop-in admin generator (inspired by Django’s) that makes building simple, robust apps that need to work, run, and be admin-ed by real people a pleasure to work with. At some point though, the natural limits of the default generator will need to be extended as you return huge numbers of records. This is one battle-tested approach we used to be able to paginate and search across 7000+ records via ajax and DataTables setup with will_paginate when the default Padrino admin hit its limits.

  • Easy Excel exports from Padrino

    At some point in the lifecycle of any useful application you write, there will be a request to get something out of your system in Excel format. Here’s an easy, transparent method to get downloadable Excel reports out of your Padrino app.

    Spreadsheets are still king in most organizations and Excel is still the main tool business users and decision makers comfortably interact with, often for for end user reporting, data consolidation, or intermediary analysis purpose.

  • Securing Padrino apps with https and ssl on Heroku

    Let’s Encrypt has done an amazing job of making https the new normal for web sites and helping create a more secure and private internet by giving away free, automatic ssl certificates to domain owners.

    You should be encrypting your web traffic (and need to, to take advantage of new protocols like http/2. Some implementations have stated they will only support http/2 over an encrypted connection. And currently, no browser supports http/2 unencrypted afaik.). Add to this the fact Google will start penalizing non-secured sites in search results, and https is fast becoming the de facto standard.

  • Padrino with Foreman and Puma on Heroku

    Padrino works great on heroku with just a simple git push heroku master, but you can get a surprising bump in performance simply from using Puma in production rather than the default heroku web server.

    That also goes for using it on your local development machine, but heroku uses Procfile based spinning up of apps, so you should also test locally on your dev box, using heroku’s handy foreman before pushing it live to heroku.

  • Adding indexes with Padrino migrations

    I really like the Padrino web framework. Its simplicity and layer of just enough above Sinatra appeals to me over the burgeoning complexity of Rails of late.

    As my applications have become more complex though, the lack of documentation and good examples have become an increasing issue. I’m intending to write a few blog posts on common, yet more complex things, you need to do in Padrino to use it as a Rails replacement. Hopefully it can increase uptake and help other people with issues to solve some common gaps.