Brains-On-A-Stick Progress Report

Just wanted to post a quick update on my progress.

At this point I have the following working, or mostly working:

  1. Subscribe to a podcast
  2. Download the episodes to the hard drive
  3. Add devices, specifying their root directory for podcasts
  4. Walk the directories under the root and show a list of all files and their paths
  5. Persist library and device data to the hard drive using JSON serialization
  6. Query objects using Linq to Objects

Here's what's NOT finished:

  1. Synchronize podcasts to the device
  2. Connect to a device that doesn't appear as a drive

That last one is a big sticking point right now. I have two devices from Creative and one from Transcend. The Transcend shows up as a drive. That's nice. The Creative devices show up as Windows Media Devices. That's not nice.

To communicate with such devices (mp3 players, cameras, etc.) you have to use the Windows Media Device Manager APIs. Unfortunately they are NOT implemented in .Net. That means you got some pInvoking to do.

This is the bit I'm working on now. I've never worked with this particular API before (I didn't know there was such a thing before yesterday...), so it may take a bit of fiddling to get moving forward again.

It is a pain in the posterior, but once I get a handle on the API, I'll be back in business.

In the meantime here's a screenshot of the UI. Not pretty, but not entirely WinForms like. Not all super-de-duper WPFy, but functional.

image

Eventually I'll try to make it look a bit more like that famous fruit inspired music site...

Posted on 5/17/2008 11:32:00 PM by jeffa

Permalink | Comments (4) | Post RSSRSS comment feed |

Categories: .Net

Tags: , , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

WPF - Should I?

Windows Presentation Foundation (WPF) offers Windows developers a new style of development.

Instead of firing up Visual Studio and putting together a standard Windows Forms UI, you can split the development between a designer (or team of designers) using Expression Blend and a programmer (or team of programmers) using Visual Studio.

The design team can use a tool that is familiar to them to design the UI and the programming team can use a tool that is familiar to them. Their common currency is XAML. XAML (Extensible Application Markup Language) is an XML file that describes how the screen should look.

Here's a screenshot from Expression Blend:

image

Wow. That sure isn't Visual Studio.

Timelines? Storyboards? Animations? Oh, my!

So should I use WPF or not?

Here's my decision process:

1) Is this a consumer app or an internal business app?

In other words, will people pick my app because it looks good or will they use it no matter how it looks because it can help them make money (or they are mandated to use it by the people who hope to make money)?

If I begin a consumer oriented app that will live on the desktop, I will pick WPF and Expression Blend without a doubt. You simply cannot make a Windows Forms app looks as good as you can a WPF app.

If I am making an app that ISN'T a consumer app, then I have to ask another question.

2) Do I want to use tried and true Windows Forms or prepare for the future with WPF?

So I'm working on an internal app that will be used by people within my company whether they like it or not. Should it be WPF? That is a tough question. It is possible to make an app with WPF that looks remarkably like a Windows Forms app. Problem is that many of the standard controls available to a Windows Forms app are not available to WPF.

The not so simple answer is that if I use WPF it will be possible to redo the UI at a later date with lots of spiffy new shiny pieces, BUT it will take me longer to produce than a Windows Forms app. If I use Windows Forms, I will finish sooner, but when I'm done, I'm done. To move to WPF at that point will require re-writing the app.

For Brains-On-A-Stick (my podcast agregating app), I'm using WPF and initially creating a very pedestrian UI. Once all the plumbing works, I'll re-do the UI in a variety of ways using WPF and XAML.

If you want to see a WPF podcast player check out Podder. I haven't looked at it much since my app is fairly similar and I don't want to be influenced by their app. The screenshots look great. They took an approach similar to mine by creating a very basic looking app then handing it over to a designer. They are even having a skinning contest.

The big difference in their app and mine is that they are a player whereas I'm more concerned with maintaining libraries and synching them with multiple devices.

Once I get the first whack at mine complete, I plan to look closely at theirs and see how they implemented skinning, etc.

Posted on 5/12/2008 10:37:00 PM by jeffa

Permalink | Comments (2) | Post RSSRSS comment feed |

Categories: .Net

Tags: , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

WPF Links

Just a quick blog entry to list some WPF related links. Why? So I can find them later...

Rob Relyea:

WPF Panels

Rob's main WPF page

Windows Client.net:

WindowsClient.net

Kirk Evans:

WPF Databinding

Outlook Clone using WPF

Tim Sneath:

Getting Started with WPF

I'll add more to this blog later.

Posted on 5/1/2008 9:16:00 AM by jeffa

Permalink | Comments (1) | Post RSSRSS comment feed |

Categories:

Tags: ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

New Project, New BlogProcessor?

This weekend I've begun a new project to both scratch an itch I have and to learn some of the new bits of the 3.5 .Net Framework. More on that in a bit.

As a side note, this is my first post from Microsoft's Windows Live Writer. W00t! First post!

I think Live Writer is a step in the write direction (ba-dump-bump). It is a very small program (less than 3 MB) and it doesn't do very much. But what it does do, it does very well. It is a word processor for blogs. It is also free. That is free-as-in-beer for the FOSS crowd, and free-as-in-you-don't-pay-money-for-it for everyone else.

I could use Word 2007 to write my blog entries. I could also buy an RV to cruise around town and pick up my dry cleaning. The point is that 99.93% of the features of Word 2007 are unnecessary for writing this blog post. I don't plan to mail-merge and print envelopes nor do I need fancy macros. Nope, I just want to write, insert links and the occasional picture and have spell check watch my back for crap like spelling occasional as "occassional " or "ocassional " (not that that would ever happen to me).

The web is all around us and that is a good thing, but for some things HTML makes for a poor interface even with AJAX, Achilles, Odysseus or any of the other warriors of the Trojan war. For some things you just need a good old fashioned application running on your computer. The trick is for that application to interact with the mighty Internet and its hordes of servers.

Live Writer is a very good example of doing this and doing it well (he said confidently having never actually tried that big, beautiful "Publish" button).

Enough of that for now, on to the Project. Hmm. I guess I need to give it a secret Code Name to use to speak about it until I decide to release it to the world with a boring name that doesn't mean much (Revolution becomes Wii?). How about this: Brains-On-A-Stick. Since it's a temporary working name, who cares, right? No chance that name could stick. With brains. Man, that was bad.

Here's the annoying-problem-I-want-to-solve: my son, daughter and I all have MP3 players (neither iPods nor Zunes) and we all like podcasts. Keeping up with syncing all those devices with podcasts is a pain in the 'cast. Oh, and I want to try out all the neat new stuff in the 3.5 Framework...

My first thought was to use one of the various podcast feed-readers to pull down the shows and write an app to sync them up. After reading about Microsoft's new MESH and its RSS/Atom use, I decided that it was time to bone up on using .Net to work with syndication feeds. I found several good blogs that talked about syndication and started hacking around with it.

I now have  a rudimentary feed reader that uses the following new bits:

1) WPF (Windows Presentation Foundation). Uses XAML (Extensible Application Markup Language) to describe the presentation. This XML file is parsed and the UI is built on the fly both at design time and runtime. We've all talked about separating presentation from behavior for a long time, and this is one swell way to do it. Why do I find it exciting? You can FINALLY rely on DirectX and your 3D processing video card to handle the graphics (good-bye, GDI, well, mostly). This means your windows (and elements inside the windows) can be 3D and not 2D, even though they look 2D most of the time. This means you can spin a window around and stack them up. More about WPF and XAML in future posts.

2) Expression Blend. If you have the ability to separate presentation from code, then why not make a tool for designers so they can make really cool looking graphics? I'm not a designer, so I'm not going for cool looks yet, but as I get things working, I'll spend more time tinkering with the looks.

3) JSON. JavaScript Object Notation. I'm using this to serialize objects to disk. XML would work just as well, but JSON is all hip and trendy. All the cool kids are using it.

4) LINQ. Language Integrated Query. I'm using this to query the objects in memory. Much more on this later.

5) Syndication. RSS and Atom feeds are how you get your podcasts. The System.ServiceModel.Syndication namespace objects help you work with them.

I'll write about all the little bits as I work through the project.

Posted on 4/27/2008 9:50:00 PM by jeffa

Permalink | Comments (12) | Post RSSRSS comment feed |

Categories: .Net

Tags: , , , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5