Introducing Sammy: The tiny but swingin’ JavaScript Framework

After a couple months of off-hours hacking, I present to you Sammy. Sammy is an easy to use JavaScript framework that allows you to build simple front end applications using ‘routes’ and ‘events’. It’s also very tiny. Using the YUI Compression its only 7Kb.

Get Started

The Story

About three months ago, when I was knee deep in hacking and playing with Sinatra I had this weird moment as I woke up one morning: “What if I could build Sinatra in JavaScript?” At that point it was just a challenge – I had just started doing almost full-time JS for a client and it seemed like a fun project.

As I started to actually implement it (slowly in short spurts on the weekends), I realized that using the power of JavaScript’s closures and jQuery’s powerful event system, this could be something more then just a ‘clone’. It could actually be . . . useful!

With that in mind, I set out to actually make is usable. I cleaned up the code, I wrote some example implementations, and most importantly – I documented the shit out of it.

I’m pretty excited about it (can’t you tell?) especially about its possible uses for structuring applications on the front-end for RESTful Databases and services. Embed it in a CouchApp to build an entire application in JavaScript while having access to a full range of documents/querying abilities.

The Future

I’m going to continue refining and adding examples. Please feel free to email me or contact me through github with questions/feedback.

Happy Friday!

8 Responses to “Introducing Sammy: The tiny but swingin’ JavaScript Framework”

Great work! I can’t wait to try it out.

tisba Says: #

This is a freakin’ awesome shit! Although I currently don’t have a project which could use your stuff, but I like your idea very much. I see much potential in being able to NOT break browser’s back/forward-functionality.

Mihael Konjević Says: #

I really like the idea. Sinatra is definitely my favorite ruby framework, and it is refreshing to see similar concepts on client side.

Jim Says: #

I really like your idea. I just did something similar to a project at work, moving huge amounts of back end GUI functionality from Java to client-side javascript and REST calls.

But I’ve never used Sinatra (or Ruby, for what it’s worth), so it took me a little while to get past your references to it. Do you think you could try not to use Sinatra so much when explaining this to others? This framework of yours deserves attention outside the Ruby community, too.

AQ Says: #

Hey Jim

Thanks for your feedback. I think you’re right and I’ll try to improve the docs/etc to reflect that it really is pure Javascript and maybe give more background on some of the terminology, etc.
–AQ

Very impressive- I’m going through your part I and part II tutorials and I’m just blown away.

Hope to see more!

Thanks for providing this

I loved writing UI back in the days of Swing, MFC and VB but have been unwilling move to web UI for many years because it is such a dire messy environment. Sammy is a brilliant bit of design and a huge leap forward. I’m now ready for UI again and have missed all the years of .NET JEE blah blah blah pain – thanks for your great contribution to the world, keep it coming!

[…] you want to learn more about Sammy, check out Aaron’s blog post which has a nice introduction and screencast. This entry was posted in Web Development by […]

About

QuirkeyBlog is Aaron Quint's perspective on the ongoing adventure of Code, Life, Work and the Web.

twitter/@aq.

instagram/@quirkey.

github/quirkey.

QuirkeyBlog is proudly powered by WordPress

Categories