Lightweight Programming

Given enough eyeballs, all bugs are shallow.

- Linus Torvalds, Linus' Law

Lightweight programming is programming based on a high level of accessibility for users and creators and on the idea of adaptation and change for improvement (some programmers also refer to it as "sloppy programming" due to its inexact methods). RSS is a clear example of lightweight programming. It is “simple” (hence the name) and therefore is widely used. It is also people-oriented rather than process-oriented. The development of the program is based upon the user's needs and the continual process of people building upon other people's work. The values of lightweight programming are shown in syndication (outward sharing of data), in the ability to “remix” (the ability to add or re-use the original program in a new way), and in the basis of open source software. Open source software is generally under an open license for others to study, change, and improve its design. Two resources are the GNU General Public License (GPL), a free software license, and Creative Commons, a “non-profit organization devoted to expanding the range of creative work available for others to legally build upon and share” (Wikipedia). In the use of open source software, a common phrase is “some rights reserved”. “Some rights reserved” means that the creator specifies the future use and re-use of a component (idea, photo, or work), typically defined as free to use but with the stipulation to cite the original creator. This gradation of rights and usage allows for further development and greater creativity for common use.

Torvalds' idea, “Given enough eyeballs, all bugs are shallow,” describes the principle that if there are enough people looking at something then there is a greater chance that the flaws and errors will be seen, and ultimately repaired. This is also a central idea that Raymond cites in his essay “The Cathedral and the Bazaar”, that in the Bazaar there is greater freedom to develop code over the internet with a larger body of contributors – the “open marketplace” - versus in the Cathedral, being where the source code is only available with each separate software release – “locked away”.

Sample Application: Amazon.com

Amazon is a prime example of holding to Web 2.0 values. It encourages users to add value to the information on the site by providing ranking of products and personal reviews. There is a continual building of value from users for future users, as well as the “1-click” purchase option works to build one of the largest user identity databases. Overall, Amazon is based upon programming technologies, such as SOAP and REST.

Amazon.com's web services are provided in two forms: one adhering to the formalisms of the SOAP (Simple Object Access Protocol) web services stack, the other simply providing XML data over HTTP, in a lightweight approach sometimes referred to as REST (Representational State Transfer). While high value B2B connections (like those between Amazon and retail partners like ToysRUs) use the SOAP stack, Amazon reports that 95% of the usage is of the lightweight REST service.

- Tim O'Reilly, “What is Web 2.0

Amazon pursues the value for simplicity in all its methods. In finding solutions with open source, lightweight programming Amazon gains an advantage over competitors with its information gathering and database growth and the application of its database and tools to other website and programs that refer back to the Amazon services.

Technical Aspects

Some of the lightweight programming tools that are founded in open source development and are central to the idea of Web 2.0 are: XML (previously discussed in Web Servicing ), SOAP and REST. SOAP (Simple Object Access Protocol) is a “protocol for exchanging XML-based messages over a computer network, normally using HTTP” (Wikipedia). SOAP is typically used as a foundation for transfers, such as peer-to-peer exchanging of messages. A SOAP message is contained in an envelope with a header and a body. Here is an example SOAP message (borrowed from Wikipedia “SOAP”):

 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

   <soap:Body>
     <getProductDetails xmlns="http://warehouse.example.com/ws">
       <productID>827635</productID>
     </getProductDetails>
   </soap:Body>

 </soap:Envelope>

REST (Representational State Transfer) is typically referred to as “a collection of architectural principles”, but is also considered “any simple web-based interface that uses XML and HTTP” (Wikipedia). REST has a small set of remote accessing methods (GET, POST, PUT, DELETE, etc.) that are applied to “resources” which can then link unrelated pieces of information.

[REST] scales well with large numbers of clients, enables transfer of data in streams of unlimited size and type, supports intermediaries (proxies and gateways) as data transformation and caching components, and concentrates the application state within the user agent components.

- Roy Fielding, "RestWiki Front Page"

The value to utilize lightweight open source programs and to allow access for programs to be further developed or applied in new ways is a key principle for Web 2.0 and its future.

Further…

Amazon.com Services: http://www.amazon.com/exec/obidos/tg/browse/-/468594/002-7517990-4812858

GNU:http://www.gnu.org/

Creative Commons: http://creativecommons.org/

Dave's History of SOAP: http://www.xmlrpc.com/stories/storyReader$555

SOAP Introduction (Flash, SWF file): http://searchwebservices.techtarget.com/searchWebServices/downloads/what_is_soap.swf

XML Protocol Working Group (maintainers of SOAP): http://www.w3.org/2000/xp/Group/

A Short Summary of REST: http://rest.blueoxen.net/cgi-bin/wiki.pl?ShortSummaryOfRest ;

A SOAP vs. REST discussion: http://rest.blueoxen.net/cgi-bin/wiki.pl?HowSoapComparesToRest