Home > Articles > Home & Office Computing > The Web/Virtual Worlds/Social Networking

This chapter is from the book

This chapter is from the book

2.1 Exploring the Samples

Let’s start with the zembly Samples section, which lists applications (Facebook and OpenSocial), widgets (blue badge), and services (orange badge). To see zembly’s samples, select samples from the top dashboard, as shown in Figure 2.2.

Figure 2.2

Figure 2.2 The zembly samples help you get started

The sample Facebook applications include CapitalPunishment, which is presented in Chapter 6 (see “Capital Punishment—A Challenging Facebook Application” on page 162). The sample services run on the zembly server and generally call other services out on the web to do things. Right now1 the sample services include

  • AmazonProductSearch—lets you search Amazon’s product catalogs and retrieve detailed product information, including prices, images, etc.
  • FlickrPhotoSearchService—calls the flickr picture search service.
  • GoogleGeocodeSampleService—enables you to search a ZIP code for a given address.
  • HelloWorld—takes your name and says hello.
  • WeatherTodayService—retrieves weather for a specific U.S. zip code.
  • YahooTripSearchService—enables your applications to use a Yahoo! API to search for public trip plans that were created with Yahoo!.
  • YouTubeSampleService—lists information about videos that have a specified tag.
  • ZillowSampleService—finds a property given an address. The returned information includes the address for the property or properties, the Zillow Property ID (ZPID), the current Zestimate, the date the Zestimate was computed, a valuation range, and the Zestimate ranking for the property within its ZIP code.
  • zventsSearchService—search for events that are happening around a given U.S. location.

The Sample section also includes a list of widgets. Widgets provide a user-friendly object that you can embed in a web page. All of the above services have corresponding widgets. To view a widget’s page, click its name in the Samples section. For example, if you select HelloWorldWidget, zembly takes you to its page so you can see how it was built. To view its source, select the View tab as shown in Figure 2.3.

Figure 2.3

Figure 2.3 Exploring the HelloWorldWidget development page

Further down the page zembly shows you how to embed the widget in a page by providing the code you can select, copy, and paste. Figure 2.4 shows the code window to embed widget HelloWorldWidget (Share This Widget).

Figure 2.4

Figure 2.4 Embedding (sharing) a widget

For example, you can create a web page and call the HelloWorldWidget using the following code:

<iframe
   src="https://dde7e989aa2a4122aef8a6e53f29e9fb.zembly.com/things/
   dde7e989aa2a4122aef8a6e53f29e9fb;iframe" frameborder="0">
</iframe>

You can then open this file in your web browser, which calls the HelloWorldWidget. This widget displays a box and provides an input field to supply a name. A call is made to the HelloWorld service to display the name provided by the user, as shown in Figure 2.5.

Figure 2.5

Figure 2.5 Embedding and running the HelloWorldWidget in a web page

Using Clone

You can clone any application, widget, or service on zembly. This means that you create a copy for yourself. Once you clone a thing on zembly, you own it and you can then modify it. zembly encourages you to clone artifacts that you like; it is both a great learning tool and more importantly, you can build something innovative based on the work someone else has already done. This makes zembly users more productive. To clone a widget, select Clone this widget on its development page, as shown in Figure 2.6.

Figure 2.6

Figure 2.6 Cloning a widget increases its score

Furthermore, when you clone something on zembly, the score of the original widget (or service or application) increases to reflect the cloning. Scores also change when people rate zembly “Things” or favorite them.

Widget Actions

Widgets (this applies to services and applications as well) list actions on their page. Besides cloning, you can add a widget to your list of favorites, report a widget, or watch a widget. When you mark something as a favorite, you have an easily accessible “bookmark” as shown in Figure 2.7.

Figure 2.7

Figure 2.7 Your Favorites give you a convenient bookmark

When you watch something, zembly lets you know when its owner publishes a new version.

Tags on zembly

Use zembly tags to label your widgets, services, and applications to help others find Things through the zembly search mechanism, as shown in Figure 2.8.

Figure 2.8

Figure 2.8 Tags let you find widgets, services, and applications through searching

AmazonProductSearchWidget—Widget Preview

Let’s explore the AmazonProductSearchWidget. From the Samples page, select AmazonProductSearchWidget. zembly takes you to this widget’s page. You’ll see a box area with the instructions Click here to preview this widget. When you click the box, the widget runs in a preview window. You can increase the size of the preview window by selecting the corner (or edges) and dragging until the preview window is the size you want, as shown in Figure 2.9.

Figure 2.9

Figure 2.9 Previewing a widget and adjusting the preview window size

Provide product search index and keywords and click Search. Figure 2.10 shows the result after searching for keyword “zembly” in search index “Books.”

Figure 2.10

Figure 2.10 Previewing the AmazonProductSearchWidget

Widget code includes (X)HTML (for rendering), CSS (for styling), and JavaScript for program logic and calls to external services. When you make a service call, results typically come back in XML or JSON format. Exactly what the data represents depends on the service and the format it uses. For example, with XML you may see results that are RSS 2.0, or ATOM. As it turns out, the Amazon service that AmazonProductSearchWidget calls returns data in XML format. The external web service will specify how to interpret the data that is returned.

You are encouraged to look at the XHTML, CSS, and JavaScript code for this widget (click View as shown in Figure 2.3 on page 14). This chapter will delve into building widgets soon, but first let’s show you how to use this widget in a web page.

Embedding AmazonProductSearchWidget

The AmazonProductSearchWidget has sharing enabled. This means you can export the widget to many popular web sites and pages by simply selecting the logo that corresponds to the target site. zembly has partnered with Clearspring to provide sharing and tracking of your widgets (see www.clearspring.com). We show you how to enable sharing in Chapter 3 (see “Sharing Your Widget” on page 66). However, let’s first show you how to embed a widget in a web page.

Since sharing is enabled for AmazonProductSearchWidget, select Embed from the list of options as shown in Figure 2.11. The share window now displays option Other Sites. Select Other Sites and you’ll see the window with the JavaScript code you need to invoke the widget from an arbitrary HTML page.

Figure 2.11

Figure 2.11 Embedding AmazonProductSearchWidget in a web page

Cut and paste this code into the HTML editor of your choice and open it in your browser. You can add other rendering code as shown in Listing 2.1. Here is the source for the HTML file used to run this widget in a browser.

Listing 2.1. AmazonProductSearchWidget HTML file

<h2 style='margin-left:10px; margin-bottom: 0px'>Let's search Amazon!</h2>
<script type="text/javascript"
src="https://widgets.clearspring.com/o/49249714e57f0b59/4924d27e70974fe2/
4924971425b85ee0/cafd08e6/widget.js">
</script>

After creating the HTML file, open it in your browser. Enter a product search index and one or more keywords, then click Search. Figure 2.12 shows the browser output.

Figure 2.12

Figure 2.12 AmazonProductSearchWidget running in a browser

Sharing Your Widgets with Clearspring

Besides embedding widgets in pages, you can also share widgets by adding them to any number of popular sites, such as your iGoogle Home page (see www.google.com/ig). You don’t have to be the widget’s owner. Click Post from the list of options and then select iGoogle from the option icons in the grid (see Figure 2.11). Now click Open in the Add to your iGoogle page display, as shown in Figure 2.13

Figure 2.13

Figure 2.13 Adding AmazonProductSearchWidget to your iGoogle home page

After clicking Open, you’ll be redirected to Google and asked to confirm. Click the big blue Add to Google button, as shown in Figure 2.14. You will now see your iGoogle home paged updated with the widget inside.

Figure 2.14

Figure 2.14 Adding AmazonProductSearchWidget to your iGoogle home page

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020