Page view counter

July 2008 - Posts

Programming Silverlight 2 – Jesse Liberty & Tim Heuer

 

I normally do not pre-announce books.

That said, this book is likely to be of significant interest to this community, and so, now that it is officially listed on Amazon, I thought it reasonable to mention that it is on the way, and that Tim and I are exceedingly proud of it.

Our goal in Programming Silverlight 2 is to tell the story of Silverlight, not to reproduce the documentation. For me, it is a wonderful opportunity to bring together all that I’ve learned in creating the videos and the tutorials and getting your feedback about what is helpful and what is not.

In the book we go far deeper than we’ve had the opportunity to do so far here on the site, but at the risk of undermining sales, let me say that everything we cover in the book we will, no doubt, cover sooner or later here as well. The advantage of the book is that it is all put together in a single place in a single coherent telling.

We’re going to hold the book until Silverlight 2 is certified as final, which means we won’t be first to market, but on the other hand we’ll have it right, and that seems worth while. in addition, the book will mark a beginning, not an end, in that once the book is in print, we will continue to build videos and other material that will add depth for the more advanced programmer, and we’ll continue to create on-ramps for the programmers first arriving at Silverlight from .NET and elsewhere.

Thank you for indulging my book announcements. We now return you to the technical blog, already in progress.

One of the most unusual books I’ve ever written

I’m pleased to announce the release of what may be one of the most unusual books I’ve ever written, Programming .NET 3.5

Briefly, it was our theory; generated long before I started work at Microsoft, that while there was good reason to write what I call “silo” books on each of the .NET technologies (e.g., WPF, WCF, etc.) there was a coherence to the entire Microsoft framework that was potentially missed by that approach.

Our other theory was that .NET 3.5 (broadly defined) was the first version of .NET to fully facilitate the development of n-tier applications and MVC (imagine our shock when Microsoft developed the MVC library for ASP.NET!)

All in all it was a blast to write, even though we did have to write it twice (originally we wrote Programming .NET 3, then we totally rewrote it for .NET 3.5, so this is really the 2nd edition!).

I’m not sure more than half a dozen people will buy the book, but it may catch a wave, who knows? In any case, we had fun and learned a great deal while writing it.

Posted by jesseliberty | 2 comment(s)
Filed under:

One Team – 4 Books on ASP.NET 3.5

I just released Learning ASP.NET 3.5 which is very exciting, through I must quickly and freely admit that my co-authors did a fantastic job shouldering the bulk of the task of the massive re-write to bring this book fully up to date for ASP.NET 3.5.

The Learning series is O’Reilly’s on-ramp, while the Programming books are targeted at the more experienced and professional programmer. That said, this book is surprisingly comprehensive and we’re quite HanselmanBookproud of it.

There are quite a few good books on ASP.NET 3.5, one written by my colleague Scott Hanselman,  that has gotten rave reviews.

ASPUnleashed Then there’s ASP.NET 3.5 Unleashed by Stephen Walther, new to our team but not new to writing fantastic books on ASP.NeT

 

 

Oh yes, I almost forgot, I’m about to release Programming ASP.NET 3.5, due out Sept. 15.

 

I suspect there are even some books by people not on our team.

So don’t buy anything until you read through a few books and decide on what you like in terms of style, coverage, approach, exercises and all those intangibles that make for a great technical book. 

Enjoy.

New Tutorial: DataBinding and Data Templates

I’m pleased to announce that we’ve posted a new tutorial: DataBinding and Data Templates Using Expression Blend available in HTML and pdf with source code.

tutorialpdf

  This should nicely complement the three new videos on DataBinding

  Overviewxaml Blend

I hope you find them useful.

Posted by jesseliberty | 4 comment(s)
Filed under: ,

Flecks Flash By…

There is a posting going around about how some part(s) of Microsoft are using Flash or some other not-Silverlight technology and how even Microsoft doesn’t believe in Silverlight, blah blah blah.  I’ll leave it to people who have investigated and who care to straighten out this silliness, but I will say that from what I can tell, there are a lot of post-hoc ergo prompter hoc errors floating around.

The good news is that this prompted a discussion with a very bright member of our community (ew, what a phrase; take two:) with a buddy that I thought I would post here, cutting down his comments and fixing up mine to make them seem much more incisive.

After some back and forth, this lead us to a discussion of his desire to choose to work in Flash or Silverlight, but really not to try to work in both for any length of time, and did I have any thoughts on the matter.

I wrote…

…for me it was never a question. Microsoft’s commitment to Silverlight is unquestioned and core; and as a developer I focus on (a) the commitment, (b) how does it fit into the lineup of development products and (c) what tools can I use and (d) what is the customer base.

As a .NET programmer for 8 years, Silverlight fits in perfectly, and the commitment to Xaml, first for WPF, then Workflow, then Silverlight, and the backflow from Silverlight to WPF, and the promotion of Scott Guthrie to VP, and the hiring of Ray Ozzie, and the creation of the Expression tools and the people they hired to head those teams, and the creation of the Developer Liaison Group that I work in, and more that I can’t talk about in terms of commitment to Silverlight going forward,  all add up to a place I had no doubt I wanted to be and that I still want to be.

….speaking as an individual and not as a Microsoft employee (which I’m told is not possible) I personally would base my decision [as to which to commit to] on what is predictable and not on what is unknowable. So, what can we know with reasonable certainty:

1. Both companies are likely to be around in 5 years, as are both products in some form

2. Both products are likely to evolve, especially in response to one another and for all we know there will be an unexpected third player to come along when we least expect it

3. There will never be an objective view point (who would provide it?) – see my blog post on don’t believe anything I say

While I have a friend who has made a great living by being a jack of all trades, that never appealed to me. Like you, I’d rather stay in one general line of technology; there is enough to learn that I won’t get bored.

So, which? The answer to that (and here I am clearly not talking for anyone but me) is to ask yourself if you have a strong stake in either camp.  If you have a strong stake in the Flash/not-Microsoft camp, then I suppose I’m supposed to turn you over to someone who can tell you why you should switch… 

If, like me, you have a strong stake in .NET then it is a no-brainer because everything I’ve seen and heard convinces me that Silverlight is the right place to put my chips (no warranty expressed or implied). 

Then a final observation, one can complain all one wants about Microsoft, but my experience for the past two decades is that the arc of our products (especially  development products) is that they get better over time, usually a lot better and usually quite quickly.

So, I quit 12 years of happy independence and came to work on the Silverlight team. I just passed the 1 year mark, and I’m committed for at least another year. I can’t make a stronger statement than that.

Posted by jesseliberty | with no comments

Camtasia Crash Tip Update

Back on July 3 I posted a Camtasia Crash Tip for those of you who use this terrific product for screen captures.

Since then, unfortunately, I’ve been plagued by crashes, and it turns out that TechSmith, the wonderfully responsive folks who make the product have found the problem and a work around.  In short, the problem lies in the metadata in the camrec and there are two solutions until they solve the problem.

1. You can record directly to avi and eliminate the problem (but also eliminate the ability to do picture in picture while you are recording your capture).

Save As AVI

2. You can create your camrec as usual, but then immediately strip it when you are ready to use it,

ExtractCamrecContents

and then import the avi (with your screen capture) and the mov (with your pip) but not the .dat file (which is the source of all evil).

So sayeth techSupport at TechSmith

Posted by jesseliberty | with no comments

Four Twitter Silverlight Blogs

A brief review of the Silverlight Twitter blogs I’m following or using...

SilverlightNews – very popular and closely connected with one of the premier Silverlight aggregators: Silverlight Cream.

Silverlight Events with a Twitter feed and a web page all managed by the extraordinary Adam Kinney

SLGeekToolThe SLMicroblog:  an experiment in “what can I blog that is useful to say in 140 characters. To be honest, it moves among a few different states: Tips of the Day, Very short Blog entries, references to longer blog entries, and short periods of rest.  I’m hoping for more of the first two as they are what make it worth while.

The Silverlight HyperBlog explained in here, but the essence is to record everything and anything I’m working on, thinking “out loud” into the blog, including ruminations, absurd speculations, etc. I have no idea why anyone would want to subscribe, that is part of the experiment; is this the least bit interesting? What I’m finding is that I’m interested in the process, at least from time to time, though I fully admit that there are other times I just work and the Hyperblog goes (blessedly?) silent for a while.

Finally, I should mention that I do have my own Twitter account, but I really only use it when I’m at a conference.

As for keeping up with any/all of this, the best tool I know of is Emil Stoychev that I wrote about here.

In-State Animation In A Nutshell

I’ll be covering this in videos and tutorials in depth, but I’ve come to realize that in-state animation is so straight forward that it can be explained in a quick blog entry. In fact, the really hard part is explaining what it is viz: the Visual State Manager uses animation (story boards) move from one state (e.g., MouseOver) to another state (e.g., MouseDown). In-state Animation allows you to add animation whilst (I’m going to the UK soon) you are in a state.

An example: When teaching templates I show how to have a button “swell” when you mouse over, and then I show how to have that swelling be non-instantaneous (by setting the transition time to non zero). You can see all that in this tutorial or in this video.  If however, you’d like your button not only to swell, but then to pulse gently while you hold the mouse over it, you need a bit of in-state animation. Fortunately, this is incredibly easy to do.

Start With The Tutorial Code

To keep this as simple as possible, I’m going to start with the code from the tutorial which I’ll open in Blend. There is quite a bit of code here, but I don’t care about any of it except modifying the template for the Button – specifically the Mouse-Over behavior.

Thus I’ll click on the Resources tab, turn the triangle to reveal what is in App.xaml and double-click on RoundButton, putting Blend into Template Editing. 

In the Objects and Timeline tab I can see the contents of the Round Button (the Ellipse and the Text). I’ll click on MouseOver which is the state I want to change, and I see that both sub-parts are already being changed (they swell). In properties / Transform I can see that the Ellipse and the Text are increased to 1.2 (120%) of their normal size. Great, ready to go.

To begin the in-state animation, I click on the Show Timeline button:

 

 

ShowTimeline

This immediately causes the timeline to slide out from behind the Objects and Timeline window. There are two ovals at time 0 indicating that what I’m looking at in the properties window is the state of the ButtonEllipse and ButtonText the instant the button is fully in MosueOver state (that is, once the transition completes).

I’ll click on 1 second which will light that line yellow and now I'm ready to set the properties that I want at 1 second; specifically that the ButtonEllipse and the ButtonText will shrink to 0.8 (80% of their initial size).  A connection appears between 0 and 1 second indicating that the time between will be filled for me with the intermediate values, and sure enough if I click on one of the ticks between, I can see in the transforms window an intermediate value.

Setting The Repeat Behavior

ClickOnState

The next step is key. Click on the State  in the Objects and Timeline, which will bring up the Common Properties window in the Properties area…

 

 

 

 

 

… so that you can click on AutoReverse, and Repeat Behavior of Forever.

SetRepeatBehavior

 

 

 

 

 

 

 

 

Note that in my preview of Blend it sticks on 1x but the Xaml is property updated.

That’s it!

Click on the Page.xaml breadcrumb to exit the template editor, and then press F5 to compile and run. Your button should pulse when you mouse over.

Nothing to it

For fun, try having the text grow while the button shrinks. Or you could have the text spin while the button pulses. There is no end of annoying things you can do once you know how.

Enjoy.

Posted by jesseliberty | 5 comment(s)
Filed under: , ,

Templates and Animation Webcast – Follow up

 

I had the pleasure of presenting a Webcast on Templates and Animation today, and as promised, here is the answer to an open question, and the set of links that were mentioned.

iStock_TwoButtonsXSmall

 

 

 

 

 

 

 

Why couldn’t we animate the Border?

You will remember that I was unable to animate the border thickness in my impromptu demonstration of in-state animation.

Had I looked at the documentation, I would quickly have found that the border thickness is read-only!

Fortunately we were able to animate the opacity which actually gave a more satisfying effect.

Source Code

The complete source code for today’s web cast is available here.

Posted by jesseliberty | 1 comment(s)
Filed under: , ,

Check out our new Learn page!

We listened, we heard, we acted.

The new Learn page is designed to make it easier to get started, and easier to find what you are looking for. It is also pretty snazzy.  I’ve shrunk it to point out a few features that I think will go a long way towards making life easier for folks trying to find the information they need.

NewLearnPage

(This image has been cropped and reduced to fit and to focus on the areas of interest)

I personally think the folks who did this did a great job, and I’m very pleased and proud to be associated with it. That said, after a couple days of living with it, we’d be happy to have your feedback, suggestions, ideas and etc., as always!

In the meantime, I’ll enjoy what I think is a pretty significant improvement. Hope you find it not only more attractive, but (much more important) more useful.

Digging Deeper: Templates and the Visual State Manager

There has been a number of requests for videos, tutorials and Webcasts that dive deeper. A few weeks ago I scheduled a Webcast for this Wednesday to cover  the Visual State Manager which presents a good opportunity to do so.

During this Webcast I will endeavor to provide a context for skinning in general and the VSM in particular, and to provide a general introduction to the overall Parts and States Model. By the end of the hour you should have a solid understanding of what it takes to re-skin any existing control. 

This will be followed by Part II, one month from now, in which we’ll focus on creating Custom Skinnable controls and at that time we’ll dive very deeply into the Parts and States model.

If there are issues you are running into with the VSM, with transitions or with skinning controls, please let me know in the next couple days and I’ll try to address them in my presentation. 

I look forward to seeing you there.

Thanks!

Posted by jesseliberty | 3 comment(s)
Filed under:

Webcast schedule has been updated

The Webcast schedule has been updated slightly. You can find it here. You can always find it in the sidebar as well:

WebcastSidebar

The key change is this

September 10 Silverlight Animation and Expression Blend

Posted by jesseliberty | 1 comment(s)
Filed under:

Three New Videos On Data Binding

[Temporary Notice – The video DataBinding and Data Templates in Xaml has been pulled due to a production problem that is expected to be resolved no later than Tuesday.]

I’m pleased to announce that we’ve posted three new videos on DataBinding and on DataTemplates (creating templates that control the display of a collection of data in a list control such as a list box)

 

 
(click image to go to video)

An Overview explains the fundamental concepts of DataBinding and ListTemplates.

 

 

 

 

 
(click image to go to video)

DataBinding and DataTemplates in Xaml shows how to bind the properties of business objects to Silverlight controls in Xaml and how to create DataTemplates by hand.

 

 

 

 
(click image to go to video)

DataBidning and DataTemplates With Expression Blend recreates that same work using Expression Blend (and note that it is 9 minutes vs. 22!).

 

 

 

 

A Note To Those Who Want Deeper Material

I’ve received a lot of feedback from users who feel that we’re mired in introductory material; especially about data. I will at a later date write a longer blog post on this, but the short response is “I hear you and your wish is my….”  

While balance is important (lots of folks are still just arriving) there is no reason we can’t dive deep as well. The Webcast schedule calls for a discussion of Creating Skinnable Custom Controls and From DB to Display in the Data Grid with Silverlight, but those are pretty far out on the calendar (Aug27 and Oct 15 respectively). I can certainly get tutorials and videos on those subjects out before then.

In the interim, let me know what other advanced topics you’d like to see covered and either Tim or I will try to make sure we add them to our list and give them high priority.

Thanks!

Posted by jesseliberty | 9 comment(s)
Filed under: , ,

Web 2.0 Run Amok

In the past few months, I’ve dramatically increased the number of channels from and to the community and since they are likely to cause some confusion, this post will briefly review and explain my intentions.

First, the list:

  • Tutorials
  • Books
  • Videos
  • Webcasts
  • Presentations
  • Silverlight Blog
  • O’Reilly Blog
  • My Other Blog
  • Amazon Blog
  • Private Twitter
  • Silverlight MicroBlog
  • Silverlight HyperBlog  +Email +Forum
  • Portal
  • Book Support
  • Email
  • Phone
  • Emergency IM
  • Other IM
  • Technorati
  • Facebook
  • DotNetSlackers
  • CommunityCredit
  • Plaxo
  • Linked In
  • Del.icio.us
  • DiggIt
  • Wikipedia
  • Flikr
  • etc.

Formal, Mostly One Way, High Value Communication

SidebarLinks A large part of my job is to produce what we call “content” (though I bet I’m not supposed to say that out loud) which includes our Tutorials, Videos, Presentations and Webcasts.  You can always find links tot he latest of these on the sidebar of my blog

In addition, Tim and I are under contract with O’Reilly to write the forthcoming Programming Silverlight 2 which has been embraced by Microsoft and is also (isn’t this cool?) part of our job here.

I try to keep my Blog reasonably focused on Silverlight, but I do include the occasional article on anything from technology rants to just rants.  That said, if the signal to noise ratio falls too low, let me know!

 

Other Connections

iStock_connections_xSmall

In addition to the big 5 (Tutorials, Book, Videos, Presentations and Webcasts) I’ve created as many innovative connections as I can think of or steal from others. These include a few that require explanation…

The Twitter Family

  • Private Twitter – I use this for occasional outbursts, but mostly to let folks know where I am when I’m on the road
  • Silverlight MicroBlog – an experiment in “how much blogging can you do in 140 characters” – that I’m still working on but that is an interesting idea I keep coming back to
  • Silverlight HyperBlog – a new experiment in blogging my work day in some detail supported by a dedicated email address to get feedback and a dedicated community forum in case subscribers want to discuss anything that comes up in the blizzard of tweets.   This is clearly experimental, but interesting.

Other Blogs

O’Reilly Blog and author site is often neglected in favor of this one. However, it does  contains links to book information, old articles and can be useful (at least to me) from time to time.

The  Amazon Author Blog is mostly a “fan” site, with reproductions of blog entries from elsewhere, the occasional original entry and such compelling data as my wish list and my most recent purchases (a digital download of Brian Eno’s Fat Lady Of Limbourg)

Finally, I recently renamed my political blog to My Other Blog – it has had numerous names, but its focus has moved away from pure *** Politics and it is now where I write anything I feel the need to write that doesn’t belong here (perhaps this blog entry should have been put there??) 

Phone and IM

I’m quite ambivalent about posting my phone number and now I’ve added Instant Messaging to my blog, which is absurd. 

LiveIM

With 1/2 a million readers of my books, and 200+ incoming emails a day, and working an average 70 hour week, it is silly to think that I can answer calls or take IM. But there is an endless internal psychic conflict in  wanting (needing?) that personal touch; meeting the needs of the individual developer. Of course, the reality is that the only choice is to redirect callers to the excellent Silverlight forums or to my book support site, but this keeps alive my hope that I will, from time to time, be able to provide that personal answer that gets someone back on track.

Web 2.0 Sites

It may not be completely accurate, but I would put my membership in Plaxo, LinkedIn, Facebook, Flikr, even DotNetSlackers and CommunityCredit under this heading. All of this is an effort to be “out there” as a presence, reaching out to the community. At the same time, participating in Technorati, Deli.icio.us and DiggIt is a way to let folks know about the Blog, and Wikipedia is not something I can control but it is a blast to be listed.

All in all, my goal, over time, is to provide access, community and, most important, useful information, with as little noise as possible.

Canonical Q&A

Every day I get about 10-30 questions that I answer with a stock response (sorry) that says something like

Hello and thank you for writing.

I would encourage you to post your question in the Silverlight Forums. Be sure to include:

* which version of Silverlight you are running,
* which version of Visual Studio and/or Blend you are using and
* whatever else you can add to help reproduce the problem.

Meanwhile I’ll try to look into this as well.

Thank you,

I hate this answer; but it is the right thing; I can’t possibly do my job and also dive deep into all the questions I get; the forums really are the right place and 1,000 brains are better than one. Oh, and  I do follow and I do look into many (though not all) of them.

That said, some questions come up a lot, and today I received a note with 4 that I must get at least five times a week, so here are my quick responses (I’ve paraphrased some of the questions)

I'd like to make my website a bit more "rich" and a better UI experience for the users and I'm considering Silverlight. It currently uses….  What would be your advice?

Since you are new to Silverlight you probably want to work your way through a suggested learning path and then ask a lot of questions in the forums. I wish I could spend a day (or a week) working on the design with you

For this website, with respect to your multiple page example...Let's say I have 30 existing .aspx pages. Would I make page1.xaml, page2.xaml, page3.xaml, etc. that would correspond to each respective page that I currently have?

Not necessarily (and I hope you’d use better names <grin>). In fact, there is no reason you wouldn’t have a mixed model, using ASP.NET where it is working for you and Silverlight for enhanced (richer, faster, etc.) experiences.

Are there any resources that tell you how to convert a complex ASP.NET web site into a complex Silverlight site?

Not that I know of, but more information is coming every day. Be sure to keep an eye on silverlight.net and subscribe to Silverlight Cream, and Silverlight News.

4. This may sound odd, but how do I know that wanting to do this in Silverlight is not completely strange when it works and looks satisfactory now? Still make the change and why I guess is what I'm asking here.

If it is satisfactory now, go do something else <smile>. But maybe it isn’t completely satisfactory; maybe a faster richer experience, in at least some parts of the application would be valuable. Take a look at some of the showcase applications to get an idea of what is possible.

 

Hope that helps

Posted by jesseliberty | with no comments
Next