|
|
Browse by Tags
All Tags » Microsoft .NET (RSS)
-
Someone on the CSLA .NET discussion forum recently asked what new .NET 3.5 features I used in CSLA .NET 3.5. The poster noted that there are a lot of new features in .NET 3.5, which is true. They also included some .NET 3.0 features as "new", though really those features have now been around for 15 months or so and were addressed in CSLA .NET 3.0. CSLA .NET 3.0 already added support for WCF, WPF and WF, so those technologies had very little impact on CSLA .NET 3.5. My philosophy is to use new technologies only if they provide value to me and my work. In the case of CSLA .NET this is extended slightly, such that I try to make sure CSLA .NET also supports new technologies that might be of value to people who use CSLA .NET. While .NET 3.5 has a number of new technologies at various levels (UI, data, languages), many of them required no changes to CSLA to support. I like to think this is because I'm always trying to look into the future as I work on CSLA, anticipating at least some of what is coming so I can make the transition smoother. For example, this is why CSLA .NET 2.0 introduced a provider model for the data portal - because I knew WCF was coming in a couple years and I wanted to be ready. Since CSLA .NET already supported data binding to WPF, Windows Forms and Web Forms, there was no real work to do at the UI level for .NET 3.5. I actually removed Csla.Wpf.Validator because WPF now directly supplies that behavior, but I really didn't add anything for UI support because it is already there. Looking forward beyond 3.5, it is possible I'll need to add support for ASP.NET MVC because that technology eschews data binding in favor of other techniques to create the view - but it is too early to know for sure what I'll do in that regard. Since CSLA .NET has always abstracted the business object concept from the data access technique you choose, it automatically supported LINQ to SQL (and will automatically support ADO.NET EF too). No changes required to do that were required, though I did add Csla.Data.ContextManager to simplify the use of L2S data context objects (as a companion to the new Csla.Data.ConnectionManager for raw ADO.NET connections). And I enhanced Csla.Data.DataMapper to have some more powerful mapping options that may be useful in some L2S or EF scenarios. LINQ to Objects did require some work. Technically this too was optional, but I felt it was critical, and so there is now "LINQ to CSLA" functionality provided in 3.5 (thanks to my colleague Read More...
|
-
I have a question (helping a colleague do some research) for all .NET VB developers. Do you use late binding in VB? If so, how/why do you use it? What are the scenarios where you find it of value? I'll start this off with my own observations: I use late binding when getting data of a given shape from unknown types. For example, you can write a nice bit of reusable data access code that accepts data from a web service, LINQ object, etc. by using late binding. You can’t easily do this without late binding in fact, because the types of the objects are different even though their shapes are the same. That dynamic interface concept that got dropped from VB9 would address this issue in a better way, but late binding makes it work too. I also use late binding when creating some generic types. There are cases where generics and casting are problematic, but converting a value to type Object first allows you to do a cast or operation that wouldn’t otherwise be allowed. I don’t know if this is “late binding” as such, but it is a useful technique! I have used late binding when dynamically loading an assembly for interaction. Ideally you’d require the assembly author to implement one of your interfaces, but that’s not always possible, and late binding is a particularly nice way to get “polymorphic” access to multiple assemblies that you don’t control. What about you? For more information go to www.lhotka.net . Read More...
|
-
Multithreading and Concurrency Software Transactional Memory Part IV - Thread-Bound Transactions Software Transactional Memory Part V - Integration with System.Transactions Parallel LINQ Restating the Concurrency Problem Herb Sutter is starting a new column on Effective Concurrency Shared nothing parallel programming \ Software Design/Smart Clients/CAB/Web Clients Using NUnitAsp to test Pages w/Forms Authentication Build your own CAB #12 - Rein in runaway events with the "Latch" Build your own CAB #13 - Embedded Controllers with a Dash of DSL A whole pile of goodness taking CAB forward from the folks at SCSFContrib . which includes A full implementation of the UI layer for CAB done in WPF with 100% code coverage in tests!! (see Bill's post ) WCF/SOA ChannelFactory Behaviors David Chappell declares the REST vs. WS-* War over . Here's hoping Orcas/LINQ ScottGu continues his excellent series with LINQ to SQL (Part 4 - Updating Our Database) ADO.NET Entity Framework The ADO.NET Entity Framework June 2007 CTP is now available. See the team blog for changes Ruby/Subversion My team-mate Steve points to some great resources on the Beauty of Ruby as well as finding a Web-based Subversion Browser Other Link Blogs Interesting Finds: July 10, 2007 PM Edition Daily Grind 1182 Technorati Tags: CAB , Ruby , Concurrency , Microsoft .NET , Software Transactional Memory , PLINQ , NUnitASP , Software Design , Design Patterns , Ruby on Rails , Subversion Read More...
|
-
Slim pickings today. CLR/.NET Scott Hanselman provides advice on how to partition your app and figuring out the right number of assemblies/libraries WCF/BizTalk Services/WCF Dennis points out that he and John Shewchuk recorded a channel9 video that describes the why and what of BizTalk Services. Its now online here: http://channel9.msdn.com/showpost.aspx?postid=317646 Durable Instance Context sample (via Harry ) Windows Vista Running a dual-monitor setup with Windows Vista Resharper/Software Development Tools Took goodness Jeff Palermo found a hack to make Ctrl-N type discovery work properly (speed up!) in Resharper. Ctrl-N I am finding, is one of the keys to success with Resharper. Technorati Tags: CLR , Microsoft , Microsoft .NET , New and Notable , WCF , Windows Communication Foundation , BizTalk Services , Resharper , Windows Vista Read More...
|
-
Earlier I blogged about the fact that the Orcas Beta 1 VPC image doesn't have ASP.NET set up with IIS, so you have to do that. Unfortunately there are a couple other issues I've discovered. Here's the full list: IIS isn't configured for ASP.NET Windows authentication isn't enabled for the default web site in IIS - blocking the use of VS debugging until you enable it The default for a VS Orcas web site is to build for .NET 3.5. If you attempt to debug such a project (when it is set to run in IIS) you'll get an error dialog with a vague message about an authentication error. The reason for this is that ASP.NET only supports .NET 2.0. To resolve this, you must go into the web site's properties dialog and set its target .NET version to 2.0. You can still reference the 3.0 and 3.5 assemblies and use the new features, but VS must build to .NET 2.0 or you can't debug in IIS. But it isn't just the debugger - other features may not work properly either, possibly resulting in a "hang" when you try to access a page. For those of you at my workshop at VS Live this past Sunday, this was why my web site wouldn't run properly in the VPC. Fortunately there is this workaround, but I hope Microsoft provides a more comprehensive solution in the release version, because it is quite confusing to have to set your build version back to 2.0 even though you are really building against 3.5... For more information go to www.lhotka.net . Read More...
|
-
Aaron Erickson , a Magenic consultant, has been working on an interesting project: providing an indexing service for LINQ. You can get full information about i4o from this blog post , and from the official codeplex site . You might wonder why this matters, given that LINQ uses database indexes to get its data. But that's actually Dlinq , which runs against SQL Server. LINQ itself runs against objects, arrays, collections, lists and so forth. All of which are just in-memory objects, and obviously aren't indexed at all. LINQ does "table scans" against arrays and lists at all times. Basically LINQ just runs a lot of for-each loops for you. And in the vast majority of cases that is the right answer, because most lists are only a few score or maybe a few hundred items in length, and using for-each is faster than building an index. However, you might have lists that are big enough, or where you are doing many repeated queries against the same set of properties, where the cost of building an index is lower than the cost of using simple for-each loops. And this is where the ability to index properties of the objects in a list such that LINQ uses the index becomes very useful. In any case, check out i4o, because it is interesting and very cool stuff! For more information go to www.lhotka.net . Read More...
|
-
I just spent more time than I care to think about chasing down a silly config error in the Visual Studio codename "Orcas" Beta 1 VPC image. I wanted to run a pre-existing web site, so I copied it to the VPC, aimed a virtual directory at it in IIS and BOOM! 404 errors. I figured it was directory permissions, incorrect paths, all sorts of things. Eventually, in frustration I opened VS and created a new ASP.NET web project at localhost/test. Guess what? VS kindly informed me that ASP.NET wasn't enabled for IIS on this machine, and asked if I'd like to enable it. Of course I said yes - and instantly my pre-existing web site started working. So if you decided to use the Beta 1 VPC (which is a nice way to go), be aware that ASP.NET is not enabled for IIS, and you'll need to enable it before doing any work with ASP.NET or WCF. For more information go to www.lhotka.net . Read More...
|
-
String formatting in .NET is a pain. Not that it has ever been easy - even COBOL formatting masks can get out of hand, but there's no doubt that the .NET system is harder to grasp and remember than the VB 1-6 scheme... I just had a need to format an arbitrary value using a user-supplied format string. You'd think that obj.ToString(format) would do the trick. Except that System.Object doesn't have that override of ToString(), so that's not a universal solution. So String.Format() is the obvious next choice, except that I need to somehow take a format string like 'N' or 'd' and make it into something valid for String.Format()... Brad Abrams has some good info . But his problem/solution isn't quite what I needed. Close enough to extrapolate though: outValue = string .Format( string .Format( "{{0:{0}}}" , format), value);> Given a format string of 'N', the inner Format() returns "{0:N}", which is then used by the outer Format() to format the actual value. For more information go to www.lhotka.net . Read More...
|
-
I've been working with the Visual Studio Orcas CTP from March 2007 for a few days now. My focus had been around WCF and WPF and ensuring my CSLA .NET 3.0 development worked in the new CTP. Then earlier today I tried building a workflow. And the workflow designer wouldn't open. Instead I got a concise little error dialog saying " Microsoft.VisualStudio.Shell.WindowPane.GetService(System.Type) ". This was the case with both C# and VB projects. Worse, attempting to close VS after that point caused a complete VS crash. It turns out that other designers (like project properties) fail as well, with similar errors. In talking to some people at Microsoft, I discovered that the problem wasn't universal. But in talking to more people, the root of the issue appeared. I downloaded the huge 9 part VSTS/TFS edition of the Orcas VPC. Other people downloaded the smaller 7 part VSTS-only edition. The problem only occurs in the big 9 parter, and is due to a side-by-side issue. Some VS 2005 components are in the bigger VPC to support SQL Server, and they are causing the issue. The 7 part VPC doesn't have that functionality, or those components, and so the SxS problem doesn't occur. So I'm about 80% done downloading the 7 parter, then I can get back to work. For more information go to www.lhotka.net . Read More...
|
-
According to this blog post by Soma , WinFX is now going to be named .NET 3.0. Now on one hand this makes sense. There's no doubt that WinFX introduces major functionality to .NET. Windows Presentation Foundation is the effective successor to Windows Forms after all - how much more major can you get?? On the other hand, the new .NET 3.0 doesn't break any .NET 2.0 code, and yet it "includes" .NET 2.0. All .NET 3.0 does is add new stuff. Typically, when I think of a major version number changing, I expect that I'll have to retest everything and that much of my stuff might break or be affected. None of that is happening here. Even changing from .NET 1.0 to 1.1 brought tons of headaches (if you used Remoting or Enterprise Services at least). And that was a point release. Yet here we have a major version change that doesn't change any existing bits. I guess it just goes to show that there are no hard-and-fast rules in the software industry ;) In any case, there's no doubt that Microsoft will reduce confusion overall by keeping everything under the .NET moniker, so I think this is a wise move. For more information go to www.lhotka.net . Read More...
|
-
I just got back from Norway (so my body has no idea what time it actually is right now...), and one of the conversations I had while there was about data binding a TextBox to an object's property that is a Nullable<T> - like Nullable(Of Integer) or something. Somehow I had expected that Windows Forms would have anticipated this (obvious) concept and would handle it. Not so... Fortunately, as a result of this conversation, one of the people at the conference took some of the ideas we were tossing around and came up with an extender control to address the issue. Very nice! For more information go to www.lhotka.net . Read More...
|
|
|
|