• Home

  • Custom Ecommerce
  • Application Development
  • Database Consulting
  • Cloud Hosting
  • Systems Integration
  • Legacy Business Systems
  • Security & Compliance
  • GIS

  • Expertise

  • About Us
  • Our Team
  • Clients
  • Blog
  • Careers

  • VisionPort

  • Contact
  • Dealing with Rails Application Complexity — A Report from MWRC

    Mike Farmer

    By Mike Farmer
    March 23, 2012

    One of the major themes coming out of the 2012 Mountain West Ruby Conference (MWRC) was the rising complexity of Ruby applications, in particular with Rails. The focus of many of the talks was directed at the pain many of us are feeling with our bloated Rails models. When I first started developing with Rails back in 2007, much of the focus was moving the application logic from the view to the controller. Then, a few years ago, the “thin controller, fat model” mantra had us all moving our code from the controller to the model. While each of these steps were an improvement, Rails developers are now dealing with what is affectionately referred to as a “stinking pile of poo” in our models.

    Having seen my share of fat models of late, this topic really grabbed my interest. I started thinking about this problem a couple of months ago while working on a rather large Rails application. Thanks to some good folks in the #urug (Utah Ruby Users Group) channel on Freenode I was pointed to the article Rails is Not Your Application which got me thinking about better ways to handle unmaintainable and unapproachable models in Rails. I was happy to see that I’m not the only one thinking about …


    conference ruby rails

    Three Things: Startups, Rails news, jQuery index

    Steph Skardal

    By Steph Skardal
    March 23, 2012

    I recently had a conversation with Jon about End Point blogging, microblogging, and tweeting. Many of us End Pointer’s have tips and tools that we encounter regularly that aren’t worthy of an entire blog post, but are worthy of sharing. Here’s my first attempt at sharing smaller bits of info – stay tuned to see how it works out.

    1. Paul Graham’s Ambitious Startup

    Here is an interesting recent article by Paul Graham entitled Frighteningly Ambitious Startup Ideas. It’s great. Read it.

    2. Rails Vulnerability Hack

    If you aren’t up to speed on things going on in the Rails world, check out this recent commit. A GitHub user was able to exploit Rails’ mass-assignment vulnerability to commit to the Rails core. Check out a few more related links at A Fresh Cup’s post on the incident.

    3. jQuery’s index method

    I recently came across the index method in jQuery, and wanted to share an example of its use.

    I’m using jQuery UI’s accordion on four categories (Period, Genre, Theme, Nationality) that have a set of options. A user can click any of the options to filter products, e.g. clicking on Folk Songs in the screenshot to the right would bring up products that have a Genre of Folk Songs. On the …


    jquery rails tips

    MWRC Highlights Part 1 of 2

    Brian Gadoury

    By Brian Gadoury
    March 22, 2012

    I attended the 2012 Mountain West Ruby Conference in Salt Lake City last week. There were a lot of cool topics presented at this conference, but I’ve been suffering serious analysis paralysis trying to pick one topic to focus on here. So, I’m taking the easy way out. I’m going to run through some of the projects and tools mentioned during the conference that I flagged in my notes to check out further.

    Sidekiq, a multi-threaded drop-in replacement for Resque

    • Sidekiq requires much less RAM to do the same amount of work as the single-threaded Resque, while providing a very similar API to Resque. It’s been designed to behave like Resque as much as possible and as such, would be a very easy transition for anyone that’s used Resque before.
    • By Mike Perham
    • Get it at: mperham.github.com/sidekiq
    • Recommended by: Tony Arcieri

    Book: Growing Object-Oriented Software Guided by Tests (aka GOOS)

    • The “GOOS book” was recommended by a number of speakers at the conference. One downside (for me) is that the Auction Sniper app developed in the book is done in Java. However, there are now ports of that code available in Ruby, Scala, C# and Groovy. Check out the book’s website. The table of contents is …

    conference ruby rails

    Puppet custom facts and Ruby plugins to set a homedir

    Greg Sabino Mullane

    By Greg Sabino Mullane
    March 21, 2012

    Photo of Swedish Chef by A. M. Kuchling

    Puppet is an indispensable tool for system admins, but it can be tricky at times to make it work the way you need it to. One such problem one of our clients had recently was that they needed to track a file inside a user’s home directory via Puppet (a common event). However, for various reasons the user’s home directory was not the same on all the servers! As Puppet uses hard-coded paths to track files, this required the use of a custom Puppet “fact” and a helper Ruby script plugin to solve.

    Normally, you can use Puppet to track a file by simply adding a file resource section to a puppet manifest. For example, we might control such a file inside a manifest named “foobar” by writing the file puppet/modules/foobar/init.pp as so:

    class foobar {
    
      user {
        "postgres":
          ensure     => present,
          managehome => true;
      }
    
      file {
        "/home/postgres/.psqlrc":
          ensure      => present,
          owner       => postgres,
          group       => postgres,
          mode        => 644,
          source      => [
                          "puppet:///foobar/$pg_environment/psqlrc", …

    automation ruby sysadmin

    Liquid Galaxy in GSoC 2012!

    Benjamin Goldstein

    By Benjamin Goldstein
    March 20, 2012

    Once again The Liquid Galaxy Project has been accepted for the Google Summer of Code! Google Summer of Code is a tremendous program that provides an excellent opportunity for talented undergraduate and graduate students to work developing Open Source software guided by a mentor. Students receive $5000 stipends for successfully completing their summer projects. Last year The Liquid Galaxy Project had three GSoC slots for students. This year we are hoping for at least this number of slots again. I know it is not the point, but did I mention that participation in the program is a very nice credit for students to have on their resumes? ;-)

    Right now we are in the “would-be student participants discuss application ideas with mentoring organizations” phase of the program. Interested students should contact the project’s mentors and admins by emailing lg-gsoc@endpoint.com or by jumping into the #liquid-galaxy Freenode IRC channel. Applicants are well advised to take advantage of the opportunity to consult with project mentors in developing their applications. Student applications are being accepted until April 6 and should be emailed to lg-gsoc@endpoint.com.

    The Liquid Galaxy GSoC 2012 …


    visionport open-source

    Firebug in Action: CSS Changes

    Steph Skardal

    By Steph Skardal
    March 19, 2012

    When I work with clients, I encourage them to use tools to improve efficiency for web development. Sometimes my clients want styling (CSS) adjustments like font-size, padding, or orientation changes, but they aren’t sure what they want before they’ve seen it applied to real content. I recommend embracing a tool such as Firebug for examining temporary on-page CSS edits. Here’s a quick video that demonstrates Firebug in action as I try out a few adjustments to End Point’s home page.

    Some of the changes I test out in the video include:

    • Font-color changes
    • Deleting DOM elements
    • Padding, margin adjustments
    • Background color changes

    Firebug offers a lot more functionality but the video covers interactive CSS changes only. Read more about Firebug’s features here. Chrome has similar functionality with the Developer Tools included in the core software. There are similar tools in the other browsers, but I develop in Chrome or Firefox and I’m not familiar with them.


    css tips tools

    Check JSON responses with Nagios

    Brian Buchalter

    By Brian Buchalter
    March 18, 2012

    As the developer’s love affair with JSON continues to grow, the need to monitor successful JSON output does as well. I wanted a Nagios plugin which would do a few things:

    • Confirm the content-type of the response header was “application/json”
    • Decode the response to verify it is parsable JSON
    • Optionally, verify the JSON response against a data file

    Verify content of JSON response

    For the most part, Perl’s LWP::UserAgent class makes short work of the first requirement. Using $response->header(“content-type”) the plugin is able to check the content-type easily. Next up, we use the JSON module’s decode function to see if we can successfully decode $response->content.

    Optionally, we can give the plugin an absolute path to a file which contains a Perl hash which can be iterated through in attempt to find corresponding key/value pairs in the decoded JSON response. For each key/value in the hash it doesn’t find in the JSON response, it will append the expected and actual results to the output string, exiting with a critical status. Currently there’s no way to check a key/value does not appear in the response, but feel free to make a pull request on check_json on my …


    hosting monitoring

    A Cache Expiration Strategy in RailsAdmin

    Steph Skardal

    By Steph Skardal
    March 16, 2012

    I’ve been blogging about RailsAdmin a lot lately. You might think that I think it’s the best thing since sliced bread. It’s a great configurable administrative interface compatible with Ruby on Rails 3. It provides a configurable architecture for CRUD (create, update, delete, view) management of resources with many additional user-friendly features like search, pagination, and a flexible navigation. It integrates nicely with CanCan, an authorization library. RailsAdmin also allows you to introduce custom actions such as import, and approving items.

    Whenever you are working with a gem that introduces admin functionality (RailsAdmin, ActiveAdmin, etc.), the controllers that provide resource management do not live in your code base. In Rails, typically you will see cache expirations in the controller that provides the CRUD functionality. For example, in the code below, a PagesController will specify caching and sweeping of the page which expires when a page is updated or destroyed:

    class PagesController < AdminController
      caches_action :index, :show
      cache_sweeper :page_sweeper, :only => [ :update, :destroy ]
    
      ...
    end

    While working with RailsAdmin, I’ve come up with a …


    rails
    Previous page • Page 151 of 223 • Next page