Comcast Acquires Plaxo

Posted in .  

Smart Address BookFrom Plaxo's Personal Card:

Today is a big day for us at Plaxo, as our partnership with Comcast was just announced. Plaxo will be part of Comcast’s Smartzone™, which aims to provide Comcast Triple Play customers with one central location to send and receive email and instant messages, check voicemail online, etc.

(The beta/soft launch for our work together started a few weeks back. If you’re currently a Comcast Broadband Customer and a Plaxo Member, you can sign up now by clicking here. )

We’re obviously thrilled to be working with Comcast, which is the nation’s leading MSO, with over 24.2 million cable customers, 12.1 million high-speed Internet customers, and 3.0 million voice customers. This should have significant implication's for Plaxo's growth curve.

 

Why I think this makes sense?

A smart unified address book fits in to the strategy of a broadband service provider aiming for unified communication services...

Update: more on that on Dennis Howlett's Comcast scoops up Plaxo: good move.

 

Technorati Tags: ,


Microsoft Research launches WorldWide Telescope

Posted in  | .  

Microsoft Research's WorldWide Telescope, otherwise known as "the thing that made Robert Scoble cry" has been publicly launched today.

WorldWide telescope is a desktop application that essentially turns your computer into a virtual telescope, allowing you to browse the universe. You can roam the universe freely or choose from a growing number of guided tours by astronomers and educators. You can also join communities of stargazers, connect your own telescope to your computer and control using the application.

Another cool option allows you to gain a different perspective on what you're seeing by switching between imagery sources.

WWT_CarinaNebula

The interface is pretty complex right now but everything works quite smoothly once you get the hang of it. I guess Microsoft will have to simplify it to allow wide adoption

I don't know about you but I'm going to take some time and travel the universe...


dasBlog 2.1 Released

Posted in .  

dasBlog 2.1 just got released on its new home at CodePlex: http://www.codeplex.com/dasblog

You can read about the new release and the move to CodePlex on on dasblog.info:

About version 2.1

This version is predominately a bug fix release with a number of other small features and incremental improvements. Our 2.0 release was based on source revision 730 and 2.1 is based on source revision 813. So you see there has been tons of activity in the background.

Some of the bugs squashed are:

  • Search result was displayed multiply times instead of once.
  • Theme picklist displayed multiply times instead of once.
  • Zip file creation of log files failed in certain cases
  • Cross posting between multiply blogs failed in certain cases
  • Better support for white space with the CSS PRE command for text formatting of sample source code etc.

Some of the new features are:

  • GeoRSS support
  • Several new user created macros for paging and theme layout improvements (currently only documented in the source);  CommentsCount, IfCommentsRawText, IfItemRawText, IfViewPermalinkUrlRaw, IfParamRawText
  • Macros; OnPagePreviousLink/OnPagePreviousLink (Renders links to the previous and next posts on the same page, only in list view)
  • Macros;  IfModified (prints localized text if entry was modified) - Modified, FormattedModified, FormattedModifiedBare (prints modified date/time if the entry was modified)

 

kick it on DotNetKicks.com
Technorati Tags:

I'm Back!

Posted in .  

Apparently without updating my blog about my return some people think I'm still having fun at Thailand's sunny beaches...
So, I'm Back! In full strength and with plenty of new topics to write about.

Stay tuned...

IMG_1676


Time to Relax...

Posted in .  

482363200_835e727ded I've had an amazing time at TechEd Eilat. Probably the best time from all the TechEds I've been to so far...
Now its finally time for some vacation (haven't really had one in more than year) and I'm packing my bag and taking off to Thailand in a couple of hours.

So, I'm going to leave the blog quiet for a little while (unfortunately, no time for TechEd summary etc. posts) and will continue in full strength when I get back at the end of the month...  Don't unsubscribe from your readers! ;)

 

If you do want to check out some TechEd stuff do check out the Flixwagon broadcasts...

 

 

 


Live Broadcasts from TechEd Eilat 2008

Posted in .  

Watch this post for broadcasts from TechEd:

 

Technorati Tags:

TechEd Eilat 2008 - Day 1 Summary

Posted in .  

Well it has been it's been an amazing (and long) day spent mainly on networking - I've met a lot of people with whom I've only interacted online before which is pretty cool.

I joined Amit on a hunt for every free giveaway available at the Digital Market event - you can read about it here.

Later on, I took over the Virtual Fighters Xbox 360 stand - Omer has the details and some pictures. There's also this video I took prior to the event:

Overall, a very exciting day that tops previous TechEds...  Kudos to the Microsoft team...

Technorati Tags: ,

Welcome to TechEd Eilat 2008

Posted in .  
Its been a hectic day so far...
I'm currently sitting at the .NET 3.5 and beyond Killer Features lecture so I finally have some time to write...

So here's what happend so far today:
  • I missed the opening keynotes and the blogger's meeting bcz of my late flight (11:30). I heard that all bloggers got a T-shirt and lots of other cool stuff so I need find out where my stuff is at :)
  • Had lunch at the Royal Beach...
  • Met some of my blogging friends. Can't upload pictures because...
  • Forgot my camera's USB cable at home. Maybe someone here will have the cable I need....
  • Got a room at the 10th floor of King Solomon Hotel
Hoping for things to relax a bit going forword...


Developing a Robust Data Driven UI Using WPF - Stock DataModel Sample

Posted in  |  | .  

On the previous post in this series we looked into the DataModel component in our architecture in detail and defined  an abstract DataModel base class to derive our models from.

On this post we'll implement a concrete data model to represent a stock's value. Why stock? It's an object with a changing value that requires our DataModel constantly refresh and keep its data "alive", and it's simple to implement which makes it a perfect example for our first DataModel.

The first thing we'll do when defining our Stock DataModel is abstract the data source. This way we can easily implement several data sources for fetching a stock's data and instantiate the DataModel with the right one (for example, read from Yahoo at runtime, read from fake data source during unit testing):

/// <summary>
/// Defines the interface allowing <see cref="StockDataModel"/> to read quotes from various providers.
/// </summary>
public interface IStockDataProvider
{
    /// <summary>
    /// Gets a given stock symbol's (given by <paramref name="symbol"/>) data.
    /// </summary>
    /// <param name="symbol">The stock's symbol.</param>
    /// <param name="name">The stock's company name.</param>
    /// <param name="quote">The last stock's quote.</param>
    /// <param name="change">The stock's change value.</param>
    /// <param name="open">The stock's open value.</param>
    /// <returns><b>True</b> if data was retrieved successfully; otherwise, <b>False</b>.</returns>
    bool TryGetData(string symbol, out string name, out double quote, out double change, out double open);
}

Now that we have our data source defined we can implement different stock data providers for our DataModel to consume.
Now, lets go over the StockDataModel class:

public class StockDataModel : DataModel
{
    private string _symbol;
    private IStockDataProvider _quoteProvider;

    public StockDataModel(string symbol, IStockDataProvider provider)
    {
        _symbol = symbol;
        _quoteProvider = provider;

        this.State = DataModelState.Fetching;

        // Queue a work item to fetch the symbol's data
        if (!ThreadPool.QueueUserWorkItem(new WaitCallback(FetchDataCallback)))
        {
            this.State = DataModelState.Invalid;
        }
    }

    public string Symbol
    {
        get { return _symbol; }
    }

Our StockDataModel constructor takes the stock symbol that the model represents and an IStockDataProvider to fetch the stock's data from.
We set the initial DataModel state to Fetching and queue a work item for a background thread to update our model with the stock's data - company name, quote, change value and open value. If we fail to queue the work item than we put the model in an invalid state.

Next, we need to define the properties exposed by StockDataModel for data binding.

public string Name
{
    get 
    {
        VerifyCalledOnUIThread();
        return _name; 
    }
    private set
    {
        VerifyCalledOnUIThread();
        if (_name != value)
        {
            _name = value;
            OnPropertyChanged("Name");
        }
    }
}
public double Quote
{
    get
    {
        VerifyCalledOnUIThread();
        return _quote;
    }
    private set
    {
        VerifyCalledOnUIThread();
        if (_quote != value)
        {
            _quote = value;
            OnPropertyChanged("Quote");
        }
    }
}
...

We're sign a private setter to update the property values and trigger a PropertyChanged event if required.
You can also add calculated properties. For example:

        public double ChangePercent
        {
            get
            {
                if (double.IsNaN(Change)) return double.NaN;
                if (double.IsNaN(Open)) return double.NaN;

                try
                {
                    double change = (Change / Open) * 100;
                    return change;
                }
                catch
                {
                    return double.NaN;
                }
            }
        }

In this case, it is important to remember to trigger the property change event for ChangePercent too when the values it depends on change...

Now for the implementation of the FetchDataCallback. This method will be called by a background thread to update the stock data.
Since this method is called by a background thread we're free to perform expensive operations, such as calling a web service to fetch the stock's data from an online provider (like Yahoo).

private void FetchDataCallback(object state)
{
    string fetchedName;
    double fetchedQuote;
    double fetchedChange;
    double fetchedOpen;
    if (_quoteProvider.TryGetData(_symbol, out fetchedName, out fetchedQuote, out fetchedChange, out fetchedOpen))
    {
        this.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle,
            new ThreadStart(delegate
            {
                this.Name = fetchedName;
                this.Quote = fetchedQuote;
                this.Change = fetchedChange;
                this.Open = fetchedOpen;
                this.State = DataModelState.Active;
            }));
    }
    else
    {
        this.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle,
            new ThreadStart(delegate { this.State = DataModelState.Invalid; }));
    }
}

On the previous post, on the WPF threading model overview we noted the following:

If only the creator of a DispatcherObject can access it, how can a background thread interact with the user?
The background thread does not access the UI directly but it can ask the UI thread to perform a task on its behalf by registering work items to its
Dispatcher using it's Invoke (for a synchronous call that returns when the UI thread finished executing the delegate) or BeginInvoke methods (which runs asynchronously)

In the above code, after fetching the data on the _quoteProvider.TryGetData we need to communicate these changes back to the UI thread.
We use the Dispatcher to set the new values for the DataModel properties which ensures that our property change events will be triggered on the UI thread.

Keeping the Data Alive

So far, our code only fetches the stock data once. Lets see what it takes make out DataModel keep its data alive.

protected override void OnEnabled()
{
    _timer = new DispatcherTimer(DispatcherPriority.Background);
    _timer.Interval = TimeSpan.FromMinutes(5);
    _timer.Tick += delegate { ScheduleUpdate(); };
    _timer.Start();

    ScheduleUpdate();
}
protected override void OnDisabled()
{
    _timer.Stop();
    _timer = null;
}

private void ScheduleUpdate()
{
    VerifyCalledOnUIThread();

    // Queue a work item to fetch the quote
    if (ThreadPool.QueueUserWorkItem(new WaitCallback(FetchDataCallback)))
    {
        this.State = DataModelState.Fetching;
    }
}

The above code defines a timer that is active when the DataModel is Enabled. The timer calls ScheduleUpdate every 5 minutes to perform the same data update using a background thread logic we performed on our constructor.

We're using a DispatcherTimer so that the calls to ScheduleUpdate will be made using the Dispatcher's thread (the UI thread) so that we can update the DataModel's state without a hassle. If we had used System.Threading.Timer then ScheduleUpdate would be called on the timer's thread requiring the use of Dispatcher.BeginInvoke to update the state...

That's it...

We've got the basic DataModel implemented. You can using it in you're XAML window to see it working...

To get a basic XAML running you'll need to define a content control:

<ContentControl x:Name="_content" />

And set its content to a StockDataModel instance on your codebehind:

_content.Content = new StockDataModel("AAPL", someProvider);

Then all you need to do is define a data template for the StockDataModel type to control it's appearance. Here's a simple template for example:

        <DataTemplate x:Name="StockTemplate" DataType="{x:Type local:StockDataModel}">
            <StackPanel Orientation="Horizontal" mdb:EnableModel.DataModel="{Binding}" Height="30px" Width="Auto" ClipToBounds="True">
                <TextBlock Text="{Binding Name}" Foreground="#737271" Width="120" Padding="3,0,0,3" Style="{StaticResource StockText}" />    
                <TextBlock Text="{Binding Quote}" Foreground="#737271" Width="55" Padding="0,0,0,3" Style="{StaticResource StockText}" />
            </StackPanel>
        </DataTemplate>

You can find the code discussed in this article plus my own implementation for an IStockDataProvider that reads stock data from Yahoo here:

On the next post we'll discuss DataModel unit testing and see how the StockDataModel tests are implemented.

kick it on DotNetKicks.com

About

Eran Kampf draws upon 8+ years of experience in software development and research. Eran served in the IDF's elite geospatial-intelligence as a senior software developer and is currently working at SAP as an R&D Engineer working on Duet which is jointly developed by SAP & Microsoft.
AddThis Feed Button Give Feedback

On this page...

Recent Comments

Tags

Statistics

Total Posts: 464
This Year: 44
This Month: 4
This Week: 2
Comments: 263

My Latest Twits

    Google Ads