Learning Silverlight 2 – More things you can do today.

if I were a bleeding edge Silverlight programmer who just cannot wait for release of Silverlight 2 and its documentation, here is what I'd do today:

  • Read Scott Guthrie's blog post  "First Look at Silverlight 2
  • Read Programming WPF (2nd ed) , especially these Chapters:  Layout, Input, Controls, Simple Data Binding, Styles, Control Templates, XAML
Programming WPF
by Chris Sells, Ian Griffiths

Read more about this title…

 

Another approach, which I think might be very profitable would be to recreate Scott's Digg application in WPF (or as much as you can). Little of what you learn will be wasted, and it is my personal suspicion that within a year (plus or minus six months) every Silverlight and WPF programmer will realize that they need to become proficient in both technologies (remember, Silverlight was originally called WPF/Everywhere).  That is not an official Microsoft position (in fact I just made it up) but now that I've said it, it makes enormous sense to me (see Scott's 8th tutorial).

Posted in z Silverlight Archives | Tagged | Comments Off on Learning Silverlight 2 – More things you can do today.

A note on reading, technology and mental illness

I posted yesterday about Amazon's Media Library — which I believe could be a great back end to a very cool Silverlight project and that led to a comment on the volume of my reading. I started to write a response but once you get me started talking about reading… well I thought I'd indulge in one more blog post during the gentle moments before Mix.

There have been a few amazing changes in technology that have significantly affected my reading (though I admit I was always a serious reader — see note below on reading and mental illness.)

It started with Books. Remember books?  I bought 'em by the truck load, back when Barnes and Noble was a single store on 18th Street and if you wanted a book you got on the train and went and bought it.

Then came Books On Tape which was great: rentals I could listen to in the car (though I still felt compelled to buy printed versions to look at later).  I started listening to in the early 1990s . They went out of  the retails business just as I seriously got into The Teaching Company Lectures, which has gotten better and better over the years (Click here  and then on Lectures, for my recommendations).

But the big break through was Audible (the Platinum deal is great; I buy 4 a year)

Audible

In the past 2 years I've bought a few hundred books from Audible. I love Audible. Wish they gave green stamps. Digital is so very much better than tapes. Especially digital that remembers where you are in the book. Or books. Gotta' be able to read more than one at a time.

 Ipod

You really want more than one book with you at a time.

And who can remember where all the tapes are?

Audible is one thing, but what gave it enormous power was the iPod , er,  ah the Zune, yeah, the Zune.  

Here's a picture of my Zune. (See, it says Zune right on it)

Love my Zune. Got the 80 Gig. Ran out of room on my 8.

 

 

 

Sometimes you gotta' read.

Kindle3 Then there's print. Now, I still like reading, but books are heavy (and I fractured my shoulder in December, which quintupled the weight of every page. And remember, I have ADD, which means I like to be reading a few different books so I can switch off every ten minutes. Long flights require at least 3 books, usually more. And a couple magazines. Heavy. Also, I hate waiting for books to arrive from Amazon. Who can wait two days? That's crazy.

Thank God for the Kindle Here's my ungrateful review.  (Some people are never happy). 

Right now I have 7 books on the Kindle (including Bleak House, which is big) and three newspapers and 18 pdf files. And it remembers where I'm up to in each one. I love that.  I've used about 5% of its memory and all of my book budget.  The screen is wonderful and late in the day I can make the font bigger for my tired mddle-aged eyes.

 

 

  

 

Reading and Mental Illness

When I was a kid I had serious social skills problems (I'm sure you're shocked!) and, having no friends,  I used to read 7+ books a week through junior high. I still read quite a bit.  To tell you more than you want to know, I have an interesting combination of OCD and ADD, which means that I'll buy and  ~20 (or 100)  books on a subject before I get bored (the positive aspect of obsessive-compulsive disorder) but I need to be reading 5-7 different books at a time, switching among them (there's that ADD) and the Kindle makes that affordable and possible as I can have numerous books with me at any time. Wonderful.

I typically have 3 books (okay 7) on the iPod, half a dozen on the Kindle and another half dozen I'm in the middle of on paper.

That plus newspapers, blogs and magazines and I'm a happy guy.  

The device I really (really) want is one that lets me read (like the kindle) then switch to audio when I have to put it down, then switch back to reading. But that's asking a lot, so I'll give it a few more years.

There Ain't No Parity

We say, but we don't mean it, that mental illness is just like physical illness. Nothing to be ashamed of. But we're lying. We want to believe that. But we don't. .

 Few of us  hesitate to say "yes, I have high blood pressure" but we sure don't go around saying "I have OCD" even if the OCD is under control and the hypertension isn't.  Why is that? The result, by the way, is that the average time from onset of symptoms to beginning of treatment for OCD is 17 years (in my case, more like twice that). 

Microsoft is a wonderful company, with fantastic benefits, but like almost every company and state in the US, its Mental Health benefits are not quite the same as its physical health benefits. I get why, but they're still not.

Finally, we spend a lot of time saying things like "I don't want to take those medications, then I won't be me" but again I don't hear people saying that about Lipitor (for cholesterol) or their anti-hypertensive's. Turns out that the SSNRIs I take had just the opposite affect; they removed the overly anxious grump who was always getting me into trouble and let me alone. Might not be much, but its much quieter.

Okay, we now return this blog to your regularly scheduled technical obsessions.

[PS: The graphics on my blog have been too ugly lately. I'm working on it. May have it licked.]

Posted in z Silverlight Archives | Comments Off on A note on reading, technology and mental illness

Share Everything…

Clearly one thing that social networking is about is exploring the limits on what you want to share and what other people might be interested in. There is, I'm sure, at least one sociology paper (and two reports to the D.A.) in this theme…

Different social networking services have been more or less successful in getting folks to enter information about what they're listening to, reading, etc., but if there is one lesson after 20 years in this industry it is that people love to share, but they hate filling out forms more than 2 or three times. Ask most people who, unlike me do not have OCD, to fill in all the books they've read or all the music they've bought, and they get bored right quick.

Amazon, however, is in a unique position to let you share without doing nearly that much work. All you need do is to agree to sacrifice a bit of privacy and hey! presto! instant lists and lists and lists.

 

Now, with Amazon's Your Media Library I can start off with a list that Amazon keeps for me.

 

I can easily take a more visual view, which just cries out for a Silverlight front end, don't you think?

(NB: I've chopped these images down to help them fit)

 

Hmmm…. the potential is pretty powerful. Even if I don't use their front end, there may well be a way to hook into their list as a web service or… a Sliverlight application. 

It's way too late at night to figure this all out, but it is very intriguing, so I'm going to go dream about it and see what I can some up with.

Meanwhile, if you write anything interesting that creates a Silverlight front end to this service, be sure to let us know.

 

[NB: Sorry about the original images. Fixed now – Dope Slap!]

Posted in z Silverlight Archives | Tagged | Comments Off on Share Everything…

Tip of the Day – Suspends Until Mid March – Then Focus On Silverlight 2

Rather than trying to provide a Tip of the Day as we head towards one of the larger and more important  shows of the year (you Mixare going to Mix, right?)

Therefore, I'm going to suspend the Tip of the Dayimage from now until mid-March.

After Mix, I'll be going on a family vacation we can't change (life is tough). But…

… As soon as I get back,  I'll be launching a set of coordinated  efforts, including a reliable Tip of the Day focused on Silverlight 2*.

The new Tip of the Day will publish no later than  1pm Eastern, at least 5 days a week and will be part of a much larger effort that will include frequent Silverlight 2 blog posts, How Do I videos, monthly Webcasts and more.  Stay tuned; many details to come.

 

 

 

*Note: we've announced that we will be releasing Silverlight 2 during the first Quarter, which means by March 31. This note in no way implies any change to that plan.

Posted in z Silverlight Archives | Comments Off on Tip of the Day – Suspends Until Mid March – Then Focus On Silverlight 2

Silverlight 1.0 for Total Novices [Updated]

 I received two emails today asking that I repost my recommendations on how to get started with Silverlight 1.0. Here you go….

The best way to get started is to go to the Silverlight site  and click on Get Starged

SLToolbarCropped

From there you can click on Get Started to download the files you need. My advice would be to:

  • Skip the  Watch the Getting Started Video
  • Download the Silverlight 1.0 runtime(s)
  • Download the Developer tools
  • VS 2008
  • Silverlight 1.1 Tools For VS 2008 (yes 1.1, even though you'll be building 1.0)
  • ASP.NET Futures
  • Download the designer tools
    • Blend 2
    • Encoder
    • Design (optional)
  • Download the 1.0 SDK(s)
  • For now, you really only need Silverlight 1.0 and can safely skip the 1.1 files, except that you will want Silverlight 1.1 Tools For VS 2008 because it includes what you need to write Silverlight 1.0 applications in Visual Studio 2008 as explained here.

    After downloading your files and installing them, return to Silverlight.net and click on  Learn. (as shown in the image above). Then click on the 1.0 Videos.

    Start with the following videos: #1, #3, #57, #24, #49, #30, #34, #36 in that order.  [ Update: Oops – they renumbered!!   I'll get you the new numbers as soon as the site numbering settles down, or else I'll get you links. For now, please look for introductory videos and ignore the numbers ]

    Then explore other videos, or click on QuickStarts for another perspective on getting going.

    Finally, as you explore further, and questions arise, please be sure to join our Forums where, to date, over 11,000 members have contributed to nearly 20,000 topics (don't panic, it is very well organized!)

    Best of luck, and please do let me know if I can be of further help,

    Jesse Liberty
    Silverlight Geek

    Posted in z Silverlight Archives | Comments Off on Silverlight 1.0 for Total Novices [Updated]

    Tip of the Day: How To Answer: Will This Work In Silverlight 2.0?

    I'm beginning to receive a lot of email about what is coming in Silverlight 2.0. Today's was pretty typical, so I thought I'd post the questions and answers (without revealing anything specific about this writer's application), as  a guide to the kind of response you can expect.  (Published early today to get an answer to this reader!)

    Please note, the best place for this kind of question is our Forum, where you'll get a far faster and more comprehensive answer; but I do understand why some folks write directly.

    Here is the (slightly edited) letter with my response

    I am the architect [responsible for redoing the UI of a large calculator/spreadsheet that is now in ASP.NET and that goes back to the server for all its calculations. I'd like to consider Silverlight rather than AJAX to move the calculations to the client, with the main benefit being managed code]…

    If we rebuild the application in Silverlight (assuming 2.0 with a 2009 go live) would we be able to use the existing c# libraries built out for validation and calculation without reworking them? … plug-in and [access our rules on the client. This would eliminate a lot of round trips and network traffic.]

    I want to give you all the information I can, but for the moment I have to give you somewhat  less information than will be available once we release Silverlight 2, which we will do very soon. The release date remains 1st Quarter of this year for Beta 1 (that is, no later than March 31). I'm willing to go out on a limb and say we're working hard to come in a bit early.

    So I'm going to ask that you re-send this question to me after we release, if that is okay. In the meantime, I’ll do some research to see if I’m at Liberty™ to say more.

    The specifics of what will be in Silverlight 2 has not been announced, though some general guidelines have been written about here.  We have said, for example, that we’ll support C#, and that we’ll support a significant subset of the CLR.

    Let's assume we wanted to get something done ….today  [using Silverlight 1.0 for now] Could I put a hidden Silverlight component on the page that encapsulates the c# libraries from the server? Then I could simply swap out the Ajax post-backs on each existing field for a js call to the Silverlight engine and update the fields accordingly.

    You could certainly create a hidden Silverlight 1.0 control on your page.  It  in turn, could certainly interact with a web service and/or do work on the client side. And further, you could later swap this out and replace it with a more powerful Silverlight 2 control. 

    On the other hand, I'm not convinced this is a big win; because by the time you have your 1.0 component working 2.0 will be ready and they will work quite differently.  For example, Scott's blog entry notes that Silverlight 2 will support "two-way data-binding support" –

    I don't think I'm giving away anything to say that we'll have extensive data support; I'd hate to see you build an infrastructure only to throw it away. Frankly, I think it would be a bigger "win" to spend your time, for example, reading chapter 5 in Programming WPF — while the details in Silverlight 2 may be slightly different, Silverlight 2 is so closely related this will be time very well spent. See this Tip of the Day for more.

    As a side question, if all I was doing was building a rules/calculator engine in Silverlight I would assume that all things being equal it would run faster and have a smaller bandwidth footprint than an equivalent js class. Is this the case?

    There is no question that if you build such an engine in C# vs. .js it will be smaller and far faster.

    So basically, am I on the correct track with this? I don't want to misuse the new Silverlight technology as my predecessor did when they misused Ajax.

    Sounds to me like you are very much on track. AJAX is great, and has all sorts of advantages, but you seem to value performance very highly and Silverlight 2.0's huge advantage for you will be the ability to code with C# and the CLR.

    I can assure you that as we announce Silverlight 2.0 we’ll be providing a great deal of documentation and support through Silverlight.net I wish I could say more today; I’m not trying to be coy; but we want to make sure that we deliver on what we say and we do so with a unified and coherent voice. That will be very soon.

    If I learn more about your specific questions, I will certainly send you a private email. In the meantime, thanks for your patience.


    A side note to readers of Tip of the Day: Due to circumstances, Tip of the Day will be spotty for a while; probably off the air for a few days, and less frequent than I'd like leading up to Mix. I promise to make it up by a huge outpouring of Tips starting after my incredibly ill-timed vacation ends  on March 18. At that point, you can expect no fewer than 5 Tips of the Day per week through the summer.

    Posted in z Silverlight Archives | Tagged | Comments Off on Tip of the Day: How To Answer: Will This Work In Silverlight 2.0?

    Kind Words, the fuel of cooperative communities…

    A very kind reader sent this, and I am incredibly happy to share it with you.  Stay tuned for another Tip of the Day later today.

     

    In getting ready for Silverlight 2 I've been playing with some early bits. Today I began to see how much easier some things are going to be and your eagerness to know is now far exceeded by my eagerness to tell.  Soon, soon.

     

     

    [Interesting. I've been having some qc issues with images. Must keep an eye on that.]

    Posted in z Silverlight Archives | Comments Off on Kind Words, the fuel of cooperative communities…

    Tip of the Day – Popfly

    Mix is fast upon us, and to be perfectly honest, I'm preparing frantically. That means that I've been behind in my Tip of the Day. Rather than closing it down, I want to take the three weeks between now and Mix and really focus on some areas of Silverlight 1.0 that I've not been paying enough attention to.

    We know that Silverlight 2 is just around the corner; while we've not announced its release date, we've said it will be in Q1, which means a matter of weeks. Let me assure you that will many of my Tips of the Day and blog posts will be on Silverlight 2, which after all will be new and exciting (and amazing) it will also be Beta, while SL 1 is a released product, and so will not be neglected.

    One of the areas that I personally have been meaning to pay more attention to is Popfly.  With the attention it has been given by my publisher, I thoght this might be a good time to start.

     Popfly

    I decided to start with the Popfly videos. I watched the 30 second video and based my starter app on that. To begin, I grabbed the Twitter block and set its properties to my Twitter account.

    TwitterBlock

    Clicking on the wrench (see arrow) opens the block for you to set its properties,

     

     

    BlockExpanded

    I added some arrows to the image above to make pointing out the pieces a bit easier.

    The three black arrows point to the three properties for this block..

    The first, set by a drop down, lets you decide which operation you want the block to perform (I chose getFriendsPosts).

    The second asks for your Twitter user name, and the third asks  how many posts you want to get at a time.

    The blue arrow (near the top)  points to a button that lets you see the actual JavaScript code that implements this Popfly control,

     

    TwitterCodeView

    As noted in the highlighted area, you are free to edit the Javascript directly if you can't help yourself, but Popfly is designed to work wihtout your having to write any code at all.

    At any time, you can click preview to see the results of your work so far; in this case, my one Popfly block running alone.

    When I click preview, the block goes out to Twitter, finds the account and returns my Twitter notification

    TwitterBlockPreview

    This isn't quite what I wanted, but that is not a problem. I click on Customize and  the block comes back. Click on the wrench, the edit block comes back.

    I can edit the properties and I can count on tooltips to help me determine the meaning of the properties.

    EditTheBlock

    Each small change is easy to test by clicking on preview

    GoodTwitterResults

     

    Adding a 2nd Block 

    When I have the block working the way I want, I can add a second block, and most important, I can "mash them up" by clicking first on one and then on the second. If the output of the first is meaningful to the input of the second… voila!

    In this case, I'll drag on a news reader as my second block.

    NewsReader

    The News Reader block  is happy to take the output of the Twitter block as its input.

    To create the connection, click on the source (Twitter) and then the receiver (NewsReader) and the popfly editor creates the link

    CreatingLink

    To see the link at work, just hit preview.

    SilverlightPlusNewsRead

    The console output (visible at the bottom of the page) makes the interaction explicit:

    Twitter:
    twitter: Calling getLatestFriendsPosts("jesseliberty", 10)...
    Getting data from http://twitter.com/statuses/friends_timeline/jesseliberty.xml?nocache=
    Tue Feb 12 14:05:35 2008... The call to http://twitter.com/statuses/friends_timeline/jesseliberty.xml?nocache=
    Tue Feb 12 14:05:35 2008 returned with status 200.
    News Reader:
    newsReader: Calling addNewsItem("SilverlightNews", "Tue Feb 12 18:59:06 +0000 2008", 
    "Tip of the Day - Getting Ready for Silverlight 2 - http://ittyurl.net/5UIG",
    http://www.silverlightcream.com/)...
     
    That's it. Save and I've got my first working Popfly Mashup.
     
    More to come.
    Posted in z Silverlight Archives | Tagged | Comments Off on Tip of the Day – Popfly

    Tip of the Day: Programming with Media in 1.0

    A user posted a comment in response to one of our videos (did you know you can do that now??)

     

    I thought others might want the answer as well….

    This quick start on media may be a good next step. 

    There are a number of How Do I videos on using media. 

    I'd recommend starting on the Learn page, click on Silverlight 1.0 and take a look at videos # 28, 29, 30, 52.

     

    Then return to the Learn Page again, but this time click on Expression Blend and take a look at #6,8,10.

    You might also find these three postings useful supplements.

     

    Hope that helps.

    -jesse

     
      Digg!

    [updateed 20:06 GMT 5;  2008-Feb 10 to improve image quality]

    Posted in z Silverlight Archives | Comments Off on Tip of the Day: Programming with Media in 1.0

    One more gadget (the ego never quits)

    BlogGadgetI woke up at 5 this morning, so I decided to take apart the Silverlight Tip of the Day gadget that Kelly White had so kindly created and, as an exercise in egomania, modify it to display all my blog entries, rather than just those that are tagged as Tip of the Day.

    It turned out to be an interesting adventure in playing with Sidebar gadgets, in the frustration of making sure you find all the references to all the images, and not much more than that (oh yes, it was a good time sink).

    In any case, here it is, if you want a copy: Silverlight Blog.gadget.zip.  Just unzip it into the usual gadget folder and it will run side by side with the Tip of the Day gadget, or you can choose one or the other or neither.

    Now, to make this at all relevant, the next step is to put a Silverlight control together that does the same thing. That would be worth blogging about!

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Posted in z Silverlight Archives | Comments Off on One more gadget (the ego never quits)

    Tip of the Day – Getting Ready for Silverlight 2

    We have announced that Silverlight 2 Beta 1, will be released during the first 3 months of this year (that is, any day now) with a go-live license. It is important to keep in mind that this will be a beta product, and that 1.0 will be a release product, but you can bet that there will be a lot of interest in Silverlight 2 because it is… well.. fantastic.  And filled with great stuff. (And is the proximate cause for my ending 12 years as an independent contract programmer and becoming a  Microsoft employee!)

    So, as you can guess, like lots of folks in and out of Microsoft, I'm busy ramping up a huge amount of material have ready as soon as Silverlight 2 is released  (though I promise not to neglect Silverlight 1.0). And, like lost of folks, I've found that there is a lot to learn.

    I'm asked at least once a day how developers can start learning 2.0 even before they get their hands on the bits. Or the documentation. Well, I can in fact tell you, without getting fired, if I word it very carefully. 

    image

    Silverlight uses XAML and while we've not announced the complete set of controls that will be implemented in Silverlight 2.0, if you review Scott's blog post again you'll find that we hae said that there will be layout manager support, two way databinding support, control template and skinning support along wth textbox, checkbox, radiobutton, StackPanel, Grid, TabControl., Slider, rich networking support, generics, isolated storage,

    image

     

    That turns out to be a lot of information about what to look for in Silverlight 2 (though not necessarily in Beta 1), and all of that is a subset of what is already well documented in WPF.  So if you are eager to get going, you can hit the books today with a good book on WPF. Here are three I think are particularly good:

    Programming WPF
    by Chris Sells, Ian Griffiths

    Read more about this title…

    Windows Presentation Foundation Unleashed (WPF) (Unleashed)
    by Adam Nathan

    Read more about this title…

    Essential Windows Presentation Foundation (WPF) (Microsoft .NET Development Series)
    by Chris Anderson

    Read more about this title…

    For example; let's say that in reviewing Scott's article you decide you'd like to get a head start on understanding how controls are going to work. No one can promise which controls will be in the beta, nor that they'll be precisely as they are in WPF, but I'm willing to go on record saying that spending the time reading chapter 5 in the Sells/Griffiths book would be time well spent, as would be true with the other 2 books.

     

    I'm sorry this ran a bit late today and I hop you find it a helpful start.

    Posted in z Silverlight Archives | Tagged , | Comments Off on Tip of the Day – Getting Ready for Silverlight 2

    Tip of the Day – Time to move to Generic Collections for Silverlight.

    In Silverlight 1.1 the non-generic collections were marked obsolete. We have announced that the non-generic collections will not be in Silverlight 2.0 at all, so if you're still using non-generic collections like ArrayList it is time to step up to the generic equivalents like List<T>

    This is actually good news, because the generic collections are  simpler, more performant create type-safe libraries and create code that is easier to maintain. Besides, they're easier to use than it looks like at first.

    You can learn about programming with generic collections in many places. Here are three to consider, depending on where you are on the managed code learning curve….

    If you're going to be tackling learning Managed Code for the first time, then I personally would recommend learning C# from my favorite author: 

    Programming C# 3.0 (Programming)
    by Jesse Liberty, Donald Xie

    Read more about this title…

    We cover all of C# 3 with a focus on building .NET applications. Of course there really are a lot of good books on C#, so you'll want to look around.

    eLearning If you prefer an on-line course that goes into depth about generics, you may want to take a look at Microsoft's Implementing Collections and Generics in the Microsoft .NET Framework ($18 month subscription $39.99)

     

    Oreilly I also have a couple free articles on Generics up on the O'Reilly site.  What Are Generics, is written in VB and C# Generics is written in… you're way ahead of me.

    They were written when Generic collections were introduced (2004/2005) but they should be fully up to date.

     

    Best of luck.

    Posted in z Silverlight Archives | Comments Off on Tip of the Day – Time to move to Generic Collections for Silverlight.