Snippely!

March 15th, 2008, posted by Tom

With the initial release of Adobe AIR, a lot of web developers (myself included) are starting to get excited about developing rich web applications that run natively on the desktop across platforms. We've already seen several great AIR apps popping up all over the Internet, and thought we'd try our hand at creating one of our own.

Snippely was created by myself, Tom Occhino, and Valerio Proietti as our first attempt at creating a robust and useful AIR application.

 

What can we do with MooTools and a little bit of fresh AIR?

When we were thinking about what type of application to make our AIR playground, we tried to think of something that we'd want to use ourselves. Valerio and I are notorious for storing countless bits of code in all sorts of different languages all over our hard drives, and thought it would be nice if we had a central place to store and organize those bits of code. We came up with the idea of 'snippets', and an application called Snippely.

Snippely was born...

Snippely is a basic text and code organizational tool. Instead of storing bits of code, quick notes, and memos in text files all over your hard drive, this application will let you save and organize "snippets" in one convenient location. A snippet is a collection of one or more pieces of code and notes. Snippets are stored in groups for organization and quick retrieval.

A snippet is composed of a title, description, and one or more 'snips'. You can add any number of note and code snips in a variety of different languages (more to be added). When not being edited, the snip will be syntax highlighted according to the language selected. Snips are also sortable so you can organize your snippet however you want. Since everything is saved to a local database as you work, there's no need to worry about pressing the save button or submitting a form.

Usage is pretty self explanatory, but I may post a screencast within the next day or two to get everyone familiar with how to use the app.

Initial release

Snippely is an open source project released under an MIT Style license. It is hosted on Google Code so feel free to browse through and play with the source code. If you'd like to contribute to Snippely, contact either myself or Valerio (preferably in the IRC channel).

While we do plan on adding more to the app, we wanted to get the first version out there so we could see what everyone thinks. It's been developed and tested mostly on OS X, but since AIR is inherently cross platform, it works perfectly on Windows as well.

Download

Note that the Adobe AIR runtime must be installed to run Snippely.

36 Responses to “Snippely!”

  1. Louis Says:

    The Snippely.air link seems to be broken :/

  2. Sorry Louis, should be fixed now.

  3. Louis Says:

    Yeah, thank you Tom, It works.

  4. This just encouraged me to start trying AIR. I'm sure it will be stunning, I can't say cause it's still downloading, soon soon aargh.

    You got it guys.

  5. I just installed AIR simply to test Snippely, and I'm sorry to say but it doesn't run on my computer (OS X 10.5 Leopard). It launches, then crashes before displaying anything.

  6. Milos Dakic Says:

    Kevin I had the same problem, but once I started the app again it worked fine. :) Cool little thing to have!

  7. MK Owens Says:

    It is working great for me, and I would really really love a way to export and import "snippets" from other people around the web. This little app is a GREAT way to organize all of your code libraries and prewritten scripts and such.

  8. James Says:

    Works for me too. What a great little app! Many thanks. Love the flexibility of AIR too.

  9. Mike Says:

    App is very well written - well done! Browsing the source code is very interesting for all mootools lover. If you plan to add more to the app, you should add a command that export content of a group in a static HTML file (to backup and/or share).

  10. Alex Says:

    Hi,

    This application is so awsome, that I've added some synchronization support using home made server in PHP.

    Install it from here: http://snippely.andoservice.ro/dld/SnippelySync.air

    This air file links to http://snippely.andoservice.ro/server/, but you can change that to your own server in the snippyly.sync.js.

    Download the sources: http://snippely.andoservice.ro/dld/SnippelySync.zip

    The zip also contains the PHP sources. The snips are all public, but you can run your own server and change the token and switch to HTTPS.

  11. Alex Says:

    I've forget. To synchronize use the menu on the second button from the lower-left bar (just click the minus button).

  12. Quentin Says:

    Pretty nice, although looking quite empty at first launch! The logo kinda looks like my own AIR app: http://toki-woki.net/p/WebKut/

  13. RD Says:

    Great works guys, this is really what a developer need for! I wrote an article on Edit about Snippely and its features. As i said, it would be great a "tagging" function for organizing and sorting snippets. For example, you can save MooTools snippets under the "MooTools" tag.

  14. Chris Pitt Says:

    Very nice! Bit of a late starter as far as other frameworks/libraries are concerned, but great non-the-less. Would be nice to see some more articles on mixing AIR and the Moo - I've been trying AIR with MooTools, but so much dependance on JSON/Eval makes things tough...

  15. John Farrar Says:

    OK... will this tool be just for MooTools or will you extend it to support different libraries of Snippets?

  16. Valerio Says:

    @John Farrar: Try reading the article maybe? :P

  17. Jeffrey Says:

    I like the simplicity of it. And thanks for sharing the source - what a great AIR learning tool! May I make a few feature suggestions for Snippely?

    • A "Copy All" contextual menu to copy a whole code snippet to the clipboard.
    • An option to specify a code snip storage location - say across the network. Also have file locking to allow for multiple developers to share a common Snippely-base. Is WebDAV a possibility here!?
  18. Valerio Says:

    @Chris Pitt:

    Bit of a late starter as far as other frameworks/libraries are concerned

    Huh?

    I've been trying AIR with MooTools, but so much dependance on JSON/Eval makes things tough...

    Try reading through the Adobe AIR documentation, and understand what a security sandbox is. AIR has no problems with evaluated JSON. You can also see it because we do use JSON in this application, and there are no problems at all.

  19. Rob Says:

    Nice little app! How tough is it to add additional languages and color coding schemes? In particular ActionScript (with var typing) would be nice. Thanks.

  20. Chris Pitt Says:

    @Valerio

    'huh?' - just meant it's been given a bit higher priority with the other guys like jQuery and Ext, that's all. I mean you guys are busy pushing for 1.2 which will blow the competition away, so it's not surprising that AIR should take a bit of a back seat.

    'AIR docs and sandbox...' - Again - meant no offence, and I have developed an air application using the sandbox; but what I was getting at is that perhaps somebodies (myself included) could contribute towards some plugins that assist the evaluation of xml (over JSON) and make other short(er) paths to using AIR without heavy usage of the sandbox.

    The application is very cool (something I'm sure I didn't stress enough), but from reading the docs and developing in AIR, I get the impression that if the application deals more in xml and, in particular, extends Adobe's base runtime js then the application will cause less of a headache to develop. :)

  21. Valerio Says:

    just meant it's been given a bit higher priority with the other guys like jQuery and Ext, that's all.

    I think its not true, a blatant, shameless, arrogant lie. But thats just my opinion, like this is yours. Your perceived priority we have given to AIR is probably lower than the actual one. Again this is your opinion, but by exposing it here as a fact you're showing your lack of knowledge and respect.

    I mean you guys are busy pushing for 1.2 which will blow the competition away, so it's not surprising that AIR should take a bit of a back seat.

    Perhaps its not surprising because, well, its simply not true. "Out of the blue" sentences like these are not globally appreciated, especially when not backed up by facts, you shouldn't be surprised of a slightly unfriendly reaction on my part.

    and I have developed an air application using the sandbox; but what I was getting at is that perhaps somebodies (myself included) could contribute towards some plugins that assist the evaluation of xml (over JSON) and make other short(er) paths to using AIR without heavy usage of the sandbox.

    After this, I think your general understanding of AIR is appreciably low. Consider reading more through the AIR documentation before continuing to expose your incomprehension as deceitful and misleading facts in this blog. No offense taken, and none intended, but its not appreciated.

  22. Chris Pitt Says:

    Wow. I certainly didn't mean to stir that up or be exposed as a knowledge lacking, appreciably low understanding, developer. My sincerest apologies - my intentions were the best. I don't think I'll be commenting [ever] again; since I certinaly don't appreciate the abuse. Once again, sorry for any misconstrued intentions on my part.

  23. Hey Chris,

    Actually the other devs and I have been reading about and tinkering with AIR for quite some time now. While we hadn't started developing with it until fairly recently, we are certainly no strangers to the runtime or the possibilities which it introduces. I must say, I myself was a little confused (and offended?) by your first post, because we have given quite a high priority to AIR. We certainly see the potential of the runtime just as clearly as the any of the other great frameworks out there.

    Anyway, we hope you enjoy Snippely, and use the source code as an example of the way the other MooTools developers and I like to code.

  24. Chris Pitt Says:

    I took a good long look and the quality of code is excellent. I must say - I meant no offense by the first post. Although the blog may not be a true reflection of what's actually going on there, I'm sure it's nothing new to you. I simply meant that it was the first sight of an AIR application being released from you guys and that it is 'but great non-the-less'.

    I have nowhere near the level of understanding of Mootools as you have and nowhere near the level of understanding of AIR as I would like to, but I was merely speaking from my own experiances developing in AIR and the troubles I faced, not least of which was trying to do an Ajax call with MooTools in AIR and then serializing the json string into an object. It was a mission for me, but as I can see there are ways and means of doing it that I hadn't thought of.

    No worries.

  25. Chris Pitt Says:

    ...and it was wrong of me to assume what your priorities were. :)

  26. Wow. It's amazing I'm using mac. First time I open snippely I taught I'm using a mac software what an amazing layout you have. It's a great adaptation of mac's crome. I think you should use it on some web applications like ExtJs. I can't believe nobody is talking about this. Great job. I'm so impressed. By the way I'm really using snippely. I know it's the first version but there are some missing features & bugs:

    • There is no HTML highlighting.
    • Highlight script miss highlights the strings in "double quotes"
    • It's really hard to add snippets there should be a button at the top of the page.
    • File attachment would be really useful (Air can upload files by drag&drop You should use that)
    • Adding an image maybe a screenshot like notes.
    • Sub groups would be better such as PHP -> DBscripts -> snippet
    • Browsing snippets with keyboard would be awesome.
    • When I first add a snippet or a note it should automatically select the text ("Some Content") for me to overwrite it. I had to delete it first It's annoying.
    • Drag&Drop group ordering would be nice but not necessary.

    Thanks for such a good product please keep developing it.

  27. Noodles Says:

    Great app,been busy all weekend getting all my bits of code together in it. Thanks Guys....

  28. Marcus André Says:

    Wow, that´s a really great app. It is very usefull and it works very well. But is there a file which includes the snippets or a "extract tool" to take/sync my snippets from work to home?!

    Thank you Guys, well done.

  29. I think that's what Alex (http://blog.mootools.net/2008/3/15/snippely#comment-442) was saying. Install that Syncing app & modify some values to link it to a server exposed some place, and you can now have the same snippets available at home & work! That is really the thing making snippely worthwhile.

  30. Beautiful app! Thanks for making it available.

    "Since everything is saved to a local database as you work....."

    I know that the db is located somewhere here (on OSX):

    ~/Library/Preferences/com.snippely.6E4C758165F11BBEC90F106AA88CF53EB51547B1.1/Local Store/application.db

    but a nice feature for a future release would be exporting and importing the db.

    Thanks again.

  31. Great App guys! Already making great use out of it!

    Thanks!

  32. RD Says:

    84 snippets recorded into 4 days isn't enough to confirm that this tool is extremely useful :) ? (Have Snippely a max number of snippets i can record? I don't want to make it explode :) )

    RD

  33. (v) Says:

    usefull apps! go forth

  34. Andrew Says:

    It's not actually "Native"...

  35. Levi Says:

    love the app! thanks! it could use some tweaking and a couple extra features, but nice job.

  36. Great tool guys..Excellent interface and easy to use. I work in an environment where loads of scripts need to be run..this tool was a relief..Thanks :) One more..is it possible to have a minimized view of my code..like I could see only the first two lines but when clicked on the snippet then it would expand?..I think this would great to scroll down my snippets.

    You guys are awesome :)

Sorry, comments are closed for this article.