Show me the code! RSS 2.0
 Tuesday, June 03, 2008

The first day of Tech Ed has been exciting and full of things to be learned and explored.  Here are the sessions I attended and my thoughts/reflections on each.

Keynote with Bill Gates, S. "Soma" Somasegar, others


Pragmatic Architecture: The Role of an Architect with Ted Neward

  • Architects spend too much time defining their role
  • The building architect analogy is good, but the maestro/conductor comparison is better.
  • How do we start polishing the process of software architecture over the next 5-10 years?
  • Why is there often a negative connotation with the title "Architect"
  • Some architects really have no idea what is going on.  You must understand the big picture before you can create solutions at this level.
  • Should architects still write code?  Absolutely!


Best Practices with the Microsoft Visual C# 3.0 Language Features with Mads Torgersen (PM for C#)

 

Automatically implemented properties

public string CustomerID { get; set; }

 

Implicitly typed Local variables

 

 

var custs = new List<Customer>()

{

new Customer()

{

                        CustomerID = “MADST”;

                        CustomerName = “Mads Torgersen”;

                        City = “Redmond”;

}

}

 

Collection and Object Initializers

Code-result Isomorphism

            Shape imitates result

 

ObjectDumper

 

Extension Methods

Public static IEnumerable<Customer> GetLondoners(this IEnumerable<Customer> source)

Foreach (var c in source)

{

            If (c.City == “London”) yield return c;

}
Allows you to insert extension methods into an instance (even if static)

New functionality on existing types

Scoped by using causes

Interfaces & constructed types

 

Lambda Expressions

Public static IEnumerable<T> Filter <T>(GetLondoners(this IEnumerable<T> source, Predicate>T> p)

foreach (var c in source)

{

            If (p(c)) yield return c;

}

 

var query customers.Filter(delegate(Customer c) { return c.City == “London”; };

 

Terse syntax for anonymous methods:

var query customers.Filter(c =>{ c.City == “London”;});


*When you only have one thing left you can remove the parens

 

LINQ to Objects

var query = Customers

            .Where( c=> c.City == “London”);

            .Select ( c=> c.ContactName);

 

ObjectDumper.Write(query);

 

Monads – Look into this

 

Don’t use LINQ for *other magic* that is not a query

 

Expression Trees

Related to link

Expression(of)

Represents a lambda expression as an expression tree at runtime

 

 


ASP.NET MVC with Scott Hanselman

  • Separation of Concerns!
  • A new .NET project type
  • Designed to be very easily testable with minimal need for mocking objects compared with other patterns
  • Test with mbunit or integrated VS test system
  • Uses three new namespaces:
    • System.Web.Abstractions
    • System.Web.Mvc;
    • System.Web.Routing;
  • "Bin-deployable" These new assemblies do not have to be installed in the GAC.  Useful when you can't, or are afraid to, install them there.
  • Flexible.  Plays well with Winforms
  • Fundamental to .NET from version 3.5 forward
  • Demo of red-green TDD.  This is really quite easy with MVC because of much improved separation of concerns when used properly
  • JQuery and AJAX compatible
  • Dove into the call stack for MVC at runtime, it's quite informative for understanding what's going on "under the covers".  Have a look at the call stack of a running MVC app to get a good picture of what's going on.
  • Discussion of Routing
  • Provides for cleaner URLs and HTML
  • Phil Haack (PM for MVC) is open to suggestions from the community and will be incorporating recommendations from developers as much as possible.
  • "Strongly typed query strings"
  • Much better than average runtime errors when something goes wrong.  This is strange but true!
  • Discussed Extension Methods, Lambda queries, and LINQ
Monday, June 02, 2008 11:04:02 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2] -

Thursday, June 05, 2008 4:58:14 AM (Eastern Standard Time, UTC-05:00)
What do you do with Volvo IT?
KLowD9x
Tuesday, July 08, 2008 2:39:27 PM (Eastern Standard Time, UTC-05:00)
I work with our Common Web Platform which hosts Volvo.com, DealerSiteBuilder(dealer branded flavor of Volvo.com), our intranet, and our Extranet.
Comments are closed.
Flickr stream
Archive
<August 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Christopher Ballance
Sign In
Statistics
Total Posts: 13
This Year: 13
This Month: 0
This Week: 0
Comments: 2
All Content © 2008, Christopher Ballance