Product Engineer, CTO & a Beer Enthusiast
Experiments, thoughts and scripts documented for posterity.
Dec, 2013
Clipthetrip.com is a fun, free crowd sourced destination guides. From a data modeling perspective it has a pretty simple object interaction. There is Location object, there is CLIP object, there is photo object and a user object. MongoDB was used as a data store so objects were quite denormalized instead of a referential model.
var xElement = System.Xml.Linq.XElement.Load("http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency=USD&ToCurrency=" + code);
//code being 3 letter code like USD, INR etc.
var cur = decimal.Parse(xElement.Value).ToString("#.##");
jsonResult.Data = new { c = cur, code = code };
return jsonResult;
Business information from Bing
using (var _imgProcessing = new ImageProcessing())
{
using (var _waterMarkedImage = _imgProcessing.Process(
imagePath: file,
resize: 164))
{
ImageHelper.SaveStream(_waterMarkedImage, thumbFile);
}
}