- Posted by Ian Suttle on November 29, 2007
- Filed under .NET 3.5 | ASP.Net | AJAX | .Net Framework
Scott Guthrie has announced ASP.NET 3.5 Extensions public preview will be released next week sometime. This is really a big hitter people have been clammoring about... MVC, Entity Framework, Astoria, and more!
After stumbling upon it on a MS labs site I've been following Astoria for a few months now. An Astoria overview describes its purpose better than I can:
"The goal of Astoria is to facilitate the creation of flexible data services that are naturally integrated with the web. As such, Astoria uses URIs to point to pieces of data and simple, well-known formats to represent that data, such as JSON and plain XML. This results in the data service being surfaced to the web as a REST-style resource collection that is addressable with URIs and that agents can interact with using the usual HTTP verbs such as GET, POST or DELETE."
... using a REST-style request to get XML or JSON formatted data in a .NET Framework sanctioned way is just what the doctor ordered. Here's a sample request and output:
Request: http://myserver/data.svc/Customers[ALFKI]
XML:
DataService xml:base="http://myserver/data.svc">
<Customers>
<Customer uri="Customers[ALFKI]">
<CustomerID>ALFKI</CustomerID>
<CompanyName>Alfreds Futterkiste</CompanyName>
<ContactName>Maria Anders</ContactName>
<ContactTitle>Sales Representative</ContactTitle>
<Address>Obere Str. 57</Address>
<City>Berlin</City>
<Region />
<PostalCode>12209</PostalCode>
<Country>Germany</Country>
<Phone>030-0074321</Phone>
<Fax>030-0076545</Fax>
<Orders href="Customers[ALFKI]/Orders" />
</Customer>
</Customers>
</DataService>
JSON:
[
{
__metadata: {
Type: "Customer",
Base: "http://myserver/data.svc",
Uri: "Customers[ALFKI]"
},
CustomerID: "ALFKI",
CompanyName: "Alfreds Futterkiste",
ContactName: "Maria Anders",
ContactTitle: "Sales Representative",
Address: "Obere Str. 57",
City: "Berlin",
Region: null,
PostalCode: "12209",
Country: "Germany",
Phone: "030-0074321",
Fax: "030-0076545",
Orders: {
__metadata: {
Uri: "Customers[ALFKI]/Orders"
}
}
}
]
- Posted by Ian Suttle on November 27, 2007
- Filed under Books | .Net Framework
A couple of months ago I purchased Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries (Microsoft .NET Development Series)
by Krzysztof Cwalina and Brad Abrams. There have been some mixed review on the style in which this book was written so here's my opinion: I recommend it.
The writing style is interesting... basically the authors put together their chapters and sections, then shared their writings with a select few coworkers at Microsoft. The coworks provided responses to the recommendations and it's all documented in this book. So you don't just get one lonely opinion; you may get four or five, all of which may be a bit different, and all of which are from qualified individuals! I love that!
The other day I was working on improving download security for Direct2Drive and I wanted to throw exceptions if various cases occurred such as not logged in, lack of permissions, etc... fairly typical right? The question I kept asking myself is if I wanted to throw custom exceptions or those already existing in the framework. I went to the book to see what it had to say and got a pretty clear answer... if the exception fits, wear it, or something like that. My gut told me that was the right answer, and the authoritative text confirmed it.
Sections of Framework Design Guidelines include: Qualities of a Well-Designed Framework, Framework Design Fundamentals, Naming Guidelines, Type Design Guidelines, Member Design, Designing for Extensibility, Exceptions, Usage Guidelines, Common Design Patters, Coding Style Conventions, and a piece on FXCop.
I'm buying copies for everyone on my team. It's a great reference.
Check out Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries (Microsoft .NET Development Series)
on Amazon.
- Posted by Ian Suttle on November 26, 2007
- Filed under Open Source | Social Networking
I'm having a dilemma... an OpenSocial host should conform to a standard set of data (title, id, updated), but there's nothing saying they won't add additional data (site specific, biz card) through added namespaces. From a wrapper point of view I don't know if there will be custom data or not, yet certainly an implementation of the wrapper may want some of this custom data. Do I only concern my efforts with the minimum, standard data, or would it be better to have custom types containing the custom data? If custom types is the right answer (or preferred answer) do we simply support the big names (MySpace, Orkut, Ecademy, etc)?
At the moment I'm only worrying about basic data. I'm probably getting ahead of myself as OpenSocial data APIs aren't even released yet. If you have any feedback on this idea please let me know!
- Posted by Ian Suttle on November 24, 2007
- Filed under Open Source | Social Networking
I created a release of the OpenSocial.Net C# wrapper available here https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=OpenSocial&ReleaseId=8591. For non-release specific wrapper info check out http://www.codeplex.com/opensocial.
This release includes a basic People data API. I've added the sample web project to the release and have it available for preview at http://www.iansuttle.com/opensocial. If you have a chance to check it out feel free to discuss or report issues at htt://www.codeplex.com/opensocial.
If you're interested in helping out with this project let me know!
- Posted by Ian Suttle on November 19, 2007
- Filed under .NET 3.5 | Visual Studio
I wanted to share my experience of going from Visual Studio 2008 Beta 2 to the RTM. Scott Guthrie recommends uninstalling Visual Studio 2008 Beta 2, .Net Framework Beta 2, and Visual Studio Web Authoring Component. When I uninstalled VS it seems to have taken the framework with it. Typically I wouldn't expect this coupling to occur however in the case of beta and no release license I don't completely excuse that possibility.
I've also uninstalled a few others just to wipe the slate as clean as possible (it's a beta, who knows). Other uninstalls include "MSDN Library for Visual Studio 2008 Beta 2 - ENU", "Microsoft SQL Server Compact 3.5" (and friends), and the "Microsoft .Net Compact Framework 3.5" or at least I think that's what it was called:).
In my opinion the uninstall processes are the most unpolished piece of the whole Beta 2 experience which was fantastic. A number of times the uninstaller would halt due to some program being used. Many times a simple "Retry" would resolve that one.
The install itself went smooth, but again took quite some time... now to find Team Explorer for 2008!
- Posted by Ian Suttle on November 19, 2007
- Filed under .NET 3.5 | Visual Studio
Microsoft has released Visual Studio 2008 to MSDN subscribers. Oddly however, it wasn't listed in my applications tree view. I got to the goods through this page: http://msdn2.microsoft.com/en-us/subscriptions/bb608344.aspx
This is also the first time I've seen Microsoft use Akamai to deliver a file. It's not your standard Microsoft BITS download add-in... maybe FireFox is giving it the bird.
- Posted by Ian Suttle on November 7, 2007
- Filed under Social Networking
I've been giving a fair amount of attention to Google's OpenSocial platform over the past week. Here are some notes on what I've learned so far:
You have to apply to a host before anyone let's you participate. Orkut let me in, but Plaxo didn’t let me participate. They suggested I build my app first, then get back to them. I haven't tried Ning.
The OpenSocial libraries and data are very buggy right now. Google is quick to remind us we're part of a closed beta. I've also read reports of people in different parts of the world having different experience with uptime. For me, I was able to add my test Gadget to Orkut's sandbox environment and have it work, but it wouldn't work as an iGoogle gadget.
I'm also working on an OpenSocial C# wrapper for server side communications which I'll be hosting with CodePlex at http://www.codeplex.com/OpenSocial. It's tough to write against OpenSocial when it's not stable, but I'm a glutton for punishment.
If you'd like, feel free to keep track of my OpenSocial bookmarks.