I kept running into situations where I wanted to create a relatively simple web site that had many static pages and a small amount of scripting on each. Previously, I would have to create a separate .js file for each static page, then loading each different .js file from each .html file.
Instead of worrying about all of these different .js files for a small amount of scripting, I created Jellyfish. This way, I can write a single .js file that controls all of the scripting across the site, partitioned by page (or sets of pages). I can include the single .js file in my layout file and avoid the headache of managing myriad .js files. Isn't that nice?
Jellyfish(function () { this.bloom('/about', function () { this.sting('#header/click', function (evt) { alert("Hi there."); }); }); });
On the page with the URL /about
, find the element matching the
#header
selector and install a click
event
listener.
Registration + Login — With a single dialog, you can access data including a user's real name, email address, profile picture and list of friends. Replace or supplement your user account system with Facebook to help drive signups and improve data quality.
Engagement — With Facebook users comes their friends; incorporate these connections to make your product more engaging. Social plugins like the Like button and the activity feed enable you to offer social experiences with just a line of HTML. The Graph API enables you to integrate the social graph into your site in deep and compelling ways.
Growth — You can publish content from your site into the social graph to reach your users' friends. The Like button enables users to share your site's content back to their Facebook stream with one click. In addition, you can integrate pages deeply into the social graph via the Open Graph protocol.
This guide will walk you through the basics of creating a web application with some of these features. If you aren't sure where to start after reading this guide, check out the Platform showcase for inspiration from other sites.