SmallCommunities and J2: My New Rails Projects

I’m happy to tell you that we recently launched J2, a new version of JHTC.org, and that I’ve spun the core code off into an open source project called SmallCommunities. SmallCommunities is available on GitHub and I would love to see some other folks join in and help me move it forward.

The purpose of SmallCommunities is to provide a self-hosted subset of Meetup.com’s capabilities that allows complete customization of the site’s visual design while avoiding the, er, difficult to control quantity of emails sent by the Meetup service. Also, the current code expects events to be monthly, plus occasional extras, and membership to be paid while Meetup of course does not, though I think this could be easily altered.

The next version of JHTC.org will be an instance of SmallCommunities. If you think SmallCommunities might be of use to your group I’d be happy to work with your web team to get you up and running!

The code is written in Ruby on Rails 3.0.x and uses Devise for authentication, Compass, Haml and Sass for views and styling, RailsAdmin for managing most content and jQuery for active interfaces; SmallCommunities has a modest test base, mainly rSpec.

There are three key open features:

  • A flexible non-event page templating system
  • Photo uploads for events, members and non-event pages
  • Multi-level navigation menu support

While SmallCommunities isn’t a CMS it does need to support some static-ish pages such as About, Memberships and so on. I plan to adapt the sample code from Jose Valim’s excellent new Rails book, Crafting Rails Applications, so that these pages can easily reuse existing components without the person maintaining the site content to know Rails (and not require the site admin to do this work).

J2 is hosted on Heroku. I really like their service and was very happy to see them acquired by Salesforce.com last year because of the added resources and stability, and our site’s traffic is low enough to fit on the free service tier. However one drawback is that Heroku doesn’t allow apps to upload files to the server; instead one must use an alternative such as S3 and those are paid services and for now we hope to avoid hosting costs to the extent possible.

Accordingly any images must be included in the application when deployed to the server and uploaded separately to, say, Picasa (Google Images). I expect there’s a suitable free service, at least for the less that 2GB worth of images we might need, just need to do some research and then loop in the appropriate Ruby gem or jQuery plugin.

There are a number of good multi-level menu solutions available, this isn’t a new requirement by any means, but the first couple I’ve tried ran into issue with some of the existing Sass/Compass CSS and I’ve just not had a need to solve it.

Note: PayPal is the only payment mechanism currently supported, to avoid the need for–and substantial hosting costs of–SSL, though I’m open to patches that add, say, ActiveMerchant, and the database schema is mostly prepared for such a change.

Three Months at Glam

First, I want to thank my friend Joel for making this opportunity possible and for his support over the last decade-plus. He is an awesomely creative developer and if you need consulting you’ll be happy I made this recommendation.

Overall, I am just really happy these days. Being a Rails developer and being at Glam Media are both very rewarding and fulfilling. Over the last decade I’ve done a lot of coding but always as a small part of my responsibilities or for my own edification but I think DHH was right when he put fun as a priority for Rails. Ruby and this framework are strong matches for my mental model; I’ve looked at most of the major programming languages over the course of the last two decades and not since Clipper, way back in the prehistoric (well, pre-Windows) days have I had such a strong fit. I can see how others get the same from, say, Python or Scala–this kind of fit is a combination of emotions, personal experience and context, not science.

Another big positive about Rails for me is the community. The number of people involved who do things to benefit the community is outstanding, and by things I mean writing blog articles and (often free) books, publishing FOSS libraries (so many great ones but a couple of current faves include Compass, Devise and MetaWhere) and tools (rvm, Git), and simply being helpful on IRC, Twitter and other fora (Elad, I’m looking at you).

Glam as a place to work really suits me. The company is big enough–strong products, revenues and market presence–but still operates nimbly and with staff given freedom to for the most part choose how their work gets done. Of course they started off on the right foot with me just by having a fresh MacBook Pro and oversized, arm-mounted monitor waiting for me my first morning. Also, the team I’m on, which builds GlamAdapt Automate, has mostly developers who are stronger than me and willing to share their expertise and a leader who spends most of his time coding (at least for now).

I tend to like organization. Whether we’re talking about code or my desk I’m always more comfortable when its neat, clean and simple. In code this often leads me to writing components or modules and twice now I’ve done that in our app. Last week, for example, I wrote a Rails plugin because the one we had been using was no longer maintained or compatible and I couldn’t find a good replacement on Github. The plugin is not too complex but it enables us to have the options of one select box on a form change in response to changing the value of another and does it without the server roundtrip of an AJAX implementation. Functionally it meets our requirements though there are some enhancements we can see clearly for a next rev.

The key point, though, is that I was allowed to do this. I’ve never even tried to write a Rails plugin before but that was never even a question; I’m simply trusted to deliver the required functionality in the allotted time.

I’ve worked with smart people on products I was proud of before, Kachingle being the most recent example. But I’m truly happy today as a Rails dev at Glam.

Compass/SASS User Meetup at Hacker Dojo, Mountain View, June 29

Nothing fancy but if you’re interested in a powerful, labor-saving Ruby/Ruby on Rails view building and CSS programming tools you should join us Tuesday, June 29, at 7:00 for the first Compass/SASS User Meetup at Hacker Dojo in Mountain View.

SASS maintainer Nathan Weizenbaum will be in town for the week and Compass maintainer Chris Eppstein will also bend space and time to be present.

http://compass-style.org
http://sass-lang.com

RSVP (yeah its free): http://www.eventbrite.com/event/696863337

We hope to have pizza and snacks, so registering will help us know how much to plan on getting.