venerdì 8 aprile 2016

From 4P to 4C

In summary social, mobile and big data require businesses to shift their marketing focus from the traditional four Ps of marketing to four Cs of social:

Product
Place
Price
Promotion

to

Content
Connecting
Community
Curating

martedì 24 novembre 2015

Netflix stack

http://highscalability.com/blog/2015/11/9/a-360-degree-view-of-the-entire-netflix-stack.html

very interesting article

giovedì 29 gennaio 2015

Asp.Net WebApi 2 and Enum

By default, Web API serializes ENUM data types to the numeric value but humans don't like code, we prefer string description.

So we need to add a Media Type Formatter. In Web API, the media type determines how to serialize the data with a built-in support for JSON, XML and form-urlencoded.

 The following helper method handles the configuration of the media formatter setting. This code should be added in the global.asax.cs file.

using Newtonsoft.Json;

protected void Application_Start()
{
   SerializeSettings(GlobalConfiguration.Configuration);                
}

void SerializeSettings(HttpConfiguration config)
{
   JsonSerializerSettings jsonSetting = new JsonSerializerSettings();
   jsonSetting.Converters.Add(new Converters.StringEnumConverter());
   config.Formatters.JsonFormatter.SerializerSettings = jsonSetting;
}

venerdì 2 gennaio 2015

Tool for testing website performance

8% of potential buyers cite extremely slow loading web pages as primary reason for abadoning their purchase. It does not seem a big number but for Amazon or other big ones it means milions of dollar.

I found some tools for testing the sites that I develop.

Pingdom Tools
Web Page Analyzer
WebSitePulse
GTmetrix
WebPagetest
YSlow
Pagespeed Insights

In light of the fact that page weight is increasing every year, I hope this post will give you enough ammunition to be better prepared to tackle the performance challenge on your own projects.

martedì 23 dicembre 2014

Mean is the new Lamp

Mean (MongoDb, Express, Angularjs, Nodejs) is the new full stack for web application development.

MongoDB – MongoDB is what's known as a NoSQL database. It can be thought of as a database of documents, rather than consisting of rows, columns, and tables. The primary use case is storing JSON data; a perfect fit when writing applications with JavaScript. What it may lack in relations and a draconian adherence to schema, it makes up for in speed, scalability, and ease-of-use.

Express – Express is a thin web server framework designed to make building web servers with Node easier and more maintainable. It is an unopinionated framework which provides developers a high level of customizability but is "low-level" enough to still have access to the underlying Node framework it's built on. Express provides an easy to use request router, cookie management, a static file server, and many other HTTP building blocks needed to create enterprise-grade web servers.

AngularJS – Angular is a feature-rich client side MVC JavaScript framework. It can be used to make robust and complex single-page web applications. It has built in two-way data binding and its own HTML-based templating language. It also has a feature called "directives" that allow you to extend HTML with new attributes, and even new elements. Angular is also highly testable, which may not be the most interesting facet of development, but it is often the most important and is frequently overlooked with client side code. Finally, it provides conventions and best practices to help developers structure client side solutions.

Node – Node is a JavaScript runtime used to build server and networking applications. It provides all the JavaScript features found in the browser with additions for file and network I/O. It uses Google's V8 engine (the same one used in Google Chrome) to execute JavaScript. It also boasts a very active community of developers and ecosystem of Node modules (Express is one such module). While there have been other server side implementations of JavaScript, Node is, by far, the most successful in terms of development and adoption by both enthusiasts and large corporations as well.

Not for enterprise applications but really good for modern website and single page applications or restful web services.

venerdì 21 novembre 2014

IIS Express and json mimeType

In order to add JSON mime type to IIS Express, perform the following:
  1. Open a console application with administrator privilages.
  2. Navigation to the IIS Express directory. This lives under Program Files or Program Files (x86)
  3. Run the command: 
appcmd set config /section:staticContent /+[fileExtension='JSON',mimeType='application/json']