Colin Gemmell’s session on From .NET to Rails, A Developer’s Story At DDD9

Wow. I know DDD isn’t a Microsoft conference but having a someone talk about moving from .Net to open source, bloody hell does he think he’s at ALT.Net?

I was really interested in this talk because before ASP.NET MVC came along I was also considering making the jump myself.

Colin Gemmell is an excellent presenter who gave an excellent presentation. Well done Colin.

Colin Gemmell At DDD9

He started his talk by explaining why he made the transition and what his development setup was for Rails.

It was interesting to see he started off using Windows but ended up using Ubuntu and VIM with plugins to write Ruby code.

He said this was because Ruby gems use of linux kernel methods which meant some things in Windows didn’t work, although EngineYard were working towards resolving some of the issues.

His tip for learning ruby was the learn Ruby site.

My tip is if you can spare fifteen minutes you can see how powerful the language is by trying Ruby in your browser which saves you installing it.

He showed how conventions, migrations, deployment and even project structure in Ruby made the equivalent things in .Net seem long winded and inconstant because everyone has their own convention.

While ASP.NET MVC has made great strides in doing the same it’s still not as opinionated as Ruby which can sometimes leaves the framework trying too hard to be all things to all developers. Which is why frameworks such as fubumvc exist in .Net.

Next Colin showed what the SOLID design principles meant for Ruby and how easy it was to write tests without the need to mocking framework because it was a dynamic language allowing you to use monkey patches.

It would have been interesting to see Colin finish his talk by deploying the Rails site he created during the talk to a Heroku server but he was let down by network issues.

I really liked how open and transparent Colin was about the things that did and didn’t work in Ruby, such as the performance ActiveRecord making way to many calls to the database.

Read more of my opinions about DeveloperDeveloperDeveloper9 here

Mobile Panel – From iPhone to HTML 5 to Windows Phone 7 to Android at DDD9

Chris Hardy played David Dimbleby in the first ever DDD panel which was made up by Mike Oramod, Chris Hay, Matt Lacey and Dave Evans (left to right in the picture below).

mobile panel at ddd9

The panel agreed that Windows Phone 7 was the developers’ platform of choice.

I don’t think that’s because we were in a Microsoft building but more to do with the fact the panel were predominately Visual Studio users who had more familiar developing apps using Silverlight than Objective C and Java.

There’s nothing wrong with this as I’m sure the same thing would happen if you were at an event sponsored by and hosted by Apple or Google.

But even Steve Jobs would have done a better job in sticking up for Android than this lot ;)

The old chestnut of native apps vs those developed using PhoneGap was discussed next.

I’ve been involved in many of these discussions over the past few months and they have always reached the same conclusion that as long as companies like Apple allow apps developed using Phonegap into their store you should pick the best tool to achieve your goal. This was no different.

I love Phonegap because it does what the majority of clients want from apps and thats to display data in lists without using any of the phones native functionality. It’s as close to the ‘write once deploy too many’ utopia we have right now.

There was a question about Nokias’ future and Chris Hay pointed out to the differences in market share Nokia have in places like India, China and Africa compared to the western world. I’m always really surprised that people don’t realise how many Nokia phones are being used out there, and instead focus on stats for smart phones in the US and Europe.

For me the iPhone is like a German car in the mobile phone market. It’s a desirable product and although they can be purchased in places like India they will never be that popular because of the price.

In other words Apple will not be able to sell iPhones in India at the same price as Nokia just like how BMW cannot sell cars in India at the same price as Tata. So it’s a no brainier which will have the larger share in markets like this.

Security was also discussed by the panel along with the how apps are approved by some automated process for iPhone, a human actually using it for Windows Phone 7 and the pot smoking, tree hugging, free loving method Google uses for Android.

It was pointed out that if users had a bad experience using an app they would blame both the app and the phone so it was important apps did what they were meant to without doing anything malicious.

Oh and there were some question when Windows Phone 7 would get a decent browser…

I really liked the panel session and hope so see more of them at future DDD events. Well done to all those involved.

Read more of my opinions about DeveloperDeveloperDeveloper9 here

Using Html.Raw in ASP.NET MVC Razor Views

With the release of ASP.NET MVC 3 Release Candidate 2 (RC2) you can finally use Html.Raw when you don’t your output to be encoded.

So this means you don’t have to use

@MvcHtmlString.Create(ViewBag.HtmlOutput)

or

@(new HtmlString(ViewBag.HtmlOutput))

or anything else to output a string containing HTML in ASP.NET MVC.

An example of using Html.Raw in ASP.NET MVC 3 using Razor

The code below shows the HTML string to be outputted being added the dynamic ViewBag collection.

public class HomeController : Controller
{
    public ActionResult Index()
    {
        StringBuilder htmlOutput = new StringBuilder();
        htmlOutput.Append("<p>The image below is from " );
        htmlOutput.Append("<a href=\"http://commons.wikimedia.org/wiki/Main_Page\">Wikimedia Commons</a>");
        htmlOutput.Append("</p>");
        htmlOutput.Append("<img src=\"http://upload.wikimedia.org/wikipedia/commons/6/63/CampNou.jpg\" alt=\"Cam Nou\" title=\"Cam Nou\"/>");
        ViewBag.HtmlOutput = htmlOutput.ToString();
        return View();
    }
}

Which can be used in a view like this

@{
    ViewBag.Title = "Index";
}

@Html.Raw(ViewBag.HtmlOutput)

to show the following output in a browser

Output Using HtmlRaw in ASP.NET MVC

For more information check out Scott Gu’s post Announcing ASP.NET MVC 3 (Release Candidate 2).

Page 8 of 23« First...678910...20...Last »