Building Social Applications using “zembly”
Sang Shin, Technology Architect Sun Microsystems, Inc. javapassion.com
1
Topics
• Social networking phenomenon • Impact of social networking to software
development
• What is “zembly”? • Things you can build/publish using “zembly” • Building service step by step • Building widget step by step • Building Facebook application step by step • Summary and current status
2
Social Networking Phenomenon
3
Social Networking Phenomenon
• Social networking is rapidly growing with more
than 70 million users
Friendster, ...
> Facebook, MySpace, orkut, LinkedIn, Meebo,
• Primary means of mass communication among
13-30 years
4
Social Networking Phenomenon
"We're just at the beginning of understanding how the social graph will change every web application... what is emerging is the identity and social subsystem of the future internet operating system." —Tim O'Reilly, O'Reilly Media, Inc.
5
–
Impact of Social Networking to Software Development
6
Why Do You Care (as Developers)?
• Social networking offers developers
unprecedented opportunities to build social applications that can reach millions of users overnight
7
Emerging Changes in the Software World
• Participation model to the software development
is changing
> “Traditional models involving mostly software
developers” to “new models that involve everyone”
• Different metrics are emerging for determining
value of an application
> “Size and features” to “How much usage it gets”
• The social platforms have emerged as viable
development and deployment platform
the popular social platforms
> Applications are being developed and deployed over
8
Why Social Platforms as Application Development/Deployment Platforms?
• Provides application development and deployment
right on the web
> Removes the complexity of deployment process
• Exposes facilities (e.g. APIs) to make writing
applications easier
> Provides higher level of abstraction in application
model – profile, friends, rating system, etc.
• Builds an Eco-system of applications, developers,
and users
> Applications deployed are becoming the part of the
Eco-system, thus enhancing the value of the platform
9
Where is the Future Application Growth?
10
Where is the Future Application Growth?
• Non-traditional apps > Widgets, Social apps, iPhone apps, Mashups, Situational apps • Characteristics of these apps > Usually small > Developed by casual developers > Quick to build, easy to deploy • What lit the fuse? > Polarization of social platforms: Facebook, MySpace, Ning, Meebo, Orkut, etc.
11
–
What is “zembly”?
12
What is “zembly”?
• “zembly” is the place to create social
applications, together
> “zembly” allows users to easily create and host social
applications of all shapes and sizes, targeting the most popular social platforms on the web
• Think of “zembly” like Wikipedia for social
applications
> a wiki for live, editable code that is more than just
about trivial widgets, but rather about full-fledged social applications that can tap into the social graph and reach millions of users.
13
“zembly” Provides Browser-based development
• IDE-based editor
running in the browser
• (X)HTML, CSS,
JavaScript, FBML support
• Dynamic API
search & invocation
• 1-click publishing
onto the web
• Automatic hosting
14
“zembly” Enables Social Programming
• Collaborative
creation of social applications of artifacts
• Fine-grained reuse • News feed • Contacts • Custom profile
page
• Messaging • User ratings • Favorites • Comments
15
Your “zembly” Development Environment
Demo:
You can this demo yourself! http://www.javapassion.com/handsonlabs/zembly_basics/#Exercise_1
16
●
What things can you build/publish using “zembly”?
17
Things You Can Create with “zembly”?
• Widgets • Services • Facebook apps • Meebo apps • iPhone apps • OpenSocial apps • orkut apps • MySpace apps
18
–
Building a Service Step by Step
19
What is a Service?
• Contains
business logic
• Written in
JavaScript so that others can call it
> “zembly” creates
• Can be published
a deployable web service and deploys it in it own container
• Can take
parameters
20
Steps for Creating a Service
• Write business logic in JavaScript > Using IDE-like JavaScript editor: code completion, syntax checking, format, code snippet, change history • Set up parameters • Find and use other services • Handle error conditions > You can use built-in validation • Test the service • Publish the service > Version control
21
Demo:
1. Exploring services built by others 2. Building a HelloWorld service 3. Building Loan Payment service
You can this demo yourself! http://www.javapassion.com/handsonlabs/zembly_basics/#Exercise_2
22
Demo: Building Loan Payment Service
• Write business logic in JavaScript > Calculates one's monthly mortgage payment based on principal, interest rate, and length of loan (years) • Set up parameters > principal, interest, and years - required and Number type • Test the service • Publish the service • Use the service
23
–
Building a Widget Step By Step
24
What is a Widget?
• Widgets provide a user friendly object that you
can embed in a web page
• Made of > (X)HTML > CSS > JavaScript
25
Steps for Creating a Widget
• Write (X)HTML • Write CSS • Write business logic in JavaScript > Find and use other services • Optionally add images
26
Demo:
1. Exploring widgets built by others 2. Building Loan Payment Widget
You can this demo yourself! http://www.javapassion.com/handsonlabs/zembly_basics/#Exercise_3
27
●
Building A Facebook Application
28
Creating Facebook App. through zembly
29
Why Build Facebook Apps using “zembly”?
• “zembly” provides simple and consistent
programming and deployment model
• Community of developers who can easily discover
and leverage one another's work
• Rock solid hosting that is free up to a point and
grows with you -- always on & can handle large loads checking, change history, format (for each publishing)
30
• IDE-level features such as code completion, syntax • Change history (during editing) and Version control
Steps for Creating a Facebook application
• Create application on facebook.com > Live facebook.com wizard page gets displayed in an iframe • Follow the wizard to set up Facebook parts of
the application that zembly needs
1. Log in to Facebook account 2. Install Facebook developer application, if needed 3. Create a Facebook application on facebook.com 4. Copy API key and secret
• Manage the application from zembly > Build, publish, change and republish
31
Building Facebook Application by Cloning
You can this demo yourself! http://www.javapassion.com/handsonlabs/zembly_basics/#Exercise_4
Demo:
32
Cloning Facebook Application using zembly
Demo:
33
–
Summary & Current Status
34
Summary
• “zembly” is a Wikipedia of social applications • Using just browser, you can create and publish
services, widgets, Facebook apps, Meebo apps, OpenSocial apps, iPhone apps, Google gadgets, and other social applications
35
Current Status
• You can participate in private beta now > zembly.com • Open beta coming in fall
36
–
Thank You!
Sang Shin sang.shin@sun.com javapassion.com
37