Popular tags (# posts in brackets)
Anonymous types (3) ASP.NET (5) C# (3) C# tricks and tips (2) Computers (6) Design patterns (3) DomainDataSource (3) Dynamic data (4) Entity framework (3) Entity model framework (5) F# (3) LightSwitch (12) Linq (6) Microsoft (2) MVP (2) MVVM (2) Project Euler (2) RIA services (5) Silverlight (2) SQL Server (4) Unit testing (4) Visual Studio (7) WCF (3) WPF (3)
Gratuitous link to StackExchange
|February, 2016 (7)
|January, 2016 (1)
|June, 2015 (1)
|March, 2015 (1)
|January, 2015 (1)
|December, 2014 (1)
|November, 2012 (1)
|October, 2012 (1)
|June, 2012 (1)
|May, 2012 (1)
|March, 2012 (3)
|December, 2011 (1)
|November, 2011 (1)
|October, 2011 (1)
|September, 2011 (3)
|August, 2011 (2)
|July, 2011 (5)
|June, 2011 (1)
|May, 2011 (3)
|February, 2011 (2)
|January, 2011 (1)
|December, 2010 (2)
|October, 2010 (2)
|September, 2010 (2)
|August, 2010 (4)
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
Actually, as I'm self-employed, I guess that means that any views I expressed here aren't my own. That's confusing!
Theme modified from one by Tom Watts
C#/F# code styling by Manoli (for posts pre-2016) and Google code prettify (for post from Jan 2016 and beyond)
My rambling thoughts on exploring the .NET framework and related technologies
Tuesday, 26 October 2010
Well, after realising (or even RIAlising if you like puns) that RIA services weren't cut out for non-Silverlight clients, I went searching for The Next Big Thing. Can't remember if I mentioned it, so I'll bore you by repeating it, but all of this investigation is for a big project I'm in that will need some sort of central data access point that can be used by all sorts of clients, most likely being WinForms, WPF (one of my colleagues is really excited about WPF), ASP.NET and Silverlight. Ideally, we want all of these to be able to use the same point of access for data, with the business logic behind that point of access.
RIA looked like the answer, but doesn't seem to play ball with anything other than Silverlight. So, I went looking at its big brother WCF. The idea was to build an end-to-end solution that had a WCF service on top of an entity framework model, and various clients consuming the service.
This posts describes my initial excitement, great disappointment and final happiness (so far) with consuming a WCF service in WinForms, ASP.NET and Silverlight.
Tuesday, 12 October 2010
Avid readers (if there are any!) may remember my recent post in which I extolled the virtues of the DomainDataSource control, and how it enabled us to use RIA services in ASP.NET sites. Well, having bashed my head against the wall for a week or so trying to get RIA services working with ASP.NET, I have decided that the support for this is actually quite limited, and not enough to make it a viable option.
This post gives more details of my exploration, discoveries and eventual disappointment at the conclusion.
Sunday, 19 September 2010
Well, having posted about my excitement over discovering ASP.NET Dynamic Data (ADD), I spent the last couple of weeks digging deep into it, and have eventually come to the conclusion that it was a great idea, but ultimately of little use. I mentioned a few misgivings in that previous post, and I've added a few more to the list. All in all, I don't see me using this technology much.
Having spent so much time on it, I had about ten blog posts in my head, explaining what I'd learnt, but I guess they stay in the recesses of my mind until they fade away into synaptic relapse.
This post explains why I'm moving on.
Monday, 06 September 2010
I recently discovered Microsoft ASP.NET Dynamic Data(or ADD for short). I know, some would say I'm slow off the mark, but I never have time to keep up with all the new technologies MS are putting out. Anyway, this one looked interesting, so I decided to devote some time to investigating it. I must say I was (to quote the vernacular), somewhat gob-smacked by it! One of the reasons it took me so long to get around to looking at this was that MS seem to have forgotten to promote it. Even the Dynamic Data section of the www.asp.net web site (when you can find it) doesn't really tell you what it's about. One look at that would be enough to make me yawn and go somewhere else.
If you've written any reasonable sized database-driven web sites, then you'll know that the painful bit is writing a whole pile of administration pages so that the site owner can maintain the site. You end up doing almost exactly the same thing over and over again. When you've done it for the 97th time, you really wonder why there isn't a better way.
Well, now there is - maybe. Enter ASP.NET Dynamic Data. Now you can have a fully-featured CRUD web site in seconds (no, not an exaggeration).
In this post, I explain what it's about, and why you should have a look.
Wednesday, 18 August 2010
As I mentioned in my post about the DomainDataSource control (DDS), the same RIA services toolkit that provides the DDS also supplies a validator control called the DomainValidator. As this provides such a useful piece of functionality so easily, I thought it was worth a quick post about it.
Using the DomainValidator control, you can add validation to your ASP.NET pages really quickly and easily, and preserve the n-tier structure of your application - something you coudln't do with the regulat ASP.NET validators.
Tuesday, 17 August 2010
Unlike its predecessors, the DomainDataSource control is a brilliant feature that you can use with RIA services to have code-free access to your data from the ASP.NET page - without sacrificing the structure of your application.
Previous data controls required data access code in the control, so you ended up with SQL in the presentation layer. Not a good idea. The DomainDataSource control doesn't do this, and is a vauable addition to your ASP.NET/RIA services toolbox.
This post explains what the control is, and shows how to use it.
Sunday, 15 August 2010
RIA services are a great way to access your data from ASP.NET pages, but out of the box, they provide limited access to data not directly in the entity object itself. For example, an Action entity object (that holds information about an action that a user must do) will hold the ID of the user who has to do the action, but won''t hold the name of the user.
This post explains how you can extend the objects RIA passes back, without having to create new ones, or jump through hoops to do such a simple requirement. It also shows how to modify the Linq to include the information you want.
Sunday, 15 August 2010
Anonymous types are a common occurrence when using Linq queries, as you often return objects that don't correspond exactly to objects in the entity model.
The problem is that these anonymous types can only be used easily in the same code block as the one in which they were created. If you try and pass them into another block, or retrieve them in a data event of an ASP.NET Repeater control, you'll run into problems.
This post shows how to get around this problem quite easily, and how to give yourself strongly-typed entity objects that can be passed around.