Packing bits for a trip takes at least as much time as packing atoms.
Punch - The latest offering for building brochure sites, this one using Mustache templates with JSON.
Hosted NoSQL - A rundown of some of the available commercial offerings.
Two New AWS Getting Started Guides - One each for Linux and Windows showing how the load balancing and scaling pieces fit together.
Fubar - New error-tracking and logging service taking beta signups now.
…community does a lot to discourage putting logic inside views and I think it goes well. We could go with Mustache or other logic-less templating systems, but it's assuming that we can't trust programmers. Welcome back to Java? BTW, stop hating Java ;)
MVC is the problem
First of all, Rails is not MVC . Second, the Rails MVC ( Model2) is fine for monolithic apps that are (yay!) going to the past. The future is in viewless, API-based backends with …
…Browser add-in sort of like Readability for Firefox and Chrome, with integration back to your Evernote account.
Graylog2 0.9.6-beta - Lots of new stuff in this log collection tool this time around.
Hogan.js - A compiler for the Mustache templating language, from Twitter.
Tools of the Trade - A collection of links and bookmarklets for designers.
…default view class is created but if you need more control over what variables are available in the Mustache template you can extend it. # in app/views/greetings/greeting.rb
module Greetings class Greeting < Poirot::View def time Time.now end end end
The greeting mustache template would now also have access to the current time.
Conclusion
Using HTML5 pushState in combination with re-useable templates can provide a good starting point for more degradable and accessible …
…I had about my vision for the ideal simple blog generator. I'm happy with the result. It uses Mustache for its templating language, and I'm a little torn about that decision. Mustache is impressive, but the inability to send arguments along with template tags is frustrating, as well as the expectation that your template files will have .mustache as their suffix. (I know you can change the latter, but it's not as clean as I'd like it.) Still, Mustache is cool and I'm …
…chapters covering broad topics like strings, character encoding, IO, files, and objects in general. Notably, the book is heavily focused on syntax rather than instruction.
The book's source files are hosted on GitHub if you want to get involved. The build process involves Mustache, Nokogiri, Pygments, OptiPNG and YUI Compressor, so it's not for the light of heart.
The first extension to Mustache is "extended paths". In Mustache, paths are always relative to the current context (which can change with iteration), and are always a single key. For instance, the url path from the above example references the url key in the current post that Mustache is iterating over.
Extended paths allow you to go deeper into the Object ( byline/name ) or up the hierarchy ( ../title ). This doesn't diverge from the core Mustache philosophy of avoiding …
…Solving this problem would probably let us implement syntax highlighting and other similar concepts in Mustache, too.
Here's what we got: Higher Order Sections.
Some expensive stuff.
How? If the value of cache_by_user_id is a lambda or function, Mustache will pass the unrendered block of text to it. The block can then do whatever it wants and its return value replaces the block.
Here's how we might do caching in Ruby:
class MyView < Mustache def cache_by_user_id lambda …
If you're upgrading from Mustache 0.7.0 or lower please note that the settings have changed very slightly. This diff is an example of one app I upgraded to Sinatra 1.0 + Mustache 0.9 -- pretty painless, and the settings all have better names (finally).
Anyway, Mustache 0.9.0 works great with Sinatra 1.0 and even provides some big improvements:
Caching
The first time a Mustache template is rendered it is compiled into pure Ruby and cached, even if there's …
Sammy.Mustache Provides support for the Mustache templating framework, thanks to Mustache.js
Sammy.JSON is a simple wrapper around json2.js
Sammy.NestedParams : Adds full [tested!] support for Rails/Rack style nested params to Sammy form handling. (Even though this was part of the 0.3.1 release, I never mentioned it here)
Thanks
Thanks to everyone who helped with this release through testing, ideas, or putting Sammy in production and telling me what's wrong …