Zhongde Liu

This is my personal "Clipboard" of web development stuff I come across


Leave a comment

Herokus Design Styleguide

Heroku just recently made their ui styleguide/style kit public available. This is another great example of a good structured and visual appealing reference for the frontend elements. You provide code examples and actual design in this living document for typography, buttons, forms, grids, etc…

http://purple.herokuapp.com/

Such a reference can make a huge impact in terms of communication between different departments and stakeholders. Combine it with wireframes you get a really fast instrument to talk over and improve new design plans.

If not, don’t wonder if your end result is a design chaos, and your css/html is duplicated all over the place…

Advertisements


Leave a comment

Standards/Guidelines for building an HTTP API/Webservices/REST

General Overview about HTTP API Design

Thoughts on RESTful API Design

A document describing the experience the author, Geert Jansen, gained from designing the RESTful API for Red Hat’s Enterprise Virtualization product.  Summarizes his thoughts about how a “good” REST Service should look.

https://restful-api-design.readthedocs.org/en/latest/

HTTP API Design Guide from Heroku

The Heroku team has published their HTTP API Design Guide. It is a short guide / best-practice collection, giving a nice overview which aspects you should consider when designing an API.

https://github.com/interagent/http-api-design

Data formats

Following two links describing how the response should be formatted: These are consistent, documented quasi-standards for use as response formats. Main topic is the linking and discoverability between resources.

JSON API :: A standard for building APIs in JSON.

Living document, written by Steve Klabnik and Yehuda Katz. Media-type: application/vnd.api+json

http://jsonapi.org/

JSON HAL – Hypertext Application Language

Mike Kelly wrote down a convention expressing hyperlinks in JSON (or XML) and named it HAL. Media-type: application/hal+json

http://stateless.co/hal_specification.html,  http://tools.ietf.org/html/draft-kelly-json-hal-06

Collection+JSON – Hypermedia Type

A format definition focused on collections. Media-Type: application/vnd.collection+json

http://amundsen.com/media-types/collection/

 


Leave a comment

Stylesheet limits in Internet Explorer <= 9

One point on the web performance list is: “Concatinate and minify all your css into one file”. However in IE (version lower than 10), you have an internal limit regarding the stylesheet file.

These are the facts:

  • A sheet may contain up to 4095 rules
  • A sheet may @import up to 31 sheets
  • @import nesting supports up to 4 levels deep

The official statement on the MSDN blog here:  http://blogs.msdn.com/b/ieinternals/archive/2011/05/14/internet-explorer-stylesheet-rule-selector-import-sheet-limit-maximum.aspx

If you eventually  get over these marks (and with an optimized generated css file, it is more likely) , you have to split your stylesheets into multiple files (in Production).

For example, github.com currently uses two css files for its normal website, named github.css and github2.css.

 


1 Comment

Reference: Zen Coding Syntax

For HTML:
http://code.google.com/p/zen-coding/wiki/ZenHTMLSelectorsEn

Example:
div#content.wrapper>h1+p*2

Result:
<div id="content" class="wrapper>
<h1></h1>
<p></p>
<p></p>
</div>

 

For CSS:
http://code.google.com/p/zen-coding/wiki/ZenCSSPropertiesEn

Cheatsheet (PDF):
http://code.google.com/p/zen-coding/downloads/detail?name=ZenCodingCheatSheet.pdf