Navigation

Home
Search
Submit A Resource
Contact Us
About Functionn

Subscription Options


Subscribe By Email (265+)


Lists


Archives

Jun 20, 2012

Author: Hirvesh Posted At: 6/20/2012 Tags: , , , , ,

Envelope.js - A Simple, Event Driven jQuery Plugin For In-App Messaging Which Works With UI Frameworks

Share:
Envelope.js is a simple, event driven jQuery plugin for in app messaging designed to work with or without popular UI frameworks.  You can use Envelope.js along with popular UI frameworks like Twitter Bootstrap
and jQuery UI to generate events such as 'sucess', 'error', etc.

One issue with using callbacks to show user alerts is that they are not very reuseable. Using an evented approach allows you to decouple the action of showing a message to your users with the function or callback that generates it.

Have you ever written code that looks like the one below?  If so, you quickly find out that you are writing a lot of display code in your callbacks, that its hard to reuse this code, and its hard to maintain this code.


Not only is this hard to maintain, but is difficult to reuse.  Using envelope, your callbacks become much more elegant.  Envelope allows you create messages that listen for events and display a message when that event is triggered.  Envelope decouples this by making the above code look like:


To skip all this nonsense and see it in action Here's a fiddle for you to play with:



Envelope.js still has some more features to be implemented, see the todo list on its Github page.  It's released under the MIT License, you can contribute too.


Requirements: jQuery
Demohttp://bittersweetryan.github.com/envelope.js/
License: MIT License

Daily Posts, Be Updated, Subscribe:

Want Free Web Resources? Enter Your Email And We'll Send It To You - Daily! (265+ Subscribers)

Yup, it's that straight forward! Enter your email address below and we'll send you the latest web resources to your inbox, everyday. We don't do spam. Ever.

Trending Posts On Functionn This Week

Share:

Other Interesting Resources:

0 comments:

Post a Comment

 


Recent Posts

Popular Categories



Popular Components



Popular Licenses