{"id":21,"date":"2011-10-10T16:31:00","date_gmt":"2011-10-10T16:31:00","guid":{"rendered":"http:\/\/www.w3.org\/community\/native-web-apps\/?p=21"},"modified":"2011-10-14T08:17:32","modified_gmt":"2011-10-14T08:17:32","slug":"misconception-widgets-reinvent-the-wheel","status":"publish","type":"post","link":"https:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/10\/misconception-widgets-reinvent-the-wheel\/","title":{"rendered":"Misconception: Widgets reinvent the wheel"},"content":{"rendered":"<p>One of the most common <a href=\"http:\/\/groups.google.com\/group\/mozilla.dev.platform\/msg\/53779779c5143c8e?\" target=\"_blank\" rel=\"nofollow\">misconceptions<\/a> about the W3C\u2019s <a href=\"http:\/\/www.w3.org\/TR\/widgets\/\">Widget packaging format<\/a> is that it reinvents (or could simply have used) existing packaging formats: namely, Oracle\u2019s <a href=\"http:\/\/download.oracle.com\/javase\/7\/docs\/technotes\/guides\/jar\/jar.html\" target=\"_blank\" rel=\"nofollow\">Jar format<\/a>, Mozilla\u2019s <a href=\"https:\/\/developer.mozilla.org\/en\/XPI\" target=\"_blank\" rel=\"nofollow\">XPInstall<\/a> (XPI) format, or the <a href=\"http:\/\/www.oasis-open.org\/committees\/tc_home.php?wg_abbrev=office\" target=\"_blank\" rel=\"nofollow\">Open Document Format<\/a>.<\/p>\n<p>The widget packaging specification tried to overcome obvious limitations and complexity in those formats. For instance, the above formats all require special authoring tools (or make use of complex internal file\/folder structures). I say explicitly because the Working Group\u00a0<a href=\"http:\/\/marcosc.com\/2007\/10\/widgets-10-v2\/\" target=\"_blank\" rel=\"nofollow\">looked at all the above formats<\/a>\u00a0when we were specifying the W3C widgets format. After a long hard-look at each, we concluded that none were fit for purpose.<\/p>\n<p>To show why each one would not make a suitable format:<\/p>\n<ul>\n<li><strong>JAR:<\/strong> depends on the META-INF directory and defines files designed to load Java-based applications and libraries. Hence it is specifically designed around the needs of Java and the semantics of various aspects of the packaging format that don\u2019t make sense for Widgets.<\/li>\n<li><strong>ODF:<\/strong> amongst other things, it requires that a special file (\u2018mimetype\u2019) be found at byte position 38, making it extremely difficult to create a package without a special tool.<\/li>\n<li><strong>XPI:<\/strong> format (which itself reinvents JAR) makes use of RDF, which is notoriously difficult for developers to learn, read, write, and maintain. Hence, the working group concluded that XPI would make a lousy widget-packaging format.\u00a0Furthermore, XPIs suffer from versioning issues, which causes them to stop working when Mozilla Firefox is updated.<\/li>\n<\/ul>\n<p>By contrast, and by design, W3C Widgets require no special tools to make a Widget package. The format is designed to take advantage of Zip tools that have come bundled with all operating systems for at least a decade. The format puts very few requirements on authors: the only two being to include a config.xml (which can be almost empty) and a file to start the application (index.html)<a title=\"\" href=\"#_ftn1\">[1]<\/a>. Furthermore, we designed W3C widgets so they were not bound to particular runtimes: in effect, overcoming the issues seen in XPIs and other platform-version-dependent applications.<\/p>\n<p>Other posts in this series:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/11\/misconception-json-is-easier-than-xml\/\">Misconception: JSON is easier than XML<\/a><\/li>\n<li><a href=\"http:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/12\/32\/\">Misconception: XML Digital Signatures is too hard to implement<\/a><\/li>\n<li><a href=\"http:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/13\/misconception-widgets-lack-an-origin\/\">Misconception: Widgets lack an origin<\/a><\/li>\n<li><a href=\"http:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/13\/misconception-widgets-lack-a-security-model\/\">Misconception: Widgets lack a security model<\/a><\/li>\n<\/ul>\n<div>\n<hr align=\"left\" size=\"1\" width=\"33%\" \/>\n<div>\n<p><a title=\"\" href=\"#_ftnref1\">[1]<\/a> Instructions of how to construct a widget are so simple, in fact, that Opera Software once published all the instructions on a business card.<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>One of the most common misconceptions about the W3C\u2019s Widget packaging format is that it reinvents (or could simply have used) existing packaging formats: namely, Oracle\u2019s Jar format, Mozilla\u2019s XPInstall (XPI) format, or the Open Document Format. The widget packaging &hellip; <a href=\"https:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/10\/misconception-widgets-reinvent-the-wheel\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":233,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","footnotes":""},"categories":[6],"tags":[5],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-w3cwidgets","tag-w3c-widgets"],"_links":{"self":[{"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/users\/233"}],"replies":[{"embeddable":true,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":7,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":23,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/posts\/21\/revisions\/23"}],"wp:attachment":[{"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}