by
Kathleen via
Kathleen Dollard
on
7/17/2009 1:44:24 PM
You can check here for a quick description of MEF I'm giving a half dozen MEF talks this summer and I'm frequently asked "what happens if a part isn't available". The old answer was "the system crashes, how could it do anything else?" This conversation definitely deflates the upbeat mood of a MEF talk. Recently, MEF has changed, making that answer obsolete. MEF is a composition container which satisfies imports by tracking down associated exports. The cor ... [ read more ]
|
by
Kathleen via
Kathleen Dollard
on
7/17/2009 12:58:41 PM
A couple of times recently I've wanted a super short summary of what MEF is and why you care. I thought I'd share what I came up with here. MEF stands for Managed Extensibility Framework. MEF allows you to compose parts at runtime to alter application behavior based on the current environment. The most common way to alter behavior is to include dll's in a directory. The most common way to code MEF is through attributes. Both of these decisions are flexible because MEF itself is ex ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
7/10/2009 10:07:16 PM
A few friends have pointed out that my post discussing my disappointment with Workflow 4.0 was somewhere between difficult and incomprehensible if you have no idea what's actually changed. Maurice posted this which gives some additional background.
|
|
by
Kathleen via
Kathleen Dollard
on
6/28/2009 6:34:08 PM
Well, to me it is vastly disappointing. Back in January, I said that I thought Workflow 4.0 would be the most important feature of .NET 4.0. I was completely wrong. WF 4.0 will be a rather uneventful part of the .NET 4.0 release. My initial projection was partly because .NET 4.0 will (thankfully) be a rather quiet release at core with only limited new language features so the competition was never all that steep. But it was also because the WF in the CTP represented an important change to Wo ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
5/7/2009 1:08:11 PM
I got a Twitter on MEF resources, so I wanted to at least post the resources slide for my MEF/MAF talk. My big question, is what else do you want. Do you want more technie stuff on the core, more extensibility details, more stuff on the WPF editor, more on scenarios and value proposition, to know why I think composability is the most important thing since OOP/OOD (yep, I rank it above generics), or something else entirely? I think there's at least a half dozen people trying to get the right ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
4/10/2009 2:29:23 PM
It’s not up yet. You may have noticed. And if you downloaded what we’ve currently got up at AppVenture, you probably noticed that it was nothing like what I discussed on Hanselminutes or DotNetRocks. Why is it delayed? Primarily because I have had a very hard time drawing a line around what should and should not be in the tool. I’m still having a hard time of that, and the first version won’t include everything I want. Also, MEF is a new paradigm. It’s been rough at times to learn to rethin ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
3/18/2009 8:28:03 PM
So much of what I do with technology turns out ten times harder than I think it should be that I’ll admit I walked very softly and fearful of the quicksand when I wanted to implement my own prioritization strategy for MEF parts. In the end, the MEF interaction was dirt simple. For review, MEF has a prioritization strategy. When you are looking for parts, the first export provider that fulfills the request (contract and cardinality) ends the part search process (the GetExport(s) variation). H ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
3/17/2009 4:32:41 PM
First, hugs and kisses to the people at Microsoft that made the decision to include T4 in Visual Studio 2008 instead of having it only available within the separately downloaded DSL toolkit. This indicated an important commitment by Microsoft to T4 and was a really positive step in code generation over all. Thanks guys! I think the option wasn’t to have T4 done right or wrong in VS 2008, but to have T4 done wrong or not to have it. I’m happy the decision to include it was made, but I also thin ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
3/15/2009 3:25:00 PM
I’ve been contemplating how to organize MEF assemblies. I think the processing I did establishing the first cut at organization, and the shake down of that strategy, may be interesting to other people designing MEF systems.
As a quick review, MEF lets you throw parts into a MEF container and sort out how parts work together at runtime. Parts are recognized by a string identifier. I’m almost always using interfaces as the contract and the interface names as the identifiers. Parts ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
3/9/2009 3:05:42 PM
Scott and I sat down at the Rocky Mountain Trifecta 1 to discuss code generation and other fun things. Check out show 170 at www.Hanselminutes.com
|
|
by
Kathleen via
Kathleen Dollard
on
3/8/2009 11:09:21 PM
If you aren’t currently creating T4 templates, skip this post as a rather geeky exploration of something you should never have to touch. Hopefully in another few days you’ll harness to take care of this ickiness. T4 templates should know their own output file name! This is not a function of the host or the harness or anything else. We want to wrap up the responsibility of creating a template in one location (with any redirection necessary by the class to get the job done and support single re ... [ read more ]
|
by
Kathleen via
Kathleen Dollard
on
3/8/2009 6:01:34 PM
Josh said this in the MEF discussion list on CodePlex: MEF is just a composition engine its job isn't really to offer choices for a users. While that is true, it’s not that hard to present choices to users and it gives you a bit of insight into the very powerful strongly typed metadata attributes of MEF. MEF is a tool for matching up parts. Its discoverability is not against the actual class, because that would require too deep a dive into the assembly. Its discoverability is b ... [ read more ]
|
by
Kathleen via
Kathleen Dollard
on
3/8/2009 5:08:27 PM
I'm struggling to get the AppVenture Community Edition Code Generation harness into release because I can't figure out where the boundaries should be. I initially thought I could just reuse my old stuff in the area of data extraction and mapping/morphing, but too much has changed. What's in: Multi-UI supporting core code generation engine Full composability via MEF Configuration driven ordering of automatically discovered templates Template focused generation (templates ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
3/7/2009 2:36:27 PM
At the MVP Summit I had the pleasure to sit down at a party for some one on one time with Don Smith. I’m trying to think of my blog as a nice little corner to talk, rather than a soapbox. I want to make an share something that is not shouted from the rooftops. Eeegads, I don’t want to start another debate on this. A few months ago, the EF team started a wiki where Ward Bell and I felt quite attacked for suggesting that DDD is not always the best approach. And thus, it is with some trepidation ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
3/1/2009 2:36:28 PM
I don’t know the history of the term red herring, but to me it means something you’re looking at thinking it’s the problem, when it’s just not the right problem. I have to return to the red-herring in my recent MEF debugging post. I wasted a lot of calendar time thinking the problem was in MEF. It wasn’t. It was in my code. The biggest hurdle to effective debugging, the biggest time waster, the mind killer of debugging is the red herring. When you are debugging the quickest way to become in ... [ read more ]
|
by
Kathleen via
Kathleen Dollard
on
3/1/2009 2:12:52 PM
I’ve gotten into what feels like a gnarly debugging problem in a MEF application. Debugging MEF can be challenging so I’ll describe the process I went through. Obviously you are unlikely to have an identical problem, but it might help to see the specific questions I asked as I walked through the debugging process. NOTE: This describes a problem with the import process; problems in the composition process have very good error messages. With composition problems, you’ll often get “no expor ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
2/2/2009 6:24:24 PM
I just spent days tracking this one down, so let me try to save someone else the grief. Symptoms : My Silverlight application suddenly started doing a full compiler crashes and brings down Visual Studio crash every time I tried to compile. Cleaning the solution didn’t help. Manually cleaning solution and user files didn’t help. The Visual Studio solution has about fifteen projects. It’s a Silverlight app with the client and server pieces in one solution. I am using mobile objects, meani ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
1/16/2009 4:38:38 PM
In Code Complete Steve McConnell looked at core values for programming some fifteen years ago and came up with this list: Intelligence Humility Curiosity Intellectual honesty Communication and cooperation Creativity Discipline Laziness And two that McConnell said don’t matter as much as you might think: Persistence Experience I’m doing a talk for INETA (see note) called “Rethinking Object Orientation” which looks another book of the time – Grady Booch’s Object Ori ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
1/7/2009 3:39:26 PM
OK, I'm ready to stick my head out here. We just have a CTP and know only a little bit about .NET 4.0, but I'll make a prediction about it's most important feature. First, let's look at the big picture. .NET 4.0 is not going to have any blockbuster changes at its core like the anonymous method support and generics of .NET 2.0. Nor is it going to be the odd bolt on of half finished products that was .NET 3.0. Nor will it be the language frenzy of .NET 3.5. .NET 4.0 is going ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
9/15/2008 3:08:23 PM
Over the last couple of weeks I've had the delightful experience of conversing with one of my heroes - Bruce McKinney who wrote Hardcore Visual Basic. Bruce has been off doing other things - not programming. So from my narrow perspective, it's a bit like talking to he's been in a time capsule. I asked him to let me share this unique and very different perspective on VB.NET: -------------------------------- I hadn’t even thought about VB or any other computer language for years ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
9/5/2008 4:21:48 PM
I love nested classes. You can do elegant thing wit them that otherwise require a ton of code - even if its generated. But the rest of the world seems confused by the syntax. Assuming a class named Budget, we could have Budget.List refer to a class (not an instance). Public Class Budget ' Other Stuff Public Class List ' Stuff End Class End Class Unfortunately, the rest of the world is either confused ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
9/3/2008 9:18:56 PM
I recently touched base with someone from the good old VB6 days. They were good old days, but I’m not going to talk about them. He asked where VB.NET went, and it set off this weird thinking about how to explain VB.NET to someone that had dropped out and was only peripherally interested. I thought I’d share this, but many of you will want to skip. "How is VB.NET doing? … never saw the final product, much less what it has grown into now." I suppose grown is the operative word her ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
8/22/2008 3:28:34 PM
More and more we are becoming mutual support groups for the insanity around us, which also happen to write business apps on the side. I set out a few weeks ago to intertwine a tall strong intelligent business object with a confident and independent business object. Seemed the perfect pairing. While I can’t buy POCO and other things being responsible for common behaviors of business objects, I do have a deep appreciation for provider and injection patterns. It seems fine that the business obj ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
8/1/2008 9:01:01 PM
This is about writing, not .NET so if that is all you care about, you can stop reading. I just received a compliment from my editor that I’m easy to work with on review. I realize this is a process many people don’t understand. I’ve worked with some great editors (including Patrick Meader at Visual Studio Magazine), so I thought I’d take a minute to explain the process. If you hope to write this is likely to help you, and if you already write you might have to apologize to an editor. Regardle ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
7/25/2008 5:20:58 PM
I’ve repurposed this list and thus am making it a new post, linked from the previous. I realize this is long for a blog post, and that it changes too much, so I will be moving it to a page, once I rebuild my site (a great embarrassment). Initially I wanted a quick list of “ways to go wrong” when switching from C# to VB. As it evolved, the line blurred between common mistakes that might make you look dumb to some rather nuanced differences between C# and VB. As Eric Meijer says – VB is not C# ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
7/22/2008 8:20:17 PM
When I wrote the “What a C# Coder Should Know Before They Write in VB” post, I had a log of feedback and conversations around conversions and casting. There are a number of casting and conversion operators in Visual Basic including three general purpose operators: CType: Converts intrinsic types and any other types that have an overloaded CType operator. There is no comparable operator in C#. Throws and exception if the conversion cannot be completed. DirectCast: Forces a cast. This i ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
7/19/2008 4:55:56 PM
NOTE: I've updated this post because it shifted from its different intent, needed a new preamble, etc. You can find it here I just had an e-mail exchange with someone looking for a VB lead in Colorado Springs. I think they are going to have trouble filling it with an existing VB expert, and it occurred to me that someone who had led a successful VB 6 -> C# project could fit the bill, if they knew some key things about VB. I told the recruiter I thought the right person ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
6/25/2008 6:22:39 PM
I’m not taking on the Alt.NET world I’m not taking on the Alt.NET world because I value their contribution. I’m not trying to start any battles or wars. At the same time, I think things need to be said about the attitudes and actions of that community to keep things in perspective and foster more effective dialog across the entire industry. The synergy of the greater Alt.NET world has led to a maturity and cohesion in tools that is very impressive. And I continue to learn from that space as f ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
6/24/2008 10:44:43 PM
I feel I need to respond to the “ Vote of No Confidence ” on the Entity Framework. I have little interest in petitions. They are by nature backwards looking. To get a group of people to sign onto something they have to either understand it or be driven by the charisma of the leaders. In this case, I assume the first. The contents of the petition must be stable and old enough that everyone has worked out the details. That’s the case with all the technical petitions I can think of, although adm ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
6/10/2008 3:57:47 PM
Yes, amazing as it sounds, I probably need to teach you how to use Object Browser. I know, I know, you think you know. Open a project hit F2 or whatever key you have mapped and voila you see Object Browser. Crippled. To use Object Browser in a non-crippled state, you need to do some things that are, let’s pick a word, bizarre, surprising? Open a new instance of Visual Studio 2008. Leave your old one open or close it, it doesn’t really matter. Open Object Browser in this empty instance of VS ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
5/23/2008 5:18:01 PM
I think it’s important to differentiate between a likable user interface and a good one. A user interface can be likable and bad. It can be good and not likable.
I got a comment from my last post that said because someone liked the UI it was good. I disagree. A good UI supports you in all actions, at all phases of learning the program. Because it happens to fit the particular set of features you use now and the state in learning you are in now does not, ever, make an interface a good interfac ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
5/21/2008 8:20:57 PM
I have a hundred (ok dozen) finished not quite ready blog posts. Except it’s hard to finish them because I don’t particularly like saying hard things. Negative things. Some of which will be brutal to people I have enormous respect for and consider friends. I’ll get back to the technical things. It’s just the code gen stuff has been evolving at a background level in real projects and I need to work out verbalizing the core, the best practices of the details. And, my column takes up some of m ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
4/1/2008 4:10:30 PM
The new tools need a new UI. The old one is hopelessly mired in ancient ways of doing things (isn’t that astounding to say about .NET code). To focus on the core features, the UI took a back seat with a temporary UI with lots of shortcuts. Several of these shortcuts were just wrong… One is to organize by template type (core object, child list, readonly object, readonly list, hieararchy) and within this organization include files for editable and handcrafted files. I haven’t converted this proj ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
3/3/2008 2:12:00 PM
Karl on WPF posted this on code generators.
Karl appears to be largely talking about issues within existing MS code generation tools. The underlying problem, is that Microsoft does not have a code generation group that understands code generation from an application perspective and acts as a core resource to demand standard metadata, force Visual Studio support, explore problems like the attribute issue Karl raises and a host of other issues. There’s certainly a team around the CodeDOM ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
2/28/2008 3:56:00 PM
Bill McCarthy added a comment to my blog which I wanted to answer:
So why not use VB for the templates but C# for the initial output rather than some "Nearly VB" . Doesn't C# address every issue you've raised ?
But I am curious as to what about issues that are language specific, such as declarative event wiring, optional parameters etc ?
C# fixes the majority of the issues I raised, except ambiguity in closing brackets. If you assume that the closing ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
2/25/2008 2:12:00 PM
The templates I’ve been talking about require very specific language features of the VB compiler and language neutral templates do not allow any ambiguity in the code output in the initial template.
The template itself must be in VB because it’s required for embedded XML – the code blocks. The code blocks are essential for understanding which code to translate when creating an alternate language template in a pre-processor. Code in strings would be impossible (or nearly so) to translate at th ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
2/19/2008 2:17:00 PM
Mike asks:
Just curious if your metadata also contains validation rules or not? Things like property is required or range of valid values.
It could include them in three possible ways – it currently uses one and I’ve had two others working in the past that may be resurrected.
The metadata that the database inherently knows is automatically transferred - this would be nulls and string length. How well nulls are handled is up to the architecture, but the metadata definitely know ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
2/17/2008 3:08:52 PM
I better say it up front, because it will quickly become obvious. I am not a computer science graduate. I have never written a compiler. It was quite a route to get my thinking in line with this particular problem and I’m sure it will evolve further. As I said in my post on Friday, one part of my solving the VB/C# problem without making unreadable templates is a preprocessor. I struggled with what to call it because the real pattern is – create the VB templates, run the processor to create ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
2/15/2008 4:53:44 PM
I’ve been catching up on blogs and ran across this from Zlatko from Dec. 14. His basic point is that EF is more than an OR/M mapper because it works in a conceptual space between the object layer and the database – creating a third layer. I’m very happy that Zlatko said this. It articulates something I’ve never articulated well. The metadata is not a representation of the object layer – it is a way of thinking described in metadata that can be thought of as entities, or abstractions, or ... [ read more ]
|
by
Kathleen via
Kathleen Dollard
on
2/15/2008 2:50:57 PM
Do we all live in fear of that moment when we notice that we’re the one on the other side of Dilbert? When Dilbert is wise and well, we’re not. Two weeks ago I was writing a long paper explaining some nuances about the state of the templates at that time and asking my client not to reject it until he had looked into it and really understood it. So, in the next morning’s Dilbert strip someone comes to Dilbert and says “I’ll tell you my idea if you promise not to reject it until thinking about ... [ read more ]
|
|
by
Kathleen via
Kathleen Dollard
on
2/14/2008 6:14:21 PM
One of the issues with the code generation templates is that they do not test the syntax of the output as you type. I’m a VB coder, and that would be my fantasy, an editor that told me whether my templates produced valid output as I type. That’s nearly impossible to do, so don’t hold your breath. In the meantime, you may have code like the following where Private Function MemberGetPrimaryKey2() As String Return _ <code> Protected ... [ read more ]
|
by
Kathleen via
Kathleen Dollard
on
2/14/2008 5:21:00 PM
Chris asks:
At what point with code gen / templating do you start to think about doing all this codegen at runtime instead of compile time?
And if we were to be doing it at runtime would be be better served by using a dynamic language such as ruby to program in?
That's a good point. In a perfect world, there would be no need for code generation. We would write nothing but business/domain specific code and everything else would just happen. But for well over twenty year ... [ read more ]
|
|