# Wednesday, August 20, 2008

I am on .NET Rocks this week with Danny Simmons where I talk about the Entity Framework and the EF Council.

Apparently Frans Bouma thinks I am a wise man. Thanks Frans, but I prefer the term software architecture luminary or better yet a database weenie.

posted on Wednesday, August 20, 2008 7:14:06 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [2] Trackback
# Tuesday, August 19, 2008

Thursday, August 21, 2008
All About the ASP.NET MVC Framework

Subject: 
You must register at https://www.clicktoattend.com/invitation.aspx?code=129953 in order to be admitted to the building and attend.
When it comes to design patterns, the MVC is the granddaddy of them all. First described in the late 70s, the MVC pattern remains very popular in the world of web applications today. In October 2007, Microsoft’s Scott Guthrie announced a new Model View Controller (MVC) Framework for ASP.NET. Ever since then, posts about it have spread about it like wildfire through the .NET blogosphere. There's usually at least 2-3 MVC stories a day that show up on DotNetKicks. At several tech conferences and community events around the country, MVC sessions have been standing room only. Just what is the MVC Framework, and why are developers so excited about it?
Come and join us this month as Peter Laudati, Developer Evangelist from Microsoft, breaks the MVC framework down for you. Peter will give us a quick tour of the framework, then peel back the layers and dive deeper into how it works. As part of that, he’ll spend time discussing the design and development practices that lead to the creation of the MVC framework. ASP.NET MVC provides a framework that enables you to easily implement the model-view-controller (MVC) pattern for Web applications. This pattern lets you separate applications into loosely coupled, pluggable components for application des

Speaker: 
Peter Laudati, Microsoft
Peter Laudati is a Developer Evangelist with Microsoft. In his current role, Peter works with the developer community in New York and New Jersey to support area user groups, code camps, and other events. Previously, he worked as a consultant in Microsoft’s services division. As a consultant, he worked on several application development projects and provided architectural guidance for large customers throughout the NY & NJ metro area. He lives with his family in central New Jersey and loves kayaking and biking at the Jersey Shore. Visit peter's blog at http://blogs.msdn.com/peterlau

Date: 
Thursday, August 21, 2008

Time: 
Reception 6:00 PM , Program 6:15 PM

Location:  
Microsoft , 1290 Avenue of the Americas (the AXA building - bet. 51st/52nd Sts.) , 6th floor

Directions:
B/D/F/V to 47th-50th Sts./Rockefeller Ctr
1 to 50th St./Bway
N/R/W to 49th St./7th Ave.

posted on Tuesday, August 19, 2008 5:51:30 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Monday, August 18, 2008

You have heard a lot about the ADO.NET Entity Framework over the last few weeks. What you may not have heard about is just how easy the EF makes it to expose your data as a cloud service in ATOM format over the REST protocol. I'll show you just how easy it is to do here.

First open Visual Studio 2008 with SP 1 installed. The EF and "Astoria" (or ADO .NET Data Services) both ship with SP1.

Choose File|New Project and choose ASP .NET 3.5. Name the project NorthwindTestService and hit ok.

image

Go ahead and delete the Default.aspx file and right click on the project and click on "Add->New Item". Highlight "ADO.NET Entity Data Model" and name your model Northwind (or something similar) and click ADD.

image

This brings you to the Entity Framework wizard. Choose to work from an existing database and put in the connection for Northwind (or create it if it does not exist already) and click through the wizard until it brings you to the Choose Your Database Objects dialog. Choose Customers, Orders, and OrderDetails and click finish.

image

OO experts will tell you to rename your objects (to be singular, not plural for starters), but let's leave them the same for now. Next step is to right click on the project and select Add->New Item and select "ADO .NET Data Service."

Give your service a name of NorthwindTestsercvice or something like that. Then Click ADD.

image

The NorthwindTestService.svc,cs file should be open and you have to make two modifications to get your data exposed. There are tons of modifications you can make around permissions and what data to expose, but for now let's just get up and running and expose everything. You need to name your DataService, give it the name of your Entity Diagram that you build in the wizard, in our case it is NorthwindEntities. (By default the wizard names it DatabasenameEntities.) Then add one line of code to set the access for everything in your model ("*") and giving it read access. (If you make this .All then users can read and write.)

namespace NorthwindTestService
{
    public class NorthwindTestService : DataService< NorthwindEntities>
    {
        // This method is called only once to initialize service-wide policies.
        public static void InitializeService(IDataServiceConfiguration config)
        {
         config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
        }
    }
}

Now hit F5. (You may have to turn off IE 6/7 or FireFox's Auto RSS reader off)

The URL should be something like this (maybe a different port):
http://localhost:49230/NorthwindTestService.svc/

And you should see XML in ATOM format like this:

  <atom:title>Default</atom:title>
- <collection href="Customers">
  <atom:title>Customers</atom:title>
  </collection>
- <collection href="Order_Details">
  <atom:title>Order_Details</atom:title>
  </collection>
- <collection href="Orders">
  <atom:title>Orders</atom:title>
  </collection>
  </workspace>
  </service>

Now the fun starts. Let's look at the customers:

http://localhost:49230/NorthwindTestService.svc/Customers

You will see a list in ATOM format of all the customers in your Customers table. Now look at just one customer:

http://localhost:49230/NorthwindTestService.svc/Customers('ALFKI')

Now all the orders for that customer (careful it is case sensitive):

http://localhost:49230/NorthwindTestService.svc/Customers('ALFKI')/Orders

Now one order:

http://localhost:49230/NorthwindTestService.svc/Customers('ALFKI')/Orders(10643)

You get the idea. You can even filter inside of the URI with some rudimentary WHERE clauses.

Now you can also bind this data via client side JavaScript to a GridView, a SilverLight Grid, or a 3rd party control like Telerik's RAD Grid.

posted on Monday, August 18, 2008 4:10:17 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [2] Trackback
# Friday, August 1, 2008

One month from today I leave for my 4th trip to Nepal and my second trip to Mt. Everest Base Camp. I am the expedition leader (wow!) and we will climb up Kala Pattar (19,000') in route. I helped raise money for charity on this trip (over $12,000 raised for computers for inner city schools) and will be blogging about the trip for the kids from Nepal.

I am off for a week of training in South America at altitude (and some R&R too). Back blogging in mid-August. Stay tuned...

posted on Friday, August 1, 2008 8:25:49 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [1] Trackback
# Sunday, July 27, 2008

This week is the meeting of the Data Programmability Group's Advisory Council. I'll be headed out to Seattle to participate in a conversation with the Data Programmability team on the next version of Microsoft's data access strategy, including the Entity Framework.

Roger Jennings today pointed out that my dismissal of ORM in general led him to wonder why I was chosen for the Data Programmability Group's Advisory Council. My pal Julie Lerman emailed me a few months ago asking "I did not know you were a DDD guy?"

I was glad that Danny Simmons asked me to be on the council since I have participated on several data access councils at Microsoft over the years (Including one with Roger Jennings about 11 years ago.) I've watched Microsoft move from ODBC, DAO, RDO, ODBCDirect, OLE DB, ADO.NET and now to a more conceptual model.

Sure I am not a true DDD guy and I do tend to dismiss ORM in general, so my views will insert a different view point into the conversation. Why have a council that is all the same? The whole point of this conversation is to have a dialog and listen to each other (and learn from each other.) By discussing our use cases with Microsoft, we can help them make better design decisions, and refine our own views. Anything else is just dogma.

posted on Sunday, July 27, 2008 10:35:40 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Saturday, July 19, 2008

We had our first (annual?) speaker idol contest at our user group this week and it went great. I was a judge in a few of the Tech*Ed speaker idols in the past so I knew the ropes and just followed what the pros did at our user group. I did not realize, but that experience really made a difference since ours went off with out any major problems.

Mark Feedman who runs a few (awesome) User Groups up in Stamford, CT was at our meeting and took great notes since he wants to do it at his groups. He came up with a valuable resource for User Groups (and Speakers) wanting to do this event. Read it here.

posted on Saturday, July 19, 2008 12:49:58 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Friday, July 18, 2008

Thursday, July 31, 2008
Special Meeting:
.NET Framework Team Presents VS'08/.NET Framework 3.5 Service Pack 1

Subject: 
You must register at https://www.clicktoattend.com/invitation.aspx?code=130081 in order to be admitted to the building and attend.
***There is a limit of 100 attendees so register now!***

This is a special treat! The .NET Framework team, in town to brief the press on the impending release of SP1, will pay a visit to us and brief us as well.
Key topics to be presented include improvements for building Web 2.0 apps, specifically focusing on ASP.NET Dynamic Data, and additions to ASP.NET AJAX (which now provides support for managing browser history), and ADO.NET Data Services. Also discussed will be The Entity Framework/Entity Data Model and improvements to WPF.
Please note: this meeting will be held in the "Radio City" conference room and not our usual location of the Central Park multi-purpose room.

Speaker: 
Shanku Niyogi, Microsoft
Shanku Niyogi is Product Unit Manager for the .NET Framework at Microsoft. Shanku is a direct report of Scott Guthrie, Corporate Vice President, .NET Developer Division.

Date: 
Thursday, July 31, 2008

Time: 
Reception 6:00 PM , Program 6:15 PM

Location:  
Microsoft , 1290 Avenue of the Americas (the AXA building - bet. 51st/52nd Sts.) , 6th floor

Directions:
B/D/F/V to 47th-50th Sts./Rockefeller Ctr
1 to 50th St./Bway
N/R/W to 49th St./7th Ave.

posted on Friday, July 18, 2008 11:34:34 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Tuesday, July 15, 2008

My view of FireFox 3.0, about 10 times a day.  Still waiting for a service pack...

ff30
posted on Tuesday, July 15, 2008 10:54:18 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Monday, July 14, 2008

Thursday, July 17, 2008
"Speaker Idol" Competition

Subject: 
You must register at https://www.clicktoattend.com/invitation.aspx?code=129952 to be admitted to the building
Five technical presentations, with a panel of judges including Mary Jo Foley
1. Zino Lee: Introduction to F#
We will see what F# is and what features/differences there are between F# and "imperative" languages like C#
2. James Curran: Castle Monorail
MonoRail is a MVC framework for Web Development inspired by ActionPack. It is part of the large Castle Project which includes the Windsor IoC container and the ActiveRecord data mapper.
3. John Carnevale: Upgrading Legacy Code
Learn how to read the code and determine a path of action to be taken with the code upgrade. See how to evaluate what could be upgraded, what to rewrite and when to start all over from scratch.
4. Bill Fugina: Arithmetic in Generic Classes
Bill will show some examples of the benefits of doing arithmetic in generic classes and some utility classes and interfaces that make it extremely easy to do so
5. Gerardo Arevalo: Casual and More Hard-Core WCF
In his demonstration, Gerard is going to quickly build a pair of WCF client applications to demonstrate the use of the MVP design pattern to guarantee a contract with the clients and facilitate unit testing

Speaker: 
Zino Lee has been working on wall street investment banks for the past 12 years, and doing .NET for 4 years. Currently the VP and manage a group that takes care of all GUI work for a trading desk. In graduate school at NYU James did some OCaml work when F# project started.
James M. Curran is a Senior Developer at BarnesAndNoble.com and as a hobby, the Owner/Operator of NJTheater.com which is being converted into a MonoRail based site (under-development version viewable at www.njtheater.org). Previously, he was a Microsoft MVP for VisualC++.
John Carnevale is working at Purvis systems stationed at the FDNY converting legacy code to .NET for the Starfire system.
Bill Fugina works as a software developer for Coleman Insights, a music industry market research company in Research Triangle Park, North Carolina. He visits the office three or four days each month and otherwise telecommutes from his home office in Windsor Terrace, Brooklyn.
Gerardo Arevalo is relatively new to the New York (Tri-State) area. He is from El Salvador, lived in North Florida, then packed up for the North East to be closer to the techno

Date: 
Thursday, July 17, 2008

Time: 
Reception 6:00 PM , Program 6:15 PM

Location:  
Microsoft , 1290 Avenue of the Americas (the AXA building - bet. 51st/52nd Sts.) , 6th floor

Directions:
B/D/F/V to 47th-50th Sts./Rockefeller Ctr
1 to 50th St./Bway
N/R/W to 49th St./7th Ave.

posted on Monday, July 14, 2008 2:43:50 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback