Posts tagged 'microsoft'


Saturday Oct 20, 2007

More on AtomPub and Windows Live Writer

Joe Cheng posted another entry in his series explaining the details of AtomPub support in Windows Live Writer (WLM), titled WLW+AtomPub, Part 2: Authentication.

Wondering what WLM looks like? Travelin' Librarian has a nice set of screen-shots of WLM on Flickr including shots of the installation process, HTML mode, preview mode and more. Looks pretty sweet.

Screen-shot of Windows Live Writer

Tuesday Jan 09, 2007

Homeserver

I spent a fair amount of holiday time trying to figure out how to share and backup the important files on our various home computers. The solution I settled on was geeky bordering on goofy:

  • A Linksys NSLU2 "Slug" running Unslung Linux, Apache HTTPD and Subversion
  • One 200GB USB drive hooked up to Slug (formatted with Linux ext)
  • Two 200GB USB drives one for each of our Mac laptops

For documents I use Subversion. On each computer, each user's files are kept in a directory that is under Subversion source code control. Since nobody else in the family knows about Subversion (yet), I have to visit each computer periodically and commit any new files or changes. I had hoped that approach would work for all of my files, but Subversion on the Slug is way too sluggish when it comes to big files.

So, for photos and other big binary files I use the Slug as a simple file-server. I make sure my photos and videos are organized into directories that are roughly DVD-size directories (i.e. about 8GB)  and I periodically copy them to the Slug and make DVDs for off-site storage.

And finally, for full backups I use disk "cloning" software. Every month or so I use Carbon Copy Cloner to make a full-disk backup our two Mac laptops to a USB drive.

Sounds like a total pain in the ass doesn't it? But a growing number of folks have multiple computers and piles of photos and videos to backup, so my problems are far from unique. That's why I think Windows Home Server is going to be a hit.


Windows Home Server concept design (as seen on CrunchGear)

It's a server appliance with no monitor or keyboard. You just plug it into your home network, put it in a corner and it solve all of your PC backup problems. It quietly makes full-disk image backups of each of your Windows PCs and it gives you a place to share files with other folks at home and over the net. It's of no use to me since most of my home computers run some form of UNIX, but 95% of the world is hooked on Windows -- they're gonna want this thing. Check out Paul Thurrott's Windows Home Server Preview for more details.

Wednesday Aug 09, 2006

Tri-NUG slides

My TriNUG talk seemed to go really well tonight. I didn't see anybody sleeping and nobody threw any sharp things at me. I added some extra slides of interest to .NET developers, but I was still finished with time enough for a short Atom protocol demonstration using curl as client and Roller as server. The slides (in PDF format) are here: TriNUG-Aug2006-BeyondBlogging.pdf.

Wednesday Aug 02, 2006

Windows RSS Platform API complete


I won't have time to check out IE7 beta 3 and the final Feeds API until this weekend, but I'm happy to see that Microsoft addressed my number one complaint, which was:
Support feed and item ids. The item.id property does not reflect the RSS <guid> or Atom <id> of the item/entry in the original feed. Plus, it's an integer -- not the right type for a URN. If you want to get the actual feed or item/entry id you have to parse the XML. Make it easy to get the real id if there is one.
And in Walter vonKoch's list, you can see that they fixed the problem:
5. Added FeedItem.Guid to reflect xml element <atom:id> or <guid>

7.3 Renamed Feed.Id to Feed.LocalId

7.4 Renamed FeedItem.Id to FeedItem.LocalId
In doing that they broke some code in my book (I'll fix the examples download this weekend), but I can't really complain about that.

Plus, check out Walter on MSDN TV talking about the RSS in IE7.

Monday Jul 31, 2006

Beyond Blogging at the Triangle .NET user group


I'll be speaking on RSS and Atom next week (Wednesday August 9th) at the Triangle .NET user group. I'll cover RSS and Atom feed formats, the Windows/IE7 RSS Platform and the Atom protocol. Details are on the Tri-NUG website.

Tags: topic:[RSS], topic:[Atom], topic:[IE7], topic:[.NET]

Thursday Jun 29, 2006

Microsoft Flak Jacket 2007 (still in beta)

Robert Burke: And it was kinda cool to be the Microsoft guy running Apache and PHP on his laptop :)
I'm sorry I missed that talk.

Tags: topic:[apacheconeu2006], topic:[apachecon]

Tuesday Apr 25, 2006

IE7 beta2 available


Yesterday, Microsoft released a second beta of IE7. I installed it, re-built and re-tested my example code. I haven't found any significant changes yet and none off my issues have been addressed. The item.id field is still an integer, unique only within the the feed. There is still no item.summary field. You can't parse feeds from disk. The Common Feed Extensions still live in the Simple List Extensions namespace. Oh well.

Thursday Apr 20, 2006

Free as in beer IDEs from MSFT


Microsoft has made freeware "express" editions of it's Visual Studio IDE products and SQL Server available free of cost. Supposedly, they were to become payware in November 2006. This is definitely a smart move on Microsoft's part; an effort to capture some of the armies of developers moving to free tools like Eclipse, Netbeans, MySQL, PostgreSQL, etc.

The free IDEs are stripped down versions of Visual Studio and with a few missing features. They're suitable for folks getting started with .NET 2.0 development using C#, VB.NET, J#, C++ and ASP.NET, but they're missing some key features you'll need for "real" development. The Visual Studio site has a feature-by-feature product comparison that shows the differences between the Express, Pro and Team System versions. Here's my summary of what's missing from the free IDEs:
  • No source code control - you can't even hook-in SouceSafe
  • No unit testing - you need the big-dollar Team System for that
  • No XSLT support - but some XML tools are available
  • No mobile device support - oh well (try the Netbeans Mobility Pack instead)
  • No 64-bit compilers
I've tried a couple of the express editions and they didn't look very stripped down to me, except in comparison to the current crop Java IDEs. None of the features I was using in Visual Studio C# 2003 were missing.

I recently upgraded the RSS and Atom in Action examples to .NET 2.0 using the express editions of Visual Studio C# 2005 and Visual Web Developer 2005. My overall impressions were mixed. I was a little disappointed that I had to install two completely separate IDEs to get C# development ASP.NET development capabilties, but I was glad to see that Visual Web Dev. includes a test web server, so you don't have to muck with IIS. All and all, free is good and I'm definitely happy that my readers can build and run all of the examples in the book with free-of-cost IDEs from Sun, IBM and now Microsoft as well.

Tuesday Apr 11, 2006

Window RSS platform answers


As I was researching my chapter on the Windows RSS platform for RSS and Atom in Action I came up with a list of questions based on the IE7 previews. Scoble hooked me up with Walter VonKoch, who kindly answered them all. Read on [Read More]

Thursday Apr 06, 2006

Things that need fixing in the MS Feeds API


Here's what I think Microsoft should fix in the Windows RSS Feeds API:
  • Support feed and item ids. The item.id property does not reflect the RSS <guid> or Atom <id> of the item/entry in the original feed. Plus, it's an integer -- not the right type for a URN. If you want to get the actual feed or item/entry id you have to parse the XML. Make it easy to get the real id if there is one
  • Item objects should have description and content fields. Currently, the object model can't completely repesent Atom, Wordpress style RSS or Typepad style RSS -- they have both description and content elements. So, add description and content and get the mappings (and content model) right for Atom, plus regular, funky and 1.0 style RSS.
  • Allow parsing of feeds from file system. Apparently, you can only parse a feed named by URL and you can't parse feeds on your hard disk. That can't be right. Make it possible to subscribe to and parse feeds from the file-system.
  • Cough up a spec for the Common Feed Format extensions. The normalized format used to store all feeds includes some new elements in the same namespace as the Simple List Extensions (SLX), but they're not mentioned in the SLX spec. Fix that.
Tags: topic:[ie7], topic:[rss], topic:[atom], topic:[vista]

Wednesday Mar 22, 2006

Please host the Windows RSS Feed Normalizer

Sam Ruby: It seems self evident to me that the Microsoft Feed API is going to be important enough that people are going to want to make sure that their feeds work well with this new platform.

However, not everybody is in a position where they have ready access to a machine running Windows XP Service Pack 2 (SP2) with IE7Beta 2 Preview loaded on it.

So, to make life easier, I’ve converted Dave Johnson’s program to a web application, and I’m looking for volunteers to host it.  If you are in aposition to help with a public server, please leave a comment herewith your URL.
The Feed Normalizer makes it easy for you to see how the Windows RSS platform normalizes your feed, or any feed for that matter. Let's help the Microsoft Feeds API live up to it's package name, which, by the way, is Microsoft.Feeds.Interop.

Maybe some of the RSS Team bloggers would like to help?

Tags: topic:[ie7], topic:[rss], topic:[atom], topic:[vista]

Data loss sucks

James Snell: IE7’s feed reader support isn’t all that bad, but if MS wants developers to use it as a foundation to build new, interesting applications, MS needs to get out the way and provide an implementation that let’s developers work with the data as it exists out on the web. Normalizing subscribed feeds to their version of RSS is troublesome at best.
Tags: topic:[ie7], topic:[rss], topic:[atom], topic:[vista]

Monday Mar 20, 2006

FeedsManager.Bastardize()*


OK, I've got the latest IE7 build, the one Microsoft is handing out at MIX06. It took me a bit longer than I had expected to change my examples to compile with the new Feeds API included in the new build. They changed the Feeds namespace to Microsoft.Feeds.Interop and made a bunch of other little changes. So all I have for you tonight is one little example of weirdness.

Let's say you have a feed that uses the RSS 2.0 <description> element to hold a short summary of each item and the funky <content:encoded> element to hold the full content of each item (just like Dave Winer's Wordpress feed does). When the Feeds API reads your feed, it converts it to a normalized (but currently not valid, due to some bugs) form of RSS 2.0 that uses a mix of RSS and Atom 1.0 elements. For funky RSS elements, it uses Atom. So you end up with something like this:

Item contains

<description>
    Short summary of item content
</description>
<content:encoded>
   Full content of the item
</content:encoded>

Feed API normalizes to

<atom:summary type="html">
   Short summary of item content
</atom:summary>
<description>
   Full content of the item
</description>

The old switcharoo, eh?

Here's a more complete example: a source feed in RSS 2.0 format and the same feed in Feeds API normalized normalized format. I've also got an Atom example: source and normalized.

That's pretty weird alright, but they're on the right track. They're using Atom elements to model RSS. Now, if they'd just follow that line of thinking to it's logical conclusion and use Atom as the normalized feed format, they might actually be able to please the assholes and protect the morons of this world.

Tags: topic:[rss], topic:[atom], topic:[feeds], topic:[ie7], topic:[vista], topic:[mix06]

* The title of this post refers to the FeedsManager.Normalize() method which takes an Atom 0.3, Atom 1.0, RSS 1.0 or RSS 2.0 feed and normalizes it to Feeds API RSS 2.0 format. To be clear about this, I'm using this little C# program to get at the normalized feeds:
using System;
using System.Xml;
using System.IO;
using Microsoft.Feeds.Interop;
namespace BlogApps_Chapter06 {
class Normalize {
static void Main(string[] args) {
string url = args[0];
FeedsManager fm = new FeedsManagerClass();
IFeedFolder rootFolder = (IFeedFolder)fm.RootFolder;
IFeed feed = null;
if (!fm.IsSubscribed(url)) {
feed = (IFeed)rootFolder.CreateFeed(url, url);
} else {
feed = (IFeed)fm.GetFeedByUrl(url);
}
feed.Download();
string xml = feed.Xml(feed.itemCount,
FEEDS_XML_SORT_PROPERTY.FXSP_PUBDATE,
FEEDS_XML_SORT_ORDER.FXSD_ASCENDING,
FEEDS_XML_FILTER_FLAGS.FXFF_ALL,
FEEDS_XML_INCLUDE_FLAGS.FXIF_CF_EXTENSIONS);
StreamWriter sw = new StreamWriter(File.OpenWrite(args[1]));
sw.Write(xml);
sw.Close();
}
}

}

New build of IE7 is available


I spent the weekend writing about IE7 and the Microsoft Feeds API -- and my chapter is due at the end of the week, so this is perfect timing for a new build. I'll re-run my experiments with the new one and tell you about some other "interesting" findings later tonight. The closer I look, the funkier it gets.

Sunday Mar 12, 2006

What's up with the Windows RSS platform?


The Windows RSS Platform (or Feeds API) is the feed handling engine that powers the new RSS features in IE7. It will also be included in Windows Vista for use by other applications. Note that here, RSS is a generic term meant to include both RSS and Atom -- the Feeds API supports both. The Feeds API is packaged in a DLL called msfeeds.dll and available to programmers as a set of dual-interface COM objects. Here are the features exposed via the Feeds API.
  • Common feed list: list of feeds for current user, organized as folder hierarchy.
  • Feed store: local cache of feeds, feeds available via abstract object model
  • Download engine: for managing and monitoring large enclosure downloads
  • RSS sharing extensions: new XML elements to support bi-directional sync via RSS

The Feeds API gives you access to the current user's feed subscription list, a feed parser that can handle any form of RSS and Atom as well as the IE7 podcast download engine. The parser parses feeds to an abstract object model designed to represent any sort of feed. It handles funky RSS and in some cases prefers the funky elements (e.g. <content:escape> over <description>).

I'd like to learn more about how the Feeds API decides which elements to use, how sync works, and how the whole package compares to the premier Java Feeds API ROME. So, I've downloaded IE7 and started experimenting with the API from C#. I'll be posting more on this topic in the next week or two.

Here are some of the references I've been using to understand the API:

Feeds API docs, specs and whitepapers from Microsoft 

Microsoft employee blogs about the RSS platform

Other blogs about it

Update1: added a couple of new links suggested by Mark Woodman
Update2: added reference to Simple List Extensions
Update3: added link to RSS in Windows Vista presentaton

Tags: topic:[atom], topic:[rss], topic:[ie7], topic:[atom protocol]

Tuesday Oct 19, 2004

Google Desktop is just like WinFS

Joe Gregorio:

This is just like WinFS.

Except that it is shipping today.

And it just works.

And it doesn't require an upgrade to your operating system.

more...

Tuesday Sep 28, 2004

Microsoft to release open source Wiki

Microsoft flexes more open-source muscle | CNET News.com: "FlexWiki is the third piece of Microsoft code that the company has released this year under an open-source license, all under the Common Public License (CPL). In April, Microsoft posted its Windows Installer XML (WiX) to SourceForge.net, following up a month later with the posting of the Windows Template Library (WTL) project."

Wednesday Sep 01, 2004

Parsing RSS with .Net

How do you do it? I need to provide some examples to show how to parse RSS with Java and C#. I have written simple parsers using the common XML parsing techniques such as DOM, SAX, and Pull. I have also written some examples that use parser libraries, but I have yet to find a good and free RSS parser library for .Net. Lazy-web, please help me out here.

When you assume...

If you assume that RSS is XML and you are just interested in getting titles, decriptions, links, and dates then it is pretty easy to write a simple parser that can handle most forms of RSS including RSS 1.0, RSS 2.0, and some forms of funky RSS. If you to handle more than those basic elements, then I recommend that you use a parser library.

Parser libraries

Python programmers are blessed with a great newsfeed parser library: Pilgrim's regex-based Universal Feed Parser which can parse any feed, even if it is not valid XML. I don't think Pilgrim's parser will port easily to the Java version of Python Jython, because Jython is missing some important Python libraries and Jython uses a Java regex which is different from Python's built-in regex. The same thing probably goes for the .Net version of Python IronPython. By the way, Lazy-web, would you please port Pilgrim's parser to Jython?

So, Java developers don't have the Universal Feed Parser, but we do have two active projects that are developing full featured RSS (and Atom) parsers: Informa (used by Javablogs.com) and Rome. .Net developers have RSS.Net, but it is incomplete and development seems to have comletely stagnated back in November of 2003.

So how do you parse RSS with .Net? I started looking around and digging into source code. I found that Dare built his C# based RSS parser for RssBandit on top of an SGML parser. Joe built his C# based RSS parser for Aggie using good old System.Xml. I guess you just have to do it by hand, so here goes...

My examples

Now it's time for the lazy web to point and laugh at my feeble efforts to build simple RSS parsers in C#. I have two examples for your ridicule. After you are done laughing, please, .Net heads, help me out and tell me what I am doing wrong and where I can make improvements.

First, here is a simple C# RSS parser method that uses a DOM based approach. It extracts the basic elements of title, description, link, and pubDate from the channel and item levels and it puts them into a dictionary (just like Pilgrim's parser does). It can handle RSS 1.0, RSS 2.0, and some forms of funky RSS. Have a look:

public IDictionary ParseFeed(String fileName) {
XmlDocument feedDoc = new XmlDocument();
feedDoc.Load(fileName);
XmlElement root = feedDoc.DocumentElement;
string defaultNS = null;
string contentNS = "http://purl.org/rss/1.0/modules/content/";
string dcNS = "http://purl.org/dc/elements/1.1/";
string xhtmlNS = "http://www.w3.org/1999/xhtml";
if (root.Name.Equals("rss")) {
defaultNS = null;
}
else {
defaultNS = "http://purl.org/rss/1.0/";
}
XmlElement channel = (XmlElement)root.GetElementsByTagName("channel").Item(0);
IDictionary feedMap = new Hashtable();
feedMap.Add("title", GetChildText(channel,"title",defaultNS));
feedMap.Add("pubDate", GetChildText(channel,"pubDate",defaultNS));
feedMap.Add("dc:date", GetChildText(channel,"date",dcNS));
feedMap.Add("description", GetChildText(channel,"description",defaultNS));
feedMap.Add("link", GetChildText(channel,"link",defaultNS));

XmlNodeList items = null;
if (root.Name.Equals("rss")) {
items = channel.GetElementsByTagName("item");
}
else {
items = root.GetElementsByTagName("item");
}
IList itemList = new ArrayList();
feedMap.Add("items", itemList);
for (int i=0; i<items.Count; i++) {
IDictionary itemMap = new Hashtable();
itemList.Add(itemMap);
XmlElement item = (XmlElement)items.Item(i);
itemMap.Add("title", GetChildText(item,"title",defaultNS));
itemMap.Add("link", GetChildText(item,"link",defaultNS));
itemMap.Add("guid", GetChildText(item,"guid",defaultNS));
itemMap.Add("pubDate", GetChildText(item,"pubDate",defaultNS));
itemMap.Add("dc:date", GetChildText(item,"date",dcNS));
itemMap.Add("description", GetChildText(item,"description",defaultNS));
itemMap.Add("content:encoded", GetChildText(item,"encoded",contentNS));
itemMap.Add("body", GetChildText(item,"body",xhtmlNS));
}
return feedMap;
}
private string GetChildText(XmlElement element, string childName, string namespaceURI) {
string text = null;
XmlNodeList nodeList = null;
if (namespaceURI != null) {
nodeList = element.GetElementsByTagName(childName, namespaceURI);
} else {
nodeList = element.GetElementsByTagName(childName);
}
if (nodeList!=null && nodeList.Item(0)!=null) {
if (nodeList.Item(0).FirstChild!=null) {
text = nodeList.Item(0).FirstChild.Value;
} else {
text = "";
}
}
return text;
}

And here is the same thing, but using a pull-parser based XmlTextReader approach:

public IDictionary ParseFeed(String fileName) {
XmlTextReader reader = new XmlTextReader(fileName);
reader.WhitespaceHandling = WhitespaceHandling.None;
IDictionary feedMap = new Hashtable();
IList items = new ArrayList();
IDictionary itemMap = null;
feedMap.Add("items", items);
while (reader.Read()) {
bool isStart = reader.NodeType.Equals(XmlNodeType.Element);
bool isEnd = reader.NodeType.Equals(XmlNodeType.EndElement);
if (isEnd && reader.Name.Equals("item")) {
itemMap = null;
}
else if (isStart && reader.Name.Equals("item")) {
itemMap = new Hashtable();
items.Add(itemMap);
}
else if (isStart && itemMap!=null
&& reader.Name.Equals("title")) {
reader.Read();
itemMap.Add("title", reader.Value);
}
else if (isStart && itemMap!=null
&& reader.Name.Equals("link")) {
reader.Read();
itemMap.Add("link", reader.Value);
}
else if (isStart && itemMap!=null
&& reader.Name.Equals("description")) {
reader.Read();
itemMap.Add("description", reader.Value);
}
else if (isStart && itemMap!=null
&& reader.Name.Equals("content:encoded")) {
reader.Read();
itemMap.Add("content:encoded", reader.Value);
}
else if (itemMap!=null && reader.Name.Equals("body")) {
reader.Read();
itemMap.Add("body", reader.Value);
}
else if (isStart && itemMap!=null
&& reader.Name.Equals("pubDate")) {
reader.Read();
itemMap.Add("pubDate", reader.Value);
}
else if (isStart && itemMap!=null
&& reader.Name.Equals("dc:date")) {
reader.Read();
itemMap.Add("dc:date", reader.Value);
}
else if (isStart && reader.Name.Equals("title")) {
reader.Read();
feedMap.Add("title", reader.Value);
}
else if (isStart && reader.Name.Equals("description")) {
reader.Read();
feedMap.Add("description", reader.Value);
}
else if (isStart && reader.Name.Equals("link")) {
reader.Read();
feedMap.Add("link", reader.Value);
}
else if (isStart && reader.Name.Equals("pubDate")) {
reader.Read();
feedMap.Add("pubDate", reader.Value);
}
else if (isStart && reader.Name.Equals("dc:date")) {
reader.Read();
feedMap.Add("dc:date", reader.Value);
}
else if (isStart && reader.Name.Equals("image")) {
// skip images
while (reader.Read()) {
if (reader.Name.Equals("image")
&& reader.NodeType.Equals(XmlNodeType.EndElement)) {
break;
}
}
}
}
return feedMap;
}

Have some better examples of parsing RSS with .Net? Please point me to them.

Saturday Aug 28, 2004

Those pesky Autoruns

I've been using SysInternals freeware Windows Process Explorer and other Sysitnernals utilties for years now, but I never noticed this one. AutoRuns "shows you what programs are configured to run during system bootup or login" and allows you to delete or disable any of them. Via Jonathan Hardwick.

Tuesday Jun 15, 2004

IE team locked in a dark dungeon.

Joel Spolsky Microsoft took over the browser market fair and square by making a better product, but they were so afraid that Web-based applications would eliminate the need for Windows that they locked the IE team in a dark dungeon and they haven't allowed improvements to IE for several years now.

Main | Next page »