Microsoft proposes S&M

Just learnt about Microsoft’s S&M proposal. Horrible naming — almost like dark humour for journalists.

S&M vs. SPDY: Microsoft and Google battle over the future of HTTP 2.0

Lumbered with the truly awful name of HTTP Speed+Mobility, or HTTP S&M for short, Microsoft’s vision of HTTP 2.0 is mostly very similar to SPDY (and it admits as much on the Microsoft Interoperability blog), but with additional features that cater towards apps and mobile devices. “The HTTP Speed+Mobility proposal starts from both the Google SPDY protocol and the work the industry has done around WebSockets,” says Jean Paoli from the Microsoft Interoperability team. WebSockets in this case refers to a feature in HTML5 that allows websites (or indeed web apps) to open up bidirectional, real-time channels with remote servers over TCP, which is something that neither HTTP nor SPDY is capable of.

In short, the entire purpose of SPDY is to speed up the web — which isn’t a bad thing, and nor is it surprising, considering Google’s fanatical penchant for speed, but Microsoft is basically saying that speed isn’t everything. With HTTP Speed+Mobility, Microsoft is saying that we should also take into account factors such as battery life and bandwidth cost, both of which will play a big part in Windows 8 in specific and mobile computing in general.

Source: Extremetech

Not exactly new news but still worth watching.

Symfony2 and MVC

Really like what Fabien expressed here:

Is Symfony2 an MVC framework?

If you look around, every single framework seems to implement the MVC pattern.

I really don’t care whether Symfony2 is MVC or not. Probably because the MVC word is so overloaded and because nobody implements exactly the same MVC pattern anyway. The separation of concerns is all I care about. And if you like to call Symfony2 an MVC framework, then you should know that Symfony2 is really about providing the tools for the Controller part, the View part, but not the Model part. It’s up to you to create your model by hand or use any other tool, like an ORM.

I don’t like MVC because that’s not how the web works. Symfony2 is an HTTP framework; it is a Request/Response framework.

You have to be very discipline when you use Symfony2. Unlike other frameworks there are often many way of achieving the same result. I find myself thinking which is better often, changing where I place certain code and still lack the satisfaction and confidence that I did right. I am unsure where this and that should go although I will just say that given my experience with PHP I can pretty much make anything work. But. They just aren’t very sightly, if you know what I mean.

Did you know the ‘Referer’ in HTTP is spelt wrongly?

Well it is. Here is what’s written in the RFC 2616 – Hypertext Transfer Protocol — HTTP/1.1:

The Referer[sic] request-header field allows the client to specify, for the server’s benefit, the address (URI) of the resource from which the Request-URI was obtained (the “referrer”, although the header field is misspelled.) The Referer request-header allows a server to generate lists of back-links to resources for interest, logging, optimized caching, etc. It also allows obsolete or mistyped links to be traced for maintenance. The Referer field MUST NOT be sent if the Request-URI was obtained from a source that does not have its own URI, such as input from the user keyboard.

[code lang=”bash”]Referer = “Referer” “:” ( absoluteURI | relativeURI )[/code]


[code lang=”bash”]Referer:[/code]

If the field value is a relative URI, it SHOULD be interpreted relative to the Request-URI. The URI MUST NOT include a fragment. See section 15.1.3 for security considerations.

The referrer, or HTTP referrer — also known by the common misspelling referer that occurs as an HTTP header — identifies, from the point of view of an internet webpage or resource, the address of the webpage (commonly the URL, the more generic URI or the i18n updated IRI) of the resource which links to it. By checking the referrer, the new page can see where the request came from. Referrer logging is used to allow websites and web servers to identify where people are visiting them from, for promotional or security purposes. Referrer is a popular tool to combat cross-site request forgery, but such security mechanisms do not work when the referrer is disabled. Referrer is widely used for statistical purposes. (Source: Wikipedia)