Posted by
admin on
8/25/2009 10:43 AM |
Comments (0)
I’m building apps on top of asp.net 4.0 ajax preview 4, and it’s pretty cool. The name is a bit of a misnomer, since you can use all of the client-side ajax functionality without asp.net 4.0 at all. In fact, I’m using the client-side templating abilities by calling in to an asp.net mvc app that returns json results. Here’s a link to the preview bits.
http://www.codeplex.com/aspnet/Wiki/View.aspx?title=AJAX&referringTitle=Home
I’ll have more up in a bit, as soon as I can write a demo for it!
bff27904-9944-46bd-8a82-03d6427c494a|0|.0
MSDN help is the most frustrating creation ever. Even when it really does answer the “what”, it almost never answers the “why”. In this case, I’m working with Linq to SQL. I’m using the repository pattern and passing in a read-only or read-write datacontext depending on the situation. I’m making a datacontext read-only by setting ObjectTrackingEnabled=false. Here’s the MSDN article on ObjectTrackingEnabled.
http://msdn.microsoft.com/en-us/library/system.data.linq.datacontext.objecttrackingenabled.aspx
Here is the key sentence:
“If ObjectTrackingEnabled is false, DeferredLoadingEnabled is ignored and treated as false. In this case, the DataContext is read-only.”
Ok. I get that ObjectTrackingEnabled=false by necessity makes the context read-only. After all, if you’re not tracking changes, how do you know what to update? What I don’t understand is why DeferredLoadingEnabled gets set to false as well? If I have the following object model:
Order –> Status
I want to be able to have status lazy load when I do something such as reference the status description, like so:
Order.Status.Description <= This *should* lazy load the Status object
Why, oh why, can’t I still get lazy loading with a read-only datacontext? The Status object could simply be loaded with the same read-only context, couldn’t it? Someone at MS made this decision. But I have absolutely no idea how to find out the reasoning behind it. What I do know is that retrieving the status description in the example above has to be written two different ways now depending on my scenario. Ugly…
43093f7e-4212-45d3-9134-3176591dbf67|1|5.0
I’m a Microsoft Action Pack Subscriber. Being in the partner program provides sales and training resources, and also provides internal-use licenses for Microsoft software. It’s a great way to eat the Microsoft dogfood that you’re recommending to your customers. It lets you tell the pros and cons of MS software from experience, not just from sales slicks.
By passing a pretty easy online test, you can also get the software in the “Web Solutions Toolkit”. This additional software includes Visual Studio Standard and the Expression suite. Here’s where the frustration comes in. I was going to create a prototype Windows Mobile app for a customer of mine. I’ve written WM apps in Visual Studio 2005 Standard before with no issues. I’ve since moved to VS2008, of course, specifically the standard version in the MAPS kit. So, I fired up VS, went to the C# project types, and looked for the “Smart Device” projects. Imagine my surprise when it wasn’t there. I figured I was missing an SDK or something, so I downloaded and installed the latest CF 3.5 SDK and Emulators. Still no dice. It was only after doing some Binging that I came upon this thread on MS’s forums. I couldn’t believe my eyes! From VS2005 to VS2008, Microsoft actually made it *harder* to create WM apps. I found another thread on the partner forum, and saw a response from a MS Partner representative, confirming all of this (here’s the link to the thread, but it’s secured).
“Hi Tony,
Thank you for the post. I am afarid we have only Visual Studio 2008 Standard Edition included in the Web Solutions Toolkit currently. However, we appreciate your valuable advice and I will forward your feedback to the concerning team for their reference. Hope Visual Studio 2008 Professional Edition can be made available in the future. ”
I proceeded to add my response to the thread.
“I have to add another +1 to this thread. It's absolutely amazing that even partners can't use the provided software to develop Windows Mobile apps. How can we convince our customers to extend their LOB apps to WM if we can't even create prototype apps to show them? That's what I was about to start doing tonight for a customer (I have previously written WM apps with VS2005 with no issues) when I ran into this showstopper. I'm not paying $500+ for an upgrade to Pro just to convince a customer of the merits of WM development. The whole point of the MAPS was to give us the software we need for just this purpose.
I'm very disappointed!
John West”
My response pretty much sums it up. MAPS is all about giving us the tools to convince our customers that they should use MS software. I’m a firm believer that MS does make the best software, and has the best overall software ecosystem, for businesses. It’s not perfect, and doesn’t suit all scenarios, but it’s the best fit for most. So when I’m not given the tools to prove this to the customers I serve, I get upset. Come on, MS, help us out. We *want* you to compete with the iphone by showing customers that WM also has a good app dev story. We can’t do this when you make it so difficult. Give us the tools we need, and let us help our customers, and, as a byproduct of wanting to help those customers, help you!
69652563-f8cb-4b82-ad83-cecb304b46b1|0|.0