Skip to content

Which format

jmrobles edited this page · 7 revisions
Clone this wiki locally

Edit this page to add a pro or cons reason to support or not a format.

A txt file

Pros

  • It's easy to create and read by anyone (it takes just some minutes).
  • An interface to create the file is not mandatory.
  • It's easy to parse.
  • It's flexible.
  • It works with any website, no matter if it's a CMS or a basic webpage.
  • It's outside of HTML/JS code.

Cons

  • It may have duplicated information that should be on the main page.
  • It can increase the traffic to webpages if spiders start requesting the business.txt file
  • Non-technical users may not be precise enough when creating the file; it might not follow the standard exactly.

A yaml formatted file

Pros

  • Same as "txt"
  • Very similar format to the "txt" format, but in an existing standard
  • Easy to parse with existing tools. Example of parsing the example in the README via Ruby:
>> YAML.load(File.open('business.txt'))
=> {"Name"=>"RJ Grunts", "Categories"=>"American Restaurant, Bar", "Street"=>"2056 North Lincoln Park W (at Dickens Ave.)", "Zip"=>60614, "City"=>"Chicago", "State"=>"Illinois", "Country"=>"United States", "Coordinates"=>"41.92012, -87.63645", "Phone"=>"(1) 773-929-5363", "Price range"=>"$$", "Price description"=>"$9.95 burger, $11.95 salad and soup bar. You can eat for $10-20.", "Open"=>"Mon-Fri 11.30am-12am, Sat 10am-12am, Sun 10am-9pm", "Short description"=>"Great place to have a great burger and salad bar", "Website"=>"http://www.rjgruntschicago.com/", "Twitter"=>"RJGruntsChicago", "Facebook"=>"http://www.facebook.com/rjgrunts", "Foursquare"=>"https://foursquare.com/v/rj-grunts/42153000f964a5208c1f1fe3", "Google"=>"https://plus.google.com/108935673850120788149/about?hl=en", "Yelp"=>"http://www.yelp.com/biz/rj-grunts-chicago", "Urbanspoon"=>"http://www.urbanspoon.com/r/2/15875/restaurant/Lincoln-Park/R-J-Grunts-Chicago", "Foodspotting"=>"http://www.foodspotting.com/places/186358-r-j-grunts-chicago", "TouristEye"=>"http://www.touristeye.com/RJ-Grunts-Chicago-p-2127"}

Cons

  • Same as "txt"
  • Possibly tied too closely to an existing format (a double edged sword: you get an existing toolset, but as that format changes, this "businesstxt" format might have to too)

A json formatted file

Pros

  • It's really easy to parse.
  • It's flexible.
  • It works with any website, no matter if it's a CMS or a basic webpage.

Cons

  • It may have duplicated information that should be on the main page.
  • It can increase the traffic to webpages if spiders start requesting the business.txt file
  • We will need for sure an interface to create the file.

Microformats in the main file (index.php)

Pros

  • It's based in a standard that it's already there.
  • Many spiders are already searching for them.
  • There are some parsers already available.

Cons

  • It's definitely not easy to read/write for a non-developer.
  • It may be even a bit complicated for a developer.
  • We will need for sure an interface to create the file.
  • We will need to extend the current standard because we need more fields.
  • It may be not flexible enough.
  • Developers will need to create plugins to integrate the meta tags into the main file (index.php)

hCard

Pros

  • It's based in a standard that it's already there.
  • There are some parsers already available.

Cons

  • It's not easy to read/write for a non-developer.
  • It may be even a bit complicated for a developer.
  • We will need for sure an interface to create the file.
  • We will need to extend the current standard because we need more fields.
Something went wrong with that request. Please try again.