Block Metadata Type System

Modified: 2008/01/27 22:39 by Andy Sterland - Categorized as: Blocks
JavaScipt is a weakly typed language and has little need for types like you would see in languages such as C# or Java. This gives the programmer a great deal of flexibility, but it also makes it harder to infer the intended structure of any given variable. As Popfly wants to help the users to create mashups easily, it needs to know about the structure of a given variable and information about its intended use. For example, a block might return URLs that are links to images; in JavaScript these URLs would be strings. Popfly doesn’t need to know that they’re URLs, but that the URLs point to images. This way Popfly can recommend that the user mash the block with an image display block. Attached in this kit is an XML Schema Definition (XSD) of the type system which contains all the valid types. A list is included below along with a brief description.

Edit

Allowed Types

NameDescription
titleA short string that describes the object - should not contain HTML
urlAny URL that doesn’t fit one of the other URL types
colorA hex value color such as #FF0000
imageUrlA URL pointing to a full sized image
feedUrlA URL pointing to an RSS/ATOM feed
descriptionA description of the object - can contain HTML of any length
latitudeA latitude value in decimal format
longitudeA longitude value in decimal format
thumbnailUrlA URL pointing to a thumbnail image
locationA string that represents an address
customA custom object that needs to be declared in the manifest file of that block
videoUrlA URL pointing to a video file - should not be a flash video, but rather the actual video that could be played in any viewer
ipAddressAn IP address
nameThe name of something - should be short and not contain HTML
firstNameThe first (given) name of a person
lastNameThe last (family) name of a person
emailAddressAn email address
phoneNumberA phone number - should include country code
cityThe name of a city
stateThe name of a state, US only
countryOrRegionThe name of a country or region
zipCodeThe ZIP code of a location, US only
ISBNAn International Standard Book Number (ISBN)
UPCAn Universal Product Code (barcode) number
stockSymbolA stock ticker symbol

Privacy. Terms of Use. Trademarks.
ScrewTurn Wiki version 2.0.22. Some of the icons created by FamFamFam.