code-examples: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
No edit summary
 
m (Reverted edits by TrtaeLordo (Talk) to last version by HikIqa)
 
(24 intermediate revisions by 9 users not shown)
Line 3: Line 3:


== The Problem ==
== The Problem ==
Source code is published around the web in nonstandard formats, this makes actual use more difficult as it a) obscures possible licensing issues, doesn't encapsulate the source code in standard machine readable formats, and doesn't keep important meta data such as authors, language types and language version, with the source code in a machine readable fashion.
Source code is published around the web in nonstandard formats, this makes actual use more difficult as it a) obscures possible licensing issues, b) doesn't encapsulate the source code in standard machine readable formats, and c) doesn't keep important meta data such as authors, language types and language version, with the source code in a machine readable fashion.


== Participants ==
== Participants ==
Line 9: Line 9:


== Real-World Examples ==
== Real-World Examples ==
''Links to public web pages, either popular or insightful''


=== [Example #1 LXR] ===
=== LXR ===
[http://lxr.mozilla.org/mozilla1.8/source/browser/app/nsBrowserApp.cpp Mozilla - LXR]
[http://lxr.mozilla.org/mozilla1.8/source/browser/app/nsBrowserApp.cpp Mozilla - LXR]


* uses <code>&lt;pre&gt;</code> to designate code block
* uses <code>
* composed of:
** Programming language inline at the top
** License is inline in comments in the code block
** Author is inline with the license
** the code block is further complicated by having line numbers
 
=== [Example #2 PHPClasses] ===
[http://www.phpclasses.org/browse/file/10684.html PHPClasses - Viewing a file]
 
* uses table rows to encapsulate data regarding the file
* code is designated by <code>&lt;pre&gt;</code>
* composed of:
** File Name
** File Version
** Author Name
** Author Webpage
** Author Email
** License (inline)
** Content type
** Description
* license, author data, and programing languge version are located in the [http://www.phpclasses.org/browse/package/2544.html class data] as well as inline with the file
 
 
=== [Example #3 Php.net] ===
[http://us3.php.net/ldap Php.net ldap functions]
 
* uses <code>&lt;div&gt;</code> to designate the code block
* Has an assumed free license, and no other metadata attached to the code
* code is a mess for syntax highlighting purposes
 
== Existing Practices ==
* ''Summary of common patterns discovered''
* ''Other attempts to solve The Problem''
 
== Proposal ==
* Early drafts
* ''Link to related pages as they become available''
** -brainstorming
** - proposal
** -microformat
== See Also ==
* ''Other microformats''
* ''Normative references for tags used''

Latest revision as of 23:59, 17 December 2008

Code Examples

Per the microformats process this is an examples page documenting existing real world examples of source code published on the Web. Next steps are to research code-formats and then proceed with code-brainstorming.

The Problem

Source code is published around the web in nonstandard formats, this makes actual use more difficult as it a) obscures possible licensing issues, b) doesn't encapsulate the source code in standard machine readable formats, and c) doesn't keep important meta data such as authors, language types and language version, with the source code in a machine readable fashion.

Participants

Real-World Examples

LXR

Mozilla - LXR

  • uses