• 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
  • Our Blog

    Ongoing observations by End Point Dev people

    Web Development for HeARTs Speak

    Steph Skardal

    By Steph Skardal
    April 4, 2012

    Many of my colleagues know that I’m fairly involved in animal rescue as a photographer and more recently as a foster. I recently became involved in HeARTs Speak, a non-profit, volunteer-driven organization that brings together artists (photographers and more) who volunteer at animal rescue organizations.


    Frank the Foster

    I worked with them to help launch a new website with a design from Enso Blue, which brings us to the point of the article. Given a choice of many platforms and tools, what tools did I use in development of a new site with the only restriction being how much time I was able to put into development and maintenance? Here’s a quick rundown the tools I used for the new website.

    Ruby on Rails: Here at End Point, we develop many applications in Ruby and Ruby on Rails. It’s a platform that encourages decent code organization and efficient development. Another option that came up was PHP with WordPress. However, since the website required a custom application and voting process for joining members, I concluded that WordPress would be a bit of a hassle with this level of customization (though I’m personally a big fan of WordPress and its community). …


    performance rails tips tools

    Three Things: frame box, Kiss Metrics, DUMP_VHOSTS

    Steph Skardal

    By Steph Skardal
    March 30, 2012

    Here’s my latest installment of sharing content that doesn’t necessarily merit entire blog posts, but I still want to write it down somewhere so I’ll remember!

    1. Kiss Metrics on Design and Conversion

    First up is an article sent over by Jon. This is a great article from The Kiss Metrics Blog. Several of us at End Point have been a part of redesigning the End Point website and this is an interesting article that discusses how design decisions affect conversion, and how it’s important to justify design decisions with metrics and testing.

    2. Apache DUMP_VHOSTS

    Next up is a quick system admin command line that I came across while troubleshooting something with Richard:

    apache2ctl -t -D DUMP_VHOSTS
    

    We have a team of hosting experts here at End Point, and I am not often involved in that aspect of the web application deployment. But I was recently trying to figure out why the default Apache site was being served when a recent domain had been updated to point to my IP address. I worked with Richard on a screen session and he pointed out how the above command was helpful in examining how all the virtual hosts are handled by Apache. We identified that the default host was being served for an …


    tips

    CanCan and RailsAdmin in Ecommerce

    Steph Skardal

    By Steph Skardal
    March 28, 2012

    I’ve written about Rails Admin a lot lately. One thing I haven’t written about is how it can leverage CanCan for user authorization. Once a user is authenticated via Devise, CanCan adds an additional layer for you to control how users can access and interact with data from the admin.

    A Simple Example

    CanCan requires that you create an Ability class where all user permissions are defined. A very basic example in RailsAdmin ecommerce context might look like this:

    class Ability
      include CanCan::Ability
      if user && user.is_admin?
        can :access, :rails_admin
        can :dashboard
        can :manage, [User,
                      Product,
                      Order]
      end
    end
    

    Note that in the above code, a user that is admin (where is_admin? returns a truthy reponse) has access to RailsAdmin, and the admin user can manage (create, read, update, destroy) all users, products, and orders.

    Multi-Merchant Solution

    Let’s go a little deeper. Multi-merchant solutions are a frequent request in ecommerce. Let’s say we have the following over-simplified data model, where users own and manage products and products are displayed by category:

    The Ability class might look like:

    class Ability
      include …

    ecommerce rails

    Debugging Celery Tasks in Django Projects

    Greg Davidson

    By Greg Davidson
    March 27, 2012

    I recently had the opportunity to work on a Django project that was using Celery with RabbitMQ to handle long-running server-side processing tasks. Some of the tasks took several hours to complete. The tasks had originally been executed with the at command and others had been managed with cron jobs. The client had started to migrate several of the tasks to use Celery when I joined the project.

    As I started to debug the Celery tasks, I quickly discovered there were many moving parts involved and it was not immediately clear which piece of the system was the cause of the problem. I was working in a local development environment that closely matched the production system. The dev environment consisted of a virtualenv created using the same method Szymon Guz wrote about in his article Django and virtualenvwrapper. Django, Celery and their related dependencies were installed with pip and I installed RabbitMQ with Homebrew. After activating my virtualenv and starting up everything up (or so I thought), I jumped in to an IPython shell and began to debug the tasks interactively. Some tasks completed successfully but they finished almost instantaneously which didn’t seem right. The client …


    django

    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
    Previous page • Page 147 of 219 • Next page