Archives
-
LINQ to Objects for JavaScript
Nikhil Kothari, whose blog you should visit immediately if you're doing web development, demonstrates how to reproduce LINQ to Objects in JavaScript.
-
Visual Studio 2006 is available
I've just downloaded Visual Studio 2006 err.. Visual Studio 2005's first service pack. Well, it's a 431MB download... Not bad for a patch.
-
Save money on .NET tools with SharpToolbox
Some .NET tool publishers have started running special offers on SharpToolbox. Look for the "special offer" sticker on the home page.
-
Lambda expressions in VB
Looks like VB is going to get support for lambda expressions after all. Paul Vick is discussing about the syntax.
Cross-posted from http://linqinaction.net -
LINQ videos from TechEd Developers 2006
Troy Magennis has the scoop: some of the talks given at TechEd Developers last month in Barcelona are now available on MSDN's ShowTime.
-
Charlie Calvert's LINQ posts
Charlie Calvert, who some of you may know for the years he spent at Borland or for his books on Delphi, joined Microsoft in July as the Community Program Manager for the Visual C# group.
Charlie has a blog full of C# and .NET community information. As part of his activities, he started a series of posts on LINQ: -
Linq productization, where are we?
I've been quiet on the blog side lately. So many things are keeping me busy!
It's time to catch up a bit and share with you some information I collected over the last weeks. For example, here is the information we have today on the productization of Linq into Visual Studio "Orcas".
-
Sysinternals tools now available from Microsoft
The integration of the Sysinternals tools and site by Microsoft is complete.
-
Removing diacritics (accents) from strings
It's often useful to remove diacritic marks (often called accent marks) from characters. You know: tilde, cédille, umlaut and friends. This means 'é' becomes 'e', 'ü' becomes 'u' or 'à' becomes 'a'. This could be used for indexing or to build simple URLs, for example.
Doing so is not so easy if you don't know the trick. You can play with String.Replace or regular expressions... But do you know .NET 2 has all that is required to make this easier? -
Solving URL rewriting problems with themes and trailing slashes
In a comment to an old post of mine about URL rewriting, a visitor named Tim has just asked how to solve a problem he was facing with ASP.NET themes and rewriting. The original post was addressing the main problems by using an overload of the RewritePath method introduced by .NET 2. Yet, a simple problem still existed: whenever URL rewriting is used with a URL like ~/somepath/ the theme gets broken because the path to the CSS files and other themed resources (like images) are wrong. The problem here is the trailing slash, which confuses the theme engine. A URL like ~/somepath works fine of course.
-
Visual Studio "Orcas" alpha
All the details are provided on the download page.
-
Mono available in a virtual machine
Want to try Mono? This is really easy now thanks to a VMWare image provided on the Mono download site. It includes Mono on Suse Linux.
-
Linq to Amazon source code
A while ago, I announced Linq to Amazon and started to describe how it's implemented. Actually producing some content for the book and summer holidays kept me busy for a while, but here is finally the last part of this series of posts.
In the previous post, I said that what had to be done to create the Linq extension is to implement the IQueryable<T> interface, and write the code that converts an expression tree into an Amazon query.
What I have done is just a quick and dirty implementation. The goal is not to provide a complete solution to query Amazon using Linq, but instead to create an example to give you an idea of how the Linq extensibility stuff works. As you will see by looking at the source code, a lot of work would be required for a complete implementation.
Let's describe what you'll find in the source code.
The BookSearch class implements IQueryable<Book>. This interface speaks for itself. An object that implements it can be queried for Book objects! A BookSearch instance is what we'll query. Our queries start with code like the following:
var query =
from book in new Amazon.BookSearch()
...
The important method to look for in the BookSearch class is CreateQuery<S>. This method receives an argument of type Expression. This is our expression tree. All that the CreateQuery<S> method does is creating and returning a new instance of the BookQuery class, passing the expression tree to its constructor. -
Visual Studio 2003 Service Pack 1 available
I'm working with VS 2005 these days, but I guess this can be helpful to someone: Microsoft has finally released a service pack for Visual Studio 2003. The list of fixed bugs and the release notes are available online.
-
CAB and SCSF resources
I've been extensively using the CAB (Composite UI Application Block) and the SCSF (Smart Client Software Factory) lately. You should really dig them if you are creating Windows Forms applications. The CAB is a great tool to structure your developments and create reusable components. The SCSF is great for working with the CAB...
-
Parsing WordML using Linq to XML
Eric White, Programming Writer for XLinq, MSXML, and XmlLite, shows how he used Linq to XML (XLinq) to query Word documents.
This is good example to get an idea of where Linq will help us. Linq comes with a set of features that greatly simplify the code needed to manipulate XML documents, either for querying them or for creating them.
Eric's post comes with the complete source code. I suggest you take a look at it so you can quickly make your own idea on Linq to XML.
You may also read this post by Steve Eichert, which highlights major improvements provided by Linq to XML.
Cross-posted from http://linqinaction.net -
Sandcastle alpha available, NDoc discontinued
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. -
Why LINQ will succeed
In the official Linq forum, Joe Albahari presents the reasons why he thinks Linq will succeed:
I agree. Great summary.- 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).
Cross-posted from http://linqinaction.net -
New dates for Visual Studio 2003 and 2005 Service Packs
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:
-
Sandcastle, Microsoft's replacement for NDoc
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. -
Library of free data models
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.
-
Another series of Linq introductory posts
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 -
Strongly-typed reflection redux
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 expressions and expression trees, two features that won't see the light of day before the next version of C# (sometime in 2007?).
-
Static method reflection
.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.
Update: Daniel Cazzulino has another option that is more complete.
-
Tools galore
How many tools do you think we can use for .NET development?
Well, more than 905 tools (including 292 libraries) according to what I have referenced in SharpToolbox so far! How many do you actually know? ;-)
I started collecting this information more than three years ago now... It's been a while since I've taken a look at the counters.
If I remember well, the latest categories that I've added are Grid computing, Workflow, Rich-client UI. The categories with the most tools are IDE - IDE-addins, Persistence - Data-tier, Reporting, Object-relational mapping, and ASP.NET.
JavaToolbox is in good shape too with 558 tools including 196 libraries!
Searching for a tool? Keep digging, I have most of them in store :-)
-
Linq to Amazon implementation fore steps
On Monday, I have announced an implementation of Linq for Amazon Web Services, that allows to query for books using the following syntax:
var query =
from book in new Amazon.BookSearch()
where
book.Title.Contains("ajax") &&
(book.Publisher == "Manning") &&
(book.Price <= 25) &&
(book.Condition == BookCondition.New)
select book;
Before getting to the details of the implementation code, I'd like to describe what we need to do in order to be able to use such code.
First, as you can see we work with book objects. So, let's defined a Book class:
public class Book
{
public IList<String> Authors;
public BookCondition Condition;
public String Publisher;
public Decimal Price;
public String Title;
public UInt32 Year;
}
Here I use public fields for the sake of simplicity, but properties and private fields would be better.
You can see that this class defines the members we use in our query: Title, Publisher, Price and Condition, as well as others we'll use later for display. Condition is of type BookCondition, which is just an enumeration defined like this:
public enum BookCondition {All, New, Used, Refurbished, Collectible}
The next and main thing we have to do is define this BookSearch class we use to perform the query. This class implements System.Query.IQueryable<T> to receive and process query expressions. IQueryable<T> is defined like this:
interface IQueryable<T> : IEnumerable<T>, IQueryable
which means that we have to implement the members of the following interfaces:
interface IEnumerable<T> : IEnumerable
{
IEnumerator<T> GetEnumerator();
}
interface IEnumerable
{
IEnumerator GetEnumerator();
}
interface IQueryable : IEnumerable
{
Type ElementType { get; }
Expression Expression { get; }
IQueryable CreateQuery(Expression expression);
object Execute(Expression expression);
}
and finally the IQueryable<T> interface itself of course:
interface IQueryable<T> : IEnumerable<T>, IQueryable, IEnumerable
{
IQueryable<S> CreateQuery<S>(Expression expression);
S Execute<S>(Expression expression);
}
It may look like a lot of work... I will try to describe it simply so that you can create your own implementation of IQueryable without too much difficulty once you get to know how the mechanics work.
In order to be able to implement IQueryable, you need to understand what happens behind the scenes. The from..where..select query expression you write in your code is just syntactic sugar that the compiler converts quietly into something else! In fact, when you write:
var query =
from book in new Amazon.BookSearch()
where
book.Title.Contains("ajax") &&
(book.Publisher == "Manning") &&
(book.Price <= 25) &&
(book.Condition == BookCondition.New)
select book;
the compiler translates this into:
IQueryable<Book> query = Queryable.Where<Book>(new BookSearch(), <expression tree>);
Queryable .Where is a static method that takes as arguments an IQueryable followed by an expression tree.
I can hear you crying out loud: "What the hell is an expression tree?!".
Well, an expression tree is just a way to describe what you wrote after where as data instead of code. And what's the point?- To defer the execution of the query
- To be able to analyze the query to do whatever we want in response
And why is it called a "tree"? Because it's a hierarchy of expressions. Here is the complete expression tree in our case:
Expression.Lambda<Func<Book, Boolean>>(
Expression.AndAlso(
Expression.AndAlso(
Expression.AndAlso(
Expression.CallVirtual(
typeof(String).GetMethod("Contains"),
Expression.Field(book, typeof(Book).GetField("Title")),
new Expression[] { Expression.Constant("ajax") }),
Expression.Call(
typeof(String).GetMethod("op_Equality"),
null,
new Expression[] {
Expression.Field(book, typeof(Book).GetField("Publisher")),
Expression.Constant("Manning") })),
Expression.Call(
typeof(Decimal).GetMethod("op_LessThanOrEqual"),
null,
new Expression[] {
Expression.Field(book, typeof(Book).GetField("Price")),
Expression.Constant(new Decimal(25), typeof(Decimal)) })),
Expression.EQ(
Expression.Convert(
Expression.Field(book, typeof(Book).GetField("Condition")),
typeof(BookCondition)),
Expression.Constant(BookCondition.New))),
new ParameterExpression[] { book }));
If you look at this tree, you should be able to locate the criteria we have specified in our query. What we will do in the next step is see how all this combines and how we will extract the information from the expression tree to be able to construct a web query to Amazon.
We'll keep that for another post... Stay tuned!
Cross-posted from http://linqinaction.net - To defer the execution of the query
-
Introducing Linq to Amazon
As an example that will be included in the Linq in Action book, I've created an example that shows how Linq can be extended to query anything.
This example introduces Linq to Amazon, which allows querying Amazon for books using Linq! It uses Linq's extensibility to allow for language-integrated queries against a book catalog. The Linq query gets converted to REST URLs supported by Amazon's web services. These services return XML. The results are converted from XML to .NET objects using Linq to XML.
For the moment, let's look at the client code:
var query =
from book in new Amazon.BookSearch()
where
book.Title.Contains("ajax") &&
(book.Publisher == "Manning") &&
(book.Price <= 25) &&
(book.Condition == BookCondition.New)
select book;
I think this code speaks for itself! This is Linq to Amazon code. It expresses a query against Amazon, but does not execute it... The query will be executed when we start enumerating the results.
The following piece of code converts from Linq to Amazon to Linq to Objects:
var sequence = query.ToSequence();
The query gets executed this time and an enumeration of the resulting books is created.
The next steps could be to use Linq to Objects to perform grouping operations on the results. e.g.:
var groups =
from book in query.ToSequence()
group book by book.Year into years
orderby years.Key descending
select new {
Year = years.Key,
Books =
from book in years
select new { book.Title, book.Authors }
};
This allows to display the results like this:
Published in 2006
Title=Ruby for Rails : Ruby Techniques for Rails Developers Authors=...
Title=Wxpython in Action Authors=...
Published in 2005
Title=Ajax in Action Authors=...
Title=Spring in Action (In Action series) Authors=...
Published in 2004
Title=Hibernate in Action (In Action series) Authors=...
Title=Lucene in Action (In Action series) Authors=...
using the following code:
foreach (var group in groups)
{
Console.WriteLine("Published in "+group.Year);
foreach (var book in group.Books)
{
Console.Write(" ");
ObjectDumper.Write(book);
}
Console.WriteLine();
}
What a great way to query a catalog of books! Don't you think that this code is very legible and clearly expresses the intention?
Linq to XML can also be used to display the results as XHTML, and Linq to SQL can be used to persist the results in a database.
Over the coming days, I'll publish more details and the complete source code for this example.
Update: The next part of this series is available: Linq to Amazon implementation fore steps
Cross-posted from http://linqinaction.net -
Linq rebranding
Soma announced that the naming scheme for the Linq technologies has been simplified:
LINQ to ADO.NET includes:
So long DLinq and XLinq... Welcome Linq to Whatever!
LINQ to DataSet
LINQ to Entities
LINQ to SQL (formerly DLinq)
LINQ support for other data types includes:
LINQ to XML (formerly XLinq)
LINQ to Objects
I agree that this will make things a bit more explicit, especially the separation between what is related to ADO.NET and what is not. It will also help implementors find names for their products using Linq. We can expect to see more LINQ to Something in the future...
Cross-posted from http://linqinaction.net -
20-06-2006 20:06
As pointed out by Frank Arrigo, this is a fun date. Will this post make it to the right time?
-
ADO.NET Entity Framework documents are back (ADO.NET vNext)
The original articles about the ADO.NET Entity Framework didn't stay online very long, but this time, two official documents are available:
- The ADO.NET Entity Framework Overview
- Next-Generation Data Access (Making the conceptual level real)
In these documents, you'll encounter the following:- The Entity Data Model
- Entity SQL
- LINQ to Entities
- LINQ to DataSets
- LINQ to SQL (formerly known as DLinq)
We still don't know if DLinq will continue to live for a very long time (I don't see why we'd need two object-relational mapping solutions from Microsoft except for creating confusion).
Update:
These documents are also available online as web pages, not just Word documents.- The ADO.NET Entity Framework Overview
- Next-Generation Data Access (Making the conceptual level real)
Cross-posted from http://linqinaction.net -
Bye bye DLinq, Hello Linq for Sql and the ADO.NET Entity Framework!
Some of you may have read the documents on ADO.NET 3.0 and the Entity Framework when they were published, before they were promptly removed. The big question since that time has been: What will happen to DLinq in regard to the future of ADO.NET, which seemed to offer the same services and more with a different solution?
Well, Andres Aguiar has the scoop, live from TechEd in Boston: apparently both frameworks will be kept.
OK, it actually happened. We'll have two mapping technologies in .NET v.next.
What? Two object-relational mapping technologies for .NET from Microsoft? What's the point?! Why not raise ObjectSpaces from the dead while the are at it...
LinQ for SQL, previously known as DLinQ is the 'simple' mapping technology.
LinQ for Entities, will be on top of the new ADO.NET Entity Framework, and will be the 'complex' (we could say 'real') mapping technology.
I feel the same as Andres:
I think Microsoft did this for internal politically correctness (they did not want to not to ship any of the frameworks) but I can't see why this is good for the .NET Framework as a whole.
The team that worked on DLinq worked on ObjectSpaces before and killing DLinq after ObjectSpaces may have been to hard for Microsoft's developers after all the years they have spent on these projects.
To me, two solutions mean an excess of one. I don't see how people will be able to choose, and I think one will have to disappear sooner or later...
Cross-posted from http://linqinaction.net -
Bye bye WinFX, Hello .NET Framework 3.0!
Somasegar, Corporate Vice President of Microsof's Developer Division, has announced that the WinFX brand has been killed! You should now talk about ".NET Framework 3.0" instead when you refer to the package that contains WPF (Windows Presentation Foundation - Avalon), WCF (Windows Communication Foundation - Indigo), WF (Workflow Foundation - Windows Workflow Foundation - Winoe), WCS (Windows CardSpace - InfoCard).
The .NET Framework 3.0 runs on the .NET CLR 2.0.
What will the framework delivered as part of the Orcas wave be called? .NET Framework 3.5? .NET Framework 4.0? And it will contain C# 3.0 and VB.NET 9.0...
Clear as mud, isn't it? Microsoft's marketing likes to play funny games... -
Copying and pasting text with styles removed - PureText
I've been doing a lot of copy&paste operations between several Word documents or HTML pages lately, and I got fed up with doing "Edit | Paste Special... | Unformatted Text" all the time to avoid having my Word documents polluted with styles I don't want.
A great little free tool came to the rescue: Steve Miller's PureText. I highly recommend that you give it a try!
Pasting text with formatting and styles removed is as easy as using the Apple+V shortcut, an easy replacement for CTRL+V.
Oh, for those who don't know, the Apple key is the one that looks like a window that looks like a waving flag located between CTRL and ALT... -
Viewing the SQL generated by DLinq
As demonstrated by Sahil in the last issue of his Demystifying DLinq series, you can get see the SQL DLinq would execute for a given query at debug-time using the built-in Query Visualizer:
This useful little tool can also run the SQL query and show you the results if you want.
In addition to the Query Visualizer, you can also get the SQL queries at runtime using the following line of code to redirect the SQL to the console: db.Log = Console.Out;
Of course, you can also redirect the logs to anything else as far as it's a System.IO.TextWriter.
Even better, you can also call GetQueryText(myQuery) on your DataContext instance to get the SQL at any time you want for a given query.
If you have updated in-memory objects returned by DLinq, you can get the SQL that would be executed on the database by using DataContext.GetChangeText().
A difference between GetQueryText() and GetChangeText() on one side, and the Query Visualizer on the other side, is that with the latter you can see the value of the SQL query's parameters.
Cross-posted from http://linqinaction.net -
Focusing on LINQ
I've recently published some posts about LINQ, and as I wrote before, you can expect to see more on this weblog in the coming months. The reason? I'm currently writing a book on LINQ!
I've opened a web site dedicated to the LINQ, XLINQ, DLINQ technologies and to the book. If you visit linqinaction.net you'll be able to find useful pointers to learn more about these technologies.
Hopefully, the book and the site will give you everything you need to understand LINQ. -
"Java succumbing to .NET in my organization", a Java developer
A Java developer reports that the management of the group he works for inside a contractor company has decided to move from Java to .NET. The developer gives the reasons he sees behind this decision.
I guess we could sum up what he writes like this: "Too much choice is bad". Probably not much you don't know already, but it's an interesting read. Is this a trend you've noticed?
Of course choice is good, and I hate to see everyone wait for Microsoft to provide a solution to all their problems. But having too much options seems to be a problem, especially for managers who prefer not having to make choices...
Read "Java Succumbing to .NET in my Organization"
PS: of course, this doesn't mean that we don't have a lot of choice in .NET considering that we have close to 900 tools and libraries in the SharpToolbox! -
Using Cache outside web applications
Just because someone asked me how to do it today: here is an article on how to use the System.Web.Caching.Cache object outside of web applications, such as in your Windows Forms applications or console applications.
No need to reinvent the wheel. -
Orcas release date, first estimates
Roger Jennings has spotted very interesting information on Scott Guthrie's weblog. It's not like there is anything but excellent content on Scott's blog, but I haven't seen this kind of information elsewhere before.
Scott has published a first post on using LINQ with ASP.NET projects a few days ago. Roger writes:Scott's LINQ with ASP.NET post provoked a large number of comments and replies, but the most interesting reply included this gem:
We are looking to ship the second half of next year. We will start having full Orcas CTP drops (of all technologies) starting later this summer, and will also have a go-live license of Orcas before the final RTM date. So not too far off now when you can use the above techniques in production.
This is the first Orcas RTM estimate and go-live committment directly from a Microsoft employee that I've encountered.
If you browse the whole set of comments, you may spot other related information, which includes:- "We are making some changes to the CLR for that release, but are also being careful to keep a high runtime compat bar to ease deployments (the following release will then have more engine additions)."
- "Orcas will be compatible with the 2.0 runtime. There will then be optional framework components you can install as well."
-
Sample uses of LINQ, DLINQ and XLINQ
My article entitled Sample uses of LINQ, DLINQ and XLINQ is now available in English.
-
LINQ update: May 2006 CTP
LINQ (including DLinq and XLinq) has just been udpated!
There are many new features to discover. This update includes:- Productivity enhancements via DLINQ designer and debugger support within the Visual Studio 2005 IDE.
- Support for a broader range of development scenarios thanks to new databinding and ASP.NET support.
- Ability to integrate LINQ with existing code through features like LINQ over DataSet and DLINQ improvements including inheritance.
- Feedback driven features including deep stored procedure support, since the earlier CTP.
Get ready to see many posts about LINQ on this weblog. More on this soon...
[Linq home page, Linq CTP download] (The download link seems to have problems but should be back soon)
-
Visual Studio 2005 Web Application Project model is released
As announced by Scott Guthrie, the Visual Studio 2005 Web Application Project model is now available as a final release. You can get it on the dedicated page.
It will be included in the first VS 2005 Service Pack, but you can start using it right now.
You may wish to read the introduction to this model to learn more. -
Attach to Visual Studio's Development Web Server easily using a macro
Something I have to do frequently is attaching to a running web application for debugging purposes. I don't always start my web applications in debug mode, but I often need to attach at some point when doing some testing.
Unfortunately, there is no easy way to do this from Visual Studio. We have to attach to the server process "by hand". After some time doing this, you'll find it a bit boring...
Here is a quick-n-dirty solution. It's a simple macro that attaches to the first web server process it finds. Just copy the code below to your macros using the Macro IDE (Tools | Macros | Macro IDE...).
Once you have the macro, you can:- add a button to a toolbar by right-clicking on the toolbars, then "Customize... | Commands | Macros" and drag & drop the command on the toolbar of your choice
- map a shortcut key to it using "Tools | Options | Environment | Keyboard" and search for the AttachToFirstDevWebServer
Warning 2: the code searches for Visual Studio 2005's integrated Development Web Server. To attach to IIS instead (from VS 2003 for example), you'll have to adapt the code to attach to aspnet_wp.exe.
' This subroutine attaches to the first Development Web Server found.
Public Sub AttachToFirstDevWebServer()
Dim process As EnvDTE.Process
For Each process In DTE.Debugger.LocalProcesses
If (Path.GetFileName(process.Name).ToLower() = "webdev.webserver.exe") Then
process.Attach()
Exit Sub
End If
Next
MsgBox("No ASP.NET Development Server found")
End Sub
Update: you may have to replace "webdev.webserver.exe" by "webdev.webserver2.exe" - add a button to a toolbar by right-clicking on the toolbars, then "Customize... | Commands | Macros" and drag & drop the command on the toolbar of your choice
-
MVP again in 2006
I'm not the first of the April gang to announce my nomination as an MVP for one more year, but count me in for a third year.
-
New Atlas release with "go-live" license
As announced on the Atlas weblog, you can now produce ASP.NET applications using Atlas since there is a "Go Live" license coming with the March CTP release of Atlas.
You can get the new release and a lot of information directly from the Atlas web site.
There is even a contest you can participate in to win prizes if you build an application using Atlas.
"Atlas" is a set of technologies to add AJAX (Asynchronous JavaScript And XML) support to ASP.NET. It consists of a client-side script framework, server controls and more. Atlas is a free add-on to ASP.NET. -
Vote for SharpToolbox at the asp.netPRO Readers' Choice Awards
If you like SharpToolbox, it's time to vote (before April 2)!
SharpToolbox is proposed in the "Community Resource" category of the asp.netPRO Readers' Choice Awards
Thanks for your help!
PS: The site for voting does not always work. Please try again later... -
PageMethods updates for VS 2003 and VS 2005
New versions of PageMethods have been released:
-
Windows Forms and WPF interoperability preview
Those of you who are actively developing Windows Forms application may wonder what will happen when Avalon/WPF is ready. Will you have to rewrite your user interfaces completely in XAML? When and how will you have to migrate?
Mike Henderlight from Microsoft gives you hints with his presentations about Crossbow, which is a piece of technology to build hybrid Windows Forms and WPF (Windows Presentation Foundation) applications.
Crossbow is part of the WinFX SDK and will be included in the February CTP.- Introducing Windows Forms - WPF Interoperability
- Feb 2006 CTP announcement on Crossbow
- Slides from PDC 2005
- Video "Crossbow" - Windows Forms and Windows Presentation Foundation Interoperability
-
NDoc project stalled, no version for 2.0. What is Microsoft doing?
NDoc is a very useful open source project that generates reference documentation from .NET assemblies and the XML documentation files generated by the C# compiler (or an add-on tool for VB.NET). NDoc generates documentation in several different formats, including the MSDN-style HTML Help format (.chm), the Visual Studio .NET Help format (HTML Help 2), and MSDN-online style web pages, which is much better than just the XML file we get from the compiler...
Unfortunately, NDoc has not been ported to .NET 2.0 yet. There are some commercial tools available - not even sure they offer support for .NET 2.0 - but I think support for generating and integrating documentation should be built in Visual Studio. Josh Ledgard (lead program manager at Microsoft's developer division) writes about this problem, and asks how Microsoft could lend a hand to NDoc and other non-MS developer tools. This is an interesting question. Make sure to read the discussion in the comments.
To get back to NDoc, if ever someone could help Jonas Lagerblad make progress...
Update: Kevin Downs - main developer of NDoc 1.3 and the titular admin of the project - writes in a comment that he is working on NDoc 2.0 and has an alpha version available for testers.
Update: NDoc 2 development stopped. Microsoft releases Sandcastle. -
Work with Visual Studio 2005, Build for .NET 1.1
Via Larkware: Microsoft has released MSBee Beta 1.
MSBee means MSBuild Everett Environment. Everett beeing the codename for .NET 1.1, MSBee is an extension for MSBuild that allows developers to build managed applications in Visual Studio 2005 that target .NET 1.1.
A small limitation to know though: "At this time, we are not planning to add IDE support. Since MSBee will be a shared source release, the potential is there for the community to provide this support.".
Update: Bruno Baia made the test, and yes, you can compile directly from VS 2005 if you add the following line after the existing import tag in a project file:
<Import Project="$(MSBuildExtensionsPath)\MSBee\MSBuildExtras.FX1_1.CSharp.targets" />
IntelliSense and help still present .NET 2.0 information, but this is not a big deal. I think the above statement about the missing IDE support is not clear at all. -
How-To-Select Guides: Object-Relational Mapping Tools for .NET
The lastest edition of the How-To-Select Guides for .NET developers has been published. This time the subject is object-relational mapping tools for .NET.
This guide contains a brief discussion on object-relational mappers, lists decision points, authors and products, and provides a feature comparison table.
I was interviewed for this guide and you can read my "informed opinion" in it.
As a reminder, I have published an article that presents the criteria to consider when selecting an object-relational mapping product. -
Code generation in Visual Studio: build providers, MSBuild tasks, custom tools
PageMethods generates a list of your page methods in an XML file at compile time. This metadata file is then used to generate code you can invoke through the MyPageMethods namespace.
The first version of PageMethods for Visual Studio 2005 supported the only web project model available at that time: the Web Site model. In this model, a custom build provider takes care of the XML file and generates .NET code.
The latest version of PageMethods supports the Web Application project model as well. But a web application being a "class library" - and not strictly a "Web Site" in Visual Studio 2005 terms - build providers cannot be used in this case. Two solutions were possible: create an MSBuild custom task or a Visual Studio custom tool. I chose the latest, as it is easily integrated within Visual Studio and it works with Visual Studio 2002/2003 as well. In fact, custom tools are automatically used for XSD or WSDF files for example.
If you want to learn more about this kind of features, I highly advise you to read Dino Esposito's article about custom build providers, custom MSBuild tasks, and VS custom tools. -
Borland to retire from the IDE market and focus on ALM
I haven't used a Borland tool for quite a while, but it's always interesting to follow what is happening on their side. I knew Borland mostly for its developer tools. In the past, I've made extensive use of Turbo Pascal, Borland Pascal, Delphi and InterBase. Since then, Borland has published other tools like Kylix (Delphi for Linux), JBuilder, C#Builder or Delphi.NET. All IDE products.
It's not knew at all that they had started getting into the Application Lifecycle Management market, but today come important news: Borland plans a separate company for its IDE products, which means they want to sell these product lines!
You can read the official announcement by the CEO or a message from David Intersimone.
It's true that during the last years, Borland had smaller and smaller market shares for IDEs and fewer resources allocated to them.
The big question is: what will happen in the future for these products? Is this the end? Who will the buyer be, if any? -
Referencing external web sites with all the benefits
-
PageMethods for VS 2005 1.6
A big update for PageMethods for VS 2005 has just been published: PageMethods for VS 2005 1.6
-
Update on Visual Studio 2003 and 2005 service packs release dates
According to this page, we will have to wait some more months to see the Visual Studio service packs:
- Visual Studio 2003 Service Pack 1 ships Q2, 2006
- Visual Studio 2005 Service Pack 1 ships Q3, 2006
-
Visual Studio 2005 code snippets for C#
Microsoft has released additional Visual Studio 2005 code snippets for C#.
-
Les Journées d'XP et de l'Agilité à Paris
XP Day(s) France 2006, les journées d'XP et de l'agilité, ont lieu à Paris les 23 et 24 mars 2006.
-
Discussion group for PageMethods
I've just created a Google Group for PageMethods.
If you have questions or suggestions, feel free to join the discussion!
-
XML documentation helper tool
Travis Illig has a great Visual Studio add-in that allows you to see a preview of your XML document comments in real-time, as you edit the comments.
-
Holophony
Put your headphones on and listen to this mp3...
I haven't tried but apparently it also works with stereo speakers (not surround ones though). -
Are you GSCP certified?
These days a new programming paradigm is gaining momentum: GSCP.
In fact, a lot of us already practice it even without knowing it. What does GSCP mean, will you ask... Simply Google Search, Copy/Paste! -
Windows Live is revolutionary, or so claims Microsoft at least
I've never used Windows Live and I don't think I need it, but it seems fabulous.
Just look at its latest feature: -
URL rewriting breaks ASP.NET 2's themes
If you try to use URL rewriting and ASP.NET 2 themes at the same time, you will likely get broken pages, because the two don't mix very well.
A typical link to a theme's stylesheet looks like this in the generated HTML:
<link href="App_Themes/Theme1/StyleSheet.css" type="text/css" rel="stylesheet" />
The problem is that these links to CSS documents are using relative paths, which is not going to work fine if you use RewritePath on your web requests. -
ASP.NET 2 weblogs
I'm back to working on web applications and this time it is with ASP.NET 2 of course.
To help you get started with the new ASP.NET version, here are some great weblogs you don't want to miss:
- Scott Guthrie's weblog
- Nikhil Kothari's weblog
- Bertrand Le Roy's Atlas stuff
- K. Scott Allen's weblog
- Rick Strahl's weblog
- Fredrik Normén's weblog
I probably missed some, but this is a good start. Any suggestion?