Mike Roberts talks about a new approach to WebForms, he is the author of
CruiseControl.Net a continuous integration software for .Net.
Extract
'What??' you may cry. 'You've stopped using ASP.NET??' No, I've just stopped using Web Forms. Web Forms are those .aspx files you write and their code behinds. They're also the things that use server controls, view state and other such components that make up most of .NET web apps. I'm still using the ASP.NET runtime in the form of an IHttpHandler. This is a much more lightweight way of developing web apps, similar to Java's Servlets.
http://mikeroberts.thoughtworks.net/blog/archive/Tech/dotNet/GoodbyeWebForms.html
How cool is that
http://www.microsoft.com/presspass/press/2005/feb05/02-23HIVVaccinePR.asp Extract
Microsoft Research has pioneered promising new ways to combat one of humankind's most deadly viruses with advanced software typically used to analyze large computer databases and complex digital images, or to separate spam from legitimate e-mail.
Today at the 12th Conference on Retroviruses and Opportunistic Infections (CROI), Microsoft Research will show how medical researchers can use machine-learning, data-mining and other software techniques to comb through millions of strains of human immunodeficiency virus (HIV) to find the genetic patterns necessary to train a patient's immune system to fight the virus. The first of these vaccine designs are currently undergoing laboratory testing.
I wanted to implement theme support for my MessageBox component mentioned in the previous post, I came acorss this excellent post on how Application.EnableVisualStyles() works. So basically it uses the Activation Context API to specify that the v6.0 of common controls should be used.
When I looked at the API, I found that you have to specify a manifest file to specify that information. Now where does that manifest file come from? So I fired up reflector and this is what I found. Below is the code for the method that creates the ActivationContext for your application.
private bool EnsureActivateContextCreated()
{
bool flag1;
lock (typeof(SafeNativeMethods.EnableThemingInScope))
{
if (!SafeNativeMethods.EnableThemingInScope.contextCreationSucceeded)
{
string text1 = null;
FileIOPermission permission1 = new FileIOPermission(PermissionState.None);
permission1.AllFiles = FileIOPermissionAccess.PathDiscovery;
permission1.Assert();
try
{
text1 = typeof(object).Assembly.Location;
}
finally
{
CodeAccessPermission.RevertAssert();
}
string text2 = null;
string text3 = null;
if (text1 != null)
{
text3 = Path.GetDirectoryName(text1);
text2 = Path.Combine(text3, "XPThemes.manifest");
}
if ((text2 != null) && (text3 != null))
{
SafeNativeMethods.EnableThemingInScope.enableThemingActivationContext = new SafeNativeMethods.EnableThemingInScope.ACTCTX();
SafeNativeMethods.EnableThemingInScope.enableThemingActivationContext.cbSize = Marshal.SizeOf(typeof(SafeNativeMethods.EnableThemingInScope.ACTCTX));
SafeNativeMethods.EnableThemingInScope.enableThemingActivationContext.lpSource = text2;
SafeNativeMethods.EnableThemingInScope.enableThemingActivationContext.lpAssemblyDirectory = text3;
SafeNativeMethods.EnableThemingInScope.enableThemingActivationContext.dwFlags = 4;
SafeNativeMethods.EnableThemingInScope.hActCtx = SafeNativeMethods.EnableThemingInScope.CreateActCtx(ref SafeNativeMethods.EnableThemingInScope.enableThemingActivationContext);
SafeNativeMethods.EnableThemingInScope.contextCreationSucceeded = SafeNativeMethods.EnableThemingInScope.hActCtx != new IntPtr(-1);
}
}
flag1 = SafeNativeMethods.EnableThemingInScope.contextCreationSucceeded;
}
return flag1;
}
So the manifest file is called XPThemes.manifest, the intresting thing was how the code determines the directory in which to find the file, the relevant line of code is
text1 = typeof(object).Assembly.Location;
Since object is defined in mscorlib.dll and that is present in the directory where .Net is installed
the code can get the location where it can find XPThemes.manifest
If you search for XPthemes.manifest it will be present in the folder where you installed the .Net runtime.
I was just looking for the
great workshop on Fusion written by Richard Grimes I saw on the
front page of his site that he has stopped writing about .Net. That was quite odd considering that he has written some great articles and books on the subject and is a regular speaker in various events. Googling revealed that he has written an article in DDJ detailing his departure from .Net.
You can read his thoughts on why he does not want to associate with .Net anymore
here. You'll need to register to read the article.
I was doing some research in custom XML serializaton in .Net. The problem is the same as the O-R problem for database persistence, the difference here is the level of support that .Net provides in helping with that serialization. I stumbled upon a great site for XML related information
http://www.topxml.com and while going through some tutorials on that site came across this cool class called ISerializationSurrogate. You can read more about it here
http://www.topxml.com/xmlserializer/surrogateselectors.asp Basically it allows you to move the serialization code away from the object being serialized. A class that implements this interface can act as a surrogate for the class that it serializes. So that's another hook you can use to customize your serialization.
A couple of days back i was looking for an online bookmark manager, i found some really good and free ones but the one that caught my eye was
http://del.icio.us . It is a social bookmark manager, what that means is that when you add a new bookmark you can see what category other people have added that link in, you can then see other bookmarks in that category to discover new sites related to the one you are bookmarking. The best thing is that all these categories are available as RSS feeds, so you can subscribe to the feed for that category and whenever anyone adds a bookmark in that category you get notified. Not only that you can subscibe to the most popular bookmarks in a paticular category.
Here is the help that describes the RSS feeds that are available
» del.icio.us offers you many ways to view your own and other people's bookmarks. Understanding how del.icio.us URLs work makes it easier to see exactly the bookmarks you want.
» Every user has a unique homepage:
del.icio.us/geoffrey
» Tags also have their own pages:
del.icio.us/tag/politics
» You can filter bookmarks by user and tag together:
del.icio.us/geoffrey/literature
» This will show all bookmarks from user geoffrey tagged as 'literature'.
» Use plus signs to combine multiple tags into a tag intersection:
del.icio.us/tag/politics+france+history
» This will display only bookmarks that have all three of the tags 'politics', 'france', and 'history'. This also works for user/tag combinations:
del.icio.us/geoffrey/literature+english
The interface is a bit spartan with almost no images at all. But the site is fully functional. I've already discovered some cool sites using this. It works in Firefox as well as IE and other browsers via a bookmarklet, pretty easy to setup. This is one cool concept.