Google has added the Winter Olympics slopes to its Street View , allowing people to see the same view down a mountain as a skier about to push off in their quest for gold.
Engineer Dan Ratner explained: “In typical scrappy Google fashion, we were able to put this together over a few weekends. We used extra pieces from our Street View cars, some 2×4s, some duct tape, and a lot of extra hard drives.
If you wan’t to allow hyphens in your URL’s you will need to change the way the routing works in your Global.asax file.
First create a new class which extends the MvcRouteHandler and place this in the Global.asax file after the main MvcApplication class.
C#:
public class HyphenatedRouteHandler : MvcRouteHandler{
protected override IHttpHandler GetHttpHandler(RequestContext requestContext){
requestContext.RouteData.Values["controller"]= requestContext.RouteData.Values["controller"].ToString().Replace("-","_");
requestContext.RouteData.Values["action"]= requestContext.RouteData.Values["action"].ToString().Replace("-","_");return base.GetHttpHandler(requestContext);}}
VB:
Public Class HyphenatedRouteHandler
Inherits MvcRouteHandler
Protected Overrides Function GetHttpHandler(ByVal requestContext As System.Web.Routing.RequestContext) As System.Web.IHttpHandler
requestContext.RouteData.Values("controller") = requestContext.RouteData.Values("controller").ToString.Replace("-", "_")
requestContext.RouteData.Values("action") = requestContext.RouteData.Values("action").ToString.Replace("-", "_")
Return MyBase.GetHttpHandler(requestContext)
EndFunctionEnd Class
Then you need to replace the routes.MapRoute with an equivalent routes.Add specifying the new handler as the MapRoute does not allow you to specify a custom route handler.
C#:
routes.Add(
new Route("{controller}/{action}/{id}",
new RouteValueDictionary(
new { controller ="Default", action ="Index", id =""}),
new HyphenatedRouteHandler()));
VB:
routes.Add(New Route("{controller}/{action}/{id}",
New RouteValueDictionary(NewWith {.controller = "Home", .action = "Index", .id = ""}),
New HyphenatedRouteHandler()))
I hope this is useful, any questions feel free to get in touch.
Would like to say thanks to John from here for answering the original question on Stackoverflow
It seems there are only a few changes to this release which you can find here: Release Notes
A few words from Phil Haack’s blog:
The biggest change in this release was described by Brad Wilson in his blog post on Input Validation vs. Model Validation in ASP.NET MVC. Also included in this release are an assortment of bug fixes and performance improvements.
The window to provide feedback on this release is going to be very short as we are closing in on the RTM. If you want to provide input into this release, please do take the bits for a spin as soon as possible. I’m pretty excited about this release as I can see the end of the tunnel fast approaching.
At this point, we’ll only be taking recall class bugs for ASP.NET MVC 2. All other bug reports will be filed against ASP.NET MVC 3. Sometime in the near future, I’ll start sharing some of our planning around that. How exciting!
Yesterday Facebook launched HipHop, a converter from php to c++ so your apps can run twice as fast due to them being compiled not interpreted.
Today I’m excited to share the project a small team of amazing people and I have been working on for the past two years; HipHop for PHP. With HipHop we’ve reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page. Less CPU means fewer servers, which means less overhead. This project has had a tremendous impact on Facebook. We feel the Web at large can benefit from HipHop, so we are releasing it as open source this evening in hope that it brings a new focus toward scaling large complex websites with PHP. While HipHop has shown us incredible results, it’s certainly not complete and you should be comfortable with beta software before trying it out. – Haiping Zhao (Facebook)
HipHop is for scaling large multiserver high traffic sites like Facebook. In your regular application, you will get no great advantage from it. It is definately something to be aware of but it does make you think if your trying to compile PHP using a tool like this why not develop in C# (ASP.NET MVC 2 maybe?) that is compiled anyway?