If you need to update a number of documents in MongoDB, such as calculating simple statistics, in-place updates and MapReduce are available. There is a third option, eval(), allowing the execution of arbitrary code server-side.
Whether using unit tests or rspec, you may find some support missing for testing your MongoDB-based application such as clearing the collections before test and waiting for updates to finish before proceeding. With a little Ruby both are easily supported.
Here’s a simple way to submit a remote AJAX form in Rails 3 rendering a partial into a specific DIV on the page without marshaling content into JSON or creating the DOM manually.
I recently stepped back and took a look at the Rails stack to see what’s available for someone approaching it for the first time. Especially with the proliferation of projects on github, the Rails ecosystem has really exploded. In some areas it now faces much the same problem as the Java world in having too many options. Here’s what I found from virtual machines to UI testing.
Looking for hosting of your personal projects or WordPress site(s) but don’t want to pay the price for specialized services or shared servers that limit your access? Here’s how to run your own server on the cheap including a CDN (Content Distribution Network), specifically for one or more WordPress blogs.
One of the customizations I made to the Thematic framework for this theme was bubbles next to any post that had comments displaying the number of comments. And, just because I could and to keep the page weight down, I made the bubbles in CSS. The result is shown above and here’s the code behind it.
Based on my experience making a child theme on the Thematic Wordpress theme framework, here’s some examples of extending the framework from adding dynamic CSS classes to entire new sections of content.
In creating this blog I did a lot of research on options for theming in WordPress including the best theme frameworks. Here are those that look the best and why I finally chose to go with Thematic.
Fluid grids and responsive design are great techniques for improving user experience at differing screen sizes and devices. With a little CSS magic and an extension, Thematic can easily support this over the fixed-width layouts it ships with.
One of my goals when creating the theme for this blog was to not only end up with a nice theme but also learn something new and exhibit some best practices. After looking over many paid and free wordpress theme frameworks (as well as creating themes from scratch) I finally decided on using Thematic (and I’m glad I did). Not leaving good enough alone, I threw in some Sass (including the Compass framework) and responsive design for a nicer user experience and wider device support.