July 2006 - Posts
Microsoft has released an alpha version of its technical reference documentation tool: Sandcastle.
Sandcastle is presented as a "documentation compiler for managed class libraries". The alpha is available for download.
The following features are advertised:
- Works with or without authored comments
- Supports generics and .NET 2.0
- Two main components (MrefBuilder and Build Assembler)
- MrefBuilder generates reflection xml file for Build Assembler
- Build Assembler includes syntax generation, transformation, etc.
- Used internally to build .NET Framework documentation
Did you notice that the home page for this tool is a weblog? Not the best way in the world to share information about a product! A blog is useful for announcing new content, but a dedicated home page with the information nicely organized would be much better. Of course, this is the first alpha version of the tool, so I guess it will get better with the beta or further version.
Even though Sandcastle is available only as an early version for the moment, it comes out in time as a
replacement for NDoc. You should still probably consider NDoc for your .NET 1 documentation, as it's really a nice tool. There is no real support for .NET 2 from NDoc though, and its development has been stopped by its author.
Indeed, I've received a mail from Kevin Downs, in which he explains
that he won't continue working on NDoc. The reasons he gives make
sense: a lot of time invested, with no support from the users, no help for the development, unjustified and undue expectations from the users, and even threats from some
It's too bad to see what happens to such a useful project. I guess it's
common for hobby projects like this one. Having worked for big
companies, I can testify that they use open source products
extensively, but wouldn't do the slightest thing to contribute to the
projects or help them in any way. They just expect the free tools to
work perfectly, just like they had paid big money for them!
I haven't done anything for the project myself, expect letting people know about it, so I guess I'm guilty too...
Working on open source projects is really ungrateful it seems. You need to be really motivated, know why you're doing it, and learn to ignore some too demanding users.
In the official Linq forum
, Joe Albahari presents the reasons why he thinks Linq will succeed
are some bugs in the PDC – also some obstacles to implementing
MetaModel and IDbContext without reverse engineering, but nothing
unfixable. Looking forward to the release!
- LINQ syntax beats
SQL syntax. SQL is flawed in that queries become exponentially
difficult to write as their complexity grows. LINQ scales much better
in this regard. Once you get used to it, it's hard to go back.
- Database queries are easily composable. You can conditionally add an
ORDER BY or WHERE predicate without discovering at run-time that a
certain string combination generates a syntax error.
- More bugs are picked up at compile-time.
- Parameterization is automatic and type-safe.
- LINQ queries can directly populate an object hierarchy.
- LINQ to SQL provides a model for provider independence that might really work.
- LINQ significantly cuts plumbing code and clutter. Without sweeping
stuff under the carpet, like Workflow or Datasets. This is a credit to
the design team.
- C# hasn't suffered in the process (in fact, it's gained).
I agree. Great summary.
Cross-posted from http://linqinaction.net
I've just noticed that the Visual Studio "Servicing" web page has been updated with new release dates for the Visual Studio 2003 and 2005 service packs:
- Visual Studio 2003 Service Pack 1 to ship August 15, 2006
- Visual Studio 2005 Service Pack 1 ships Q3, 2006
Keep in mind that these dates already slipped before...
Microsoft listened to our requests. It has announced its upcoming tool for generating MSDN-like documentation from your .NET code. The codename is Sandcastle and the tool is presented as a "Documentation Compiler". It should work the same way NDoc does, except it will support .NET 2.
The first release has been delayed and is now planned for August, as part of the next CTP release of the Visual Studio SDK.
The information comes from Microsoft's forums.
Update: an alpha version is now available.
The Library of Free Data Models
provides "kick-start" database models for free. It can be useful to build examples or quickly start new database schemas.
If you want to learn more about Linq, Bill Wagner has a great series over at his blog. Here is a link to the latest post
, which includes links to all the other parts. Enjoy!
Cross-posted from http://linqinaction.net
As a followup to my last post
, you can read Daniel Cazzulino's post
in which he presents a solution for strongly-typed reflection that complements ayende's approach
. Of course this implementation has limitations of its own, the major one being that it's based on lambda expression
s and expression trees
, two features that won't see the light of day before the next version of C# (sometime in 2007?).
.NET reflection features are powerful and this is really what makes it a powerful platform. We don't use reflection everyday, but when we do it's really useful.
Don't you hate it though when you have to write code like this?:
MethodInfo method = typeof(MyClass).GetMethod("MyMethod");
The problem with this code is that we use a string to identify the method, which means that we don't get compile-time validation.
Ayende has an interesting approach to this problem
. He gives you a solution that allows writing the following code instead:MethodInfo method = GetMethod<int, string>(MyClass.MyMethod);
In this case, everything is strongly-typed and checked by the compiler.
Of course, nothing is perfect and this solution suffers from a number of limitations, but it's an interesting approach anyway. The limitations:
- it works only with static methods,
- the methods need to be accessible (public or in your code's reach),
- we can't use a similar approach for properties.
Maybe one day we'll get support for this right from the compiler
. Currently, there is typeof
for types, but we are out of luck for methods, properties or parameters...Update:
Daniel Cazzulino has another option that is more complete