Changes between Version 16 and Version 17 of CodingStandards
- Timestamp:
- 09/16/10 13:25:46 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodingStandards
v16 v17 97 97 * Examples should be written to demonstrate use of new API functions/methods or new classes. 98 98 * Examples should be well named (some-class.html or new-method.html) and should have a sensible title. 99 * Example markup and code should be separated. Your example HTML page should link to an example JavaScript file (e.g. new-method.html links to new-method.js). 100 * Example markup should be standards compliant HTML (no XHTML unless your example requires that specifically). Use {{{<!DOCTYPE HTML>}}} at the top of your markup to trigger standards compliant mode in browsers (see the [http://dev.w3.org/html5/spec/syntax.html#the-doctype HTML5 spec] and [http://ejohn.org/blog/html5-doctype/ this blog post] for more detail). This is relevant even if you are not using HTML5 features. 101 * Include the {{{<script>}}} tag that pulls in your JavaScript at the end of your {{{<body>}}} element. 99 102 * Examples are all parsed by [source:trunk/openlayers/tools/exampleparser.py exampleparser.py] to produce an [http://openlayers.org/dev/examples/example-list.xml example feed]. This example feed serves as the sitemap for our examples and all examples should follow the same conventions as [source:trunk/openlayers/examples/example.html example.html]. 100 103 * Link to the default OL [source:trunk/openlayers/theme/default/style.css stylesheet]
