Philly Code Camp 2010.2 – ASP.NET Track

This year for the ASP.NET Track, at Philly Code Camp 2010.2, there is going to be a heavy focus on getting started with some of the new[er] web technologies, with a couple caveats. In the past we have had a great mix of intro classes and advanced classes, but it really left little room in between for people professionally past the introductory sessions but not really ready to dive in to the advanced sections yet. And almost a rule of thumb for obvious reasons, the intro classes are very well attended, while the advanced topics are rather esoteric and not well attended compared to the intro topics. So this challenged me to think about the sessions we have had in the past and set goals for the ASP.NET track, and this time around: ...

August 22, 2010 · 3 min · 479 words · Nick Berardi

Who Loves Their Developers More

Last night as I was talking with Danny Diaz about the importants of good programming language documentation. It occurred to me that the level of effort a company puts into its documentation is a direct reflection on how it sees the developer in relation to its products. If there is a lot of thought, love, and detail put into the documentation the company most likely cares very much about the developers experience from cradle to grave. If the documentation is haphazardly put together and no common UIX efforts were made then the company most likely cares very little about new developers, and only begrudgingly puts documentation online for its seasoned developers because it is the industry norm and is expected of them. ...

August 17, 2010 · 9 min · 1779 words · Nick Berardi

Philly.NET August 2010 Presentation

August 11, 2010 · 0 min · 0 words · Nick Berardi

With Each Step Forward, Microsoft Takes Two Back

Today I was browsing a Microsoft published document on creating ASP.NET Web Pages using the Razor Syntax and to my surprise I found this gem on page 65. @{ var db = Database.OpenFile("SmallBakery.sdf"); var selectQueryString = "SELECT * FROM Products ORDER BY Name"; } <!DOCTYPE html> <html> <head> <title>Small Bakery Products</title> <style> h1 {font-size: 14px;} table, th, td { border: solid 1px #bbbbbb; border-collapse:collapse; padding:2px; } </style> </head> <body> <h1>Small Bakery Products</h1> <table> <thead> <tr> <th>Id</th> <th>Product</th> <th>Description</th> <th>Price</th> </tr> </thead> <tbody> @foreach (var row in db.Query(selectQueryString)){ <tr> <td>@row.Id</td> <td>@row.Name</td> <td>@row.Description</td> <td>@row.Price</td> </tr> } </tbody> </table> </body> </html> In case you missed it here is the meat of the problem I have with this example: ...

August 9, 2010 · 5 min · 870 words · Nick Berardi

ASP.NET MVC 3 Preview 1 Released

The title says it all, so go get your copy today and check out all the new features. You can download it here. New features include: Razor View Engine Dynamic View and ViewModel Properties “Add View” Dialog Box Supports Multiple View Engines Service Location and Dependency Injection Support Global Filters New JsonValueProviderFactory Class Support for .NET Framework 4 Validation Attributes and IValidatableObject New IClientValidatable Interface Support for >NET Framework 4 Metadata Attributes New IMetadataAware Interface New Action Result Types (HttpNotFoundResultAction and HttpStatusCodeResultAction) Permanent Redirect Support in the controller (RedirectPermanent, RedirectToRoutePermanent, and RedirectToActionPermanent) Looks like this is going to be a very worth while upgrade, and a special thanks should be given to Phil and team for making ASP.NET MVC everything that ASP.NET WebForms isn’t.

July 27, 2010 · 1 min · 124 words · Nick Berardi

Turning JSON into a ExpandoObject

Recently I had the need for a web service of mine to take a JSON blob as an input. This isn’t really exciting or all that interesting a problem, but I really didn’t enjoy the code smell that came from drilling in to the resulting Dictionary object that comes from desterilizing the JSON object into something that .NET understands. public ActionResult Create() { IDictionary<string, object> request; using (var bodyStream = new StreamReader(Request.InputStream)) { var json = bodyStream.ReadToEnd(); JavaScriptSerializer ser = new JavaScriptSerializer(); request = ser.Deserialize<IDictionary<string, object>>(json); } var accountRequest = request["account"] as IDictionary<string, object>; var billingRequest = request["billing"] as IDictionary<string, object>; var billingInfoRequest = billingRequest["info"] as IDictionary<string, object>; var billingInvoiceRequest = billingRequest["invoice"] as IDictionary<string, object>; var billingItemsRequest = billingRequest["items"] as IDictionary<string, object>; // create account var account = new Account { CreatedOn = DateTime.UtcNow, Email = accountRequest["email"] as string, Name = accountRequest["company"] as string, UserName = request["user_name"] as string }; // ... more code using the dictionary object } After remembering that the ExpandoObject was also based on IDictionary<string, object> I thought it might be a marriage met in heaven. ...

July 19, 2010 · 4 min · 657 words · Nick Berardi

Uninstalling Windows Phone Developer Tools CTP

Today I decided to upgrade to the Beta of the Windows Phone Developer Toolkit, however the uninstall process wasn’t working. It kept asking me what I wanted to install every time I choose the uninstall radio button. So after a couple failed attempts at uninstalling in different ways, I decided to go to the source, in my case that was: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Microsoft Visual Studio 2010 Express for Windows Phone CTP – ENU ...

July 12, 2010 · 1 min · 114 words · Nick Berardi

Welcome To Last.io

I wanted to save this historic post for my blog, post number 250, for a special occasion. And I can’t think of a more special occasion than what I am about to announce. Over the past month or so I have been working on a new web application, in my spare time. The goal of the web app was to provide a more usable and accessible interface to a product that I believe has great potential beyond what the publisher originally imagined. ...

June 28, 2010 · 4 min · 831 words · Nick Berardi

Run Cassandra As A Windows Service

One of the main issues that comes up over and over again for Cassandra is: How do I run Cassandra as a Windows Service? In this post I am going to answer that question and in the process demonstrate how to do it in less than 10 minutes. Background Cassandra is mainly developed by Linux developers so very little attention has been paid to the Windows developer or administrator as far as Cassandra goes. So as Windows developers we have to hop through a couple more hoops than just clicking on an install.exe file and and letting it do all the work. However lucky for us, those hoops are easy and quickly hopped through. ...

June 17, 2010 · 3 min · 455 words · Nick Berardi

Using LINQPad to Query Stack Overflow

Update (2010-12-30): I have updated the OData URI locations below, because of a recent move and re-architecture by the StackExchange team. In case you haven’t read, Stack Overflow and the rest of the Stack Exchange sites are now able to be queried using OData. This is great because as Jeff points out in the blog post: …if you just want to play with the data, it’s kind of tedious: you have to download the entire 700 plus megabyte archive, import it into some kind of database system — and only then can you even begin thinking about how to query out the results you’re looking for. ...

June 13, 2010 · 3 min · 431 words · Nick Berardi