David Hayden shows off the Export Templates Wizard from VS05. Very cool. Frankly, I like GAT for most of this type of template work, but this really fits nicely from a “simplest thing that could possibly work” perspective.
Thoughts on Architecture Journal 5
If you haven’t had a chance to check out the most recent issue of The Architecture Journal, I highly recommend it. In particular, I liked Metropolis and SOA Governance by Richard Veryard and Philip Boxer as well as Value Driven Architecture by Charlie Alfred.
Richard and Philip dive deep on governance, leveraging Chris Alexander’s Nature of Order and Pat Helland’s Metropolis. In particular, I liked the section on the structural implications of service orientation. As per Alexander, large complex systems can’t be designed in the traditional manner – they evolve over time. This leads Richard and Philip to discuss the highly fascinating concept of asymmetric demand. To quote the article: “Asymmetry means that the forms of demand are increasingly specific to the context in which they arise.” I can’t do the concept justice – just go read the article – but my takeaway is that what you sell isn’t necessarily what people are buying. Take SQL Server for example – you know, one of those products that launched a new version yesterday. Amazing product, but nobody buys SQL Server on its own. It’s always bought in the context of a larger solution. SQL is extremely flexible, so the number of contexts in which it’s appropriate is extremely high. But still, how many business people have ever said “We need to buy a database”. I’m guessing zero. Business people say things like “We need to keep better track of our shipments/inventory/customers/orders/etc” or “we need to better insight into business trends” or “we need to be able to demonstrate our compliance with <insert government regulation here>”. These business problems all need a database like SQL Server, but they need more than SQL Server alone. That’s the asymmetry. Microsoft sells SQL Server (among other things of course, but let’s focus for a second), but customers are buying a solution to their business problem.
On the topic of business problems, Charlie’s article on value modeling flat out states that traditional requirements based design is ineffective. Charlie’s agrees with Jack and Keith that requirements define a system, not the problem the system is intended to address. As such, often critical design decisions are made while defining requirements that have drastic impact on the development of the system down the road. As a somewhat silly example, if I define requirements for a software system, I am precluding any non-software system solution to the problem. What if the best solution for a problem isn’t software? Because of mistaken assumptions I’ve made in the requirements gathering process, I’ve eliminated the best solution to the problem. Woops.
And Charlie has this great quote about the requirements gathering process:
Traditional approaches, like use case scenarios or business/marketing requirements, start by focusing on the types of actors with which the system interacts. This approach has several major limitations:
It focuses more on what things the actors do, and less on why they do them.
It tends to stereotype actors into categories, where all individuals of a type are essentially the same (traders, portfolio managers, or system administrators, for example).
It tends to ignore differences in limiting factors (for example: Is an equity trader in New York the same as one in London? Is trading at market open the same as trading during the day?).
It is based on binary outcomes: the requirement is met or it isn’t. The use case completes successfully or it doesn’t.
There is a very logical, practical reason why this approach is popular. It uses sequential and classification-based reasoning, so it is easy to teach and explain, and it can produce a set of objectives that are easy to verify. Of course, if simplicity were the only goal that counted, we’d all still be walking or riding horses to get from one place to another.
I love the point about simplicity. Often, we do things in IT that are simple for IT but that are more complex (and thus bad) for the business. For example, a web app may be the easiest to deploy for IT, but if I have a mobile workforce that web application will cause more business headaches than it solves in IT.
In other Architecture Journal related news, you can sign up for a free subscription, so what are you waiting for?
Grady Booch sez “Throw Models Away”
I wasn’t there, but apparently Grady Booch made a comment at OOPSLA last month that throwing away models is a good thing. Juha-Pekka’saccount of the Design and Modern Software Practices Panel has Grady saying “when the project gets closer to the delivery you normally throw away UML models. This is a natural choice since the efforts needed for keeping the design – user view, dynamics, behavior, interaction etc. – linked with the implementation are simply too high.” Ivan Moorehas Grady saying “I often throw models away but tend not to throw away the source code.”
I’ve gotta believe that this comment was somehow taken out of context and that the Grand Poobah of the Common Semantic Model doesn’t actually believe that tossing the model at the end o the project is a good thing. If we view these comments thru the lens of Code is Model, you realize this is a major violation of the “Models must be Intrinsic to the Development Process” tenet. Since code is model, it seems silly to throw out the UML model and keep the code model. The only reason I could think to do that, is because the UML model has no value.
And this leaves me wondering, exactly how much benefit does Grady Booch get from his UML model if he’s willing to throw them away near the end of the project.
Deploying Databases with SQL Server Express
Things have been quiet around here lately because I’ve been heads down on a dev project. We (that is to say, I) reached code complete today, so look for more posts shortly. But I wanted to quickly post a few things on deploying application that use SQLServer Express. It turns out that there are some significant differences between SSE and it’s older sibling with respect to Xcopy deployment.
First off, go read this article on Xcopy deployment and this article on User Instances. And while you’re out surfing, download SSEUtil – it’s a great little command line utility (i.e. no installer) that you can use to list, detach, attach, and create SSE databases.
Anyway, one of the MAJOR changes (and the one that gave my installer fits all day) is this idea of user or child instances of SSE. From the docs:
The user instance, also known as a child or client instance, is an instance of SQL Server that is generated by the parent instance (the primary instance running as a service, such as SQLExpress) on behalf of a user. The user instance runs as a user process under the security context of that user. The user instance is isolated from the parent instance and any other user instances running on the machine. The user instance feature is also referred to as “Run As Normal User” (RANU).
This is a big deal because essentially you have 2 instance of SSE running – the main one and the user specific one. And they’re different. I was totally confused by this because I didn’t realize it was happening. I created a new DB in .sqlexpress with VS but then it wouldn’t show up when I listed the databases with SSEUtil. The reason is the SSEUtil defaults to the child instance while creating a new DB with VS defaults to the main instance.
This is particularly relevant if you want to use the AttachDBFilename feature. I’m using SSE as a cache, so I wanted to put it in the <username>Application Data folder. But I couldn’t get the main instance of SSE to attach to a database in that folder tree. It drove me batty! I literally would move the DB from folder to folder – it works fine in My Docs, but not in App Data. However, it works fine from the child instance – I’m guessing that’s on purpose.
So my installer puts the DB file in the <username>App Data folder (as per Keith’s book) and changed my connection string to include the parameter “user instance=true”. Also, if you’re using AttachDBFilename, you need to include the initial catalog or database parameter, but without a value. In other words “Initial Catalog=”. Weird. But it worked like a charm.
It’s Great To Have Hockey Back, But…
I’m glad the NHL is back. I’m glad that I get to watch some games in HD. But it’s more than a little disconcerting to see commercials for hunting shows and other so called “field sports” during breaks in the action.
I’m not sure that having the NHL on the same station as “Wanted: Ted or Alive” is really helping the sports image.