As I said in the previous post, .NET 3.5 Service Pack 1 addresses issues that were found through a combination of customer and partner feedback, as well as internal testing. Overall, .NET 3.5 Service Pack 1 offers customers many new features and improvements in responsiveness, stability and performance for Visual Studio 2008 and .NET Framework 3.5.
Now…obviously I trust the WPF team , but I was curious to test the “real difference” given from the .NET Framework SP1 (Beta); for the sake of a perf exercise, I’ve written a tutorial to compare the previous BitmapEffect with the new Effect, which is one of the new classes with HW-acceleration support introduced by the SP1.
You can download the source code for this tutorial here. Please remember that, in order to compile the project, you need to install the .NET 3.5 Service Pack 1.
1) Button with Blur Effect
The first sample I’ve created is a Button with a Blur effect.
The Radius property of the Blur effect is bound to a slider, which allows me to change easily its value at runtime.
1: <Button Content="Ciao" x:Name="button" Width="400" Height="150" Grid.Column="1" Grid.Row="1">
2:
3: <!-- FAST, HW ACCELERATED -->
4: <Button.Effect>
5: <BlurEffect Radius="{Binding Path=Value, ElementName=slider}" />
6: </Button.Effect>
7:
8: <!-- SLOW, SW ACCELERATED (deprecated) -->
9: <!--<Button.BitmapEffect>
10: <BlurBitmapEffect Radius="{Binding ElementName=slider, Path=Value}" />
11: </Button.BitmapEffect>-->
12:
13: </Button>
After running and profiling this sample (how-to later in this post), these are my empirical results:
As expected, the Effect is 5 times faster then a Bitmap Effect.
2) StackPanel with Animating Blur Effect
Running the Perforator tool with a slightly more complex sample, the results are stunning: you can see a huge step in the memory usage, from 150MB (sw acceleration) to 16MB (hw acceleration)…an outstanding 1000%!!!
3) HOW-TO PROFILE AND MEASURE PERFORMANCE
I would like to share quickly how I’ve done the previous tests.
These are Snapshots from my tests:
CVD…
These are just easy snippets of code, that don’t really require a lot of memory. However, although simple, they already clearly show some of the performance improvements provided from the .NET Framework SP1 (BETA).
I can’t wait to install the SP1 RTM!!
If you want to try this with your machine, you can download the source code for this tutorial here. Please remember that, in order to compile the project, you need to install the .NET 3.5 Service Pack 1.
Thanks to Ravi Nar and the Vista Squad folks for participating yesterday at the “Building RIA for Desktop, Web & Mobile using Silverlight & WPF” session in London. I really enjoyed presenting with you and answering your questions (it’s been a while since I had so many questions in such a short timeframe )…and talk with .NET, LINQ, Mobile, ASP.NET…as well as Python and Flash developers.
As promised, you can download here the slides from the presentation. A video of the session, thanks to Ian, will be available on the Vista Squad videos repository.
I’d like to give here a few links as follow-up to the presentation:
1) WPF (Windows Presentation Foundation)
WPF is a next-generation presentation system for building Windows client applications with visually stunning user experiences. With WPF, you can create a wide range of both standalone and browser-hosted applications.
Interesting links:
I’ll publish the source code for some of the demo you’ve seen yesterday in the next post.
2) Silverlight
Microsoft Silverlight is a cross-browser, cross-platform, and cross-device plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. (Luckily you all already knew the definition )
Again, I’ll publish in the next days the source code for the demo you’ve seen yesterday.
3) Silverlight for Mobile
Bringing Silverlight to devices expands the reach that developers and designers have when creating rich Internet applications. This enables them to easily leverage content, assets, and code that they are using today for browser-based Silverlight applications. Support for Silverlight on devices will quickly help change the landscape for the types of user experiences consumers can expect from their phones by bridging rich interactivity, wireless data, media and more.
Feel free to ask me questions or to send me feedbacks, by commenting this post. Thanks again to everybody, I’m looking forward to meeting you again soon
PS: just as a reminder, Forza Italia!
Sign up for “The Wrath of Khan” meeting, organized by the UK user group Vista Squad.
The meeting will take place in Microsoft Cardinal Palace place, on 18th June, with the following talks:
More info and agenda here.
PDC 2008 registrations are now open. Expect lot of fantastic news/announcements this year about Windows 7, Windows Mobile, Silverlight, Live Mesh…
Dates of the conference are: 27-30 October 2008 Pre-conference on 26 October 2008
More info at: http://www.microsoftpdc.com
Or…have a look at Mike’s Blog, Content Owner of this edition.
Message for English readers: the following links are the videos from the session recorded at The Next Web Now! event with Steve Ballmer in Italy. All the sessions are in Italian.
Sono state rese disponibili per il download le registrazioni delle sessioni dall’evento The Next Web Now.
Potete scaricare il video della mia sessione su Silverlight for Mobile al seguente indirizzo:
Creare applicazioni vettoriali per dispositivi mobili con Silverlight for Mobile
Ne approfitto per rispondere a una domanda frequente: "Come posso iniziare a sviluppare applicazioni per la piattaforma mobile?” Risposta: Fate riferimento alle versioni di Silverlight per Desktop, sfruttando quindi Expression Blend 2.5 + Visual Studio 2008. Piu’ in la’ nel tempo rilasceremo un runtime di Silverlight for Mobile, che vi permettera’ di visualizzare le vostre applicazioni desktop anche su piattaforma mobile.
Vi segnalo inoltre i link alle altre sessioni della developer track:
Per tutte le altre tracks fate riferimento al link: http://www.microsoft.com/italy/eventi/mix/default.mspx
Grazie per tutti i feedback, alla prossima!
Twitter is a free social networking and micro-blogging service that allows users to send "updates" (or "tweets" (TW); text-based posts, up to 140 characters long) to the Twitter website. [Source: wikipedia]
Being an user of MSN (ops, Windows Live Messenger) since many years now, I get used to keep my WLM Personal Message (PM) updated.
Now, if we think about the two technologies together, isn’t a tweet kind of a public version of our personal message? Yep
For this reason, I’ve developed with my dear friends Stefano Santoro (Microsoft Student Partner from Italy) and Marco Bodoira (CE Embedded expert at BEPS) an add-in for Windows Live Messenger that keep the personal message of MSN synchronized with your Twitter status. Please note that this add-in is not supported. (More info about support below).
How does the add-in works?
When the add-in is turned on, it will keep your TW on Twitter synchronized with the PM on MSN; in fact your PM on MSN will be sent to TW within the specified polling time.
Where can I download the add-in?
You can download the setup file here, or download and view the source code here.
How do I install the add-in?
In order to start the magic synchronization, you need to install the Setup file (download it here). On the first restart of WLM, you will be asked to prompt your Twitter information (obviously your information will be saved and you will not be prompted to insert them again…). The only action required from you is to manually Turn On the add-in.
Why did you developed this add-in?
For fun.
To be used.
To show some example of interoperability between “everyday application” and web services in the cloud.
The whole communication layer with the Twitter web service uses web services, with the following two functions:
internal bool SendTwitter(string message) { if (string.IsNullOrEmpty(message)) return true; string auth = Convert.ToBase64String(Encoding.UTF8.GetBytes(Username + ":" + Password)); string status = "status=" + HttpUtility.UrlEncode(message, Encoding.UTF8); byte[] data = Encoding.ASCII.GetBytes(status); try { HttpWebRequest req = WebRequest.Create(SetStatusUrl) as HttpWebRequest; req.Method = "POST"; req.Headers.Add("Authorization", "Basic " + auth); req.ContentType = "application/x-www-form-urlencoded"; req.ContentLength = data.Length; Stream reqStream = req.GetRequestStream(); reqStream.Write(data, 0, data.Length); reqStream.Close(); return true; } catch { return false; } } internal string GetTwitter() { string auth = Convert.ToBase64String(Encoding.UTF8.GetBytes(Username + ":" + Password)); try { HttpWebRequest req = WebRequest.Create(string.Format(GetStatusUrl, Username)) as HttpWebRequest; req.Headers.Add("Authorization", "Basic " + auth); req.ContentType = "application/x-www-form-urlencoded"; XmlTextReader reader = new XmlTextReader(req.GetResponse().GetResponseStream()); string status = string.Empty; if (reader.ReadToDescendant("text")) status = reader.ReadString(); reader.Close(); return status; } catch { return ""; } }
An interesting bit of this project is the setup file, that performs the following operations:
Is the add-in supported?
NO, the add-in is not (and will not be) supported. However we tested it successfully on Windows XP 32bit (English and Italian), Windows Vista 32bit (English and Italian)…with Windows Live Messenger 8.5 and Windows Live Messenger 9.0. Please let us know if you can install it on platforms other than these.
Does the add-in need any 3rd-party components or Plus or will it ask me to pay?
NO, NO, NO. The add-in requires Windows Live Messenger and the .NET Framework 2.0 installed only. If the setup detects that you are missing the .Net Framework, it will download and install it automatically for you.
What are your Twitter account?
Want to know more about Windows Live Platform?
Have a look at those great blogs from colleagues:
Any feedback?
Please feel free to add a comment or a feedback to this post!
Thank you Happy twittering with MSN,
Giorgio, Marco & Stefano
With the Imagine Cup 2008 worldwide final in Paris coming on the way…I've been asked a few times recently to give some advice about "How to be successful in the Imagine Cup (Software Design invitational) competition?".
I am happy to share here some Tips&Tricks that I consider helpful, given the experience I had as former worldwide winner in IC 2006 (India) and mentor of the Italian team in IC 2007 (Korea) :)
This list is not complete, and it doesn’t pretend to be any official sort of communication (that you find here instead). Feel free to add your feedbacks or comment to this post.
I hope this post will answer at least 1% of your questions. If you have any other question, feel free to post them in the official Imagine Cup forum...or if you have something specific for me, drop me an email at giorgio.sardo@microsoft.com
Eventually I’m sure that my friends Guillaume (winner IC SD 2004) and Stan (winner IC SD 2005) will be happy to share even more advices.
Imagine Cup changed my life, I will remember this experience forever. I really wish you best luck, and I hope to see you in Paris in July or next year in... :)
Ciao!
The Deep Zoom composer is a great tool to manually design a composition. It is still in an early stage and I’m sure its team will add lot of interesting new features in the future.
Meanwhile…I think that something where it lacks is the possibility to perform a proper batch export, given a lot of images.
SCENARIO: your want to show 500 pictures using DeepZoom. Due to the high number of pictures, you decide to implement a collection and positionate the images at run-time.
Using the batch export feature of the composer, you can only create several single deepzoom composition…and you miss the option to create a collection.
Luckily the Deep Zoom application comes with a tool (SparseImageTool.exe) which is installed in the application folder. The tool allow you to create a collection from the command line, giving as parameter the SceneGraph file and the images input folder (plus other interesting parameters).
Not too bad...but...what is the SceneGraph.xml file? This file is an xml file containing the layout of our scene, with the following format:
We now have all the tools and information to programmaticly create our collection, avoiding the direct use of the UI of the composer. As proof of concept, I created an application to create a Deep Zoom collection using C#, without opening the Deep Zoom Composer UI.
Source-code of the application is attached at the bottom of this post.
I will move this application to CodePlex as soon as possible, since I believe the community could add more interesting features. Don’t you?
PS: Once you exported your collection using this tool, you can start positionating/resizing/… images using C#…I’ll write a new post about this later…
I was trying the new version of the Deep Zoom Composer…it’s just great!! Between all the new features, the tool now creates a Silverlight 2 application during the exporting process, in order to host your composition...easy peasy
When you are exporting your project, you can select to Export as Composition or Export as Collection.
Which one is the best option? Personally I would say that Export as Collection is much more flexible and it's probably going to work with most of the scenario. As a developer that likes to write code...I would go for it
Carlo, the PR and Marketing Director of Microsoft Italia, has been successful in the tough task to interview Steve Ballmer while visiting Italy for the Next Web Now! event. The interview takes place in Milan and in Rome, in the hotel, inside a car, at the airport…all in the same day! Well done!!!
Si è svolto ieri l’evento The Next Web Now a Milano, che ha visto la partecipazione di Steve Ballmer (CEO Microsoft), Marco Montemagno (SKY), i direttori di Telecom Italia, Fiat, ENI e Sanpaolo…nonchè di vari speaker Microsoft e non-Microsoft. Durante la giornata ci si è confrontati sul futuro del Web, approfondendo temi quali Silverlight, la piattaforma Live, Silverlight for Mobile…ma anche advertising, pubblicità, etc…
Vorrei ringraziare il pubblico che è rimasto fino a tarda serata a seguire tutte le track developer, e il Team DPE per avermi invitato a partecipare in questa fantastica conferenza. Dopo aver assistito all’omonimo evento a Las Vegas…posso dire con certezza che quella di Milano non aveva nulla da invidiare alla sorella maggiore (foto allegate :)).
Marco Montemagno
Steve Ballmer
Speaker’s backstage
Siamo sicuri che lo schermo sia abbastanza grande?
La sala (prima che si riempisse ;))
Giuseppe svela i segreti di Silverlight
Mario in compagnia di Aldo (direttamente da Redmond!)
Io e la telecamera
Le mani al cielo
Per chi volesse maggiori informazioni sulla mia sessione (Creare applicazioni vettoriali per dispositivi mobili con Silverlight for Mobile), ho pubblicato le slide qui.
Sono inoltre disponibili i video ad alta definizione delle demo che ho mostrato ieri sul mio blog.
Infine sul blog Msdn Italia i riferimenti alle altre sessioni.
Un saluto a tutti, e alla prossima!
Today I would like to share with you another video, that showcase a possible use of a Silverlight for Mobile application inside the TodayScreen of a PocketPc. For this demo I combined together the power or the Windows Mobile 6.0 Professional Emulator, SLM, C++ and .NET. :)
For my Italian friends…you can’t miss the event The Next Web Now! in Milan, on April 23rd; this is one of the several Mix Essentials events running around the world from March to October 08.
On that day we will have the honor to host Steve Ballmer, Chief Executive Officer for Microsoft Corporation, on stage for the keynote!!
Later in the afternoon there will be different sessions, organized by thematic tracks, about all the latest news from Microsoft world. My friends from the Italian DPE invited me to talk about Silverlight for Mobile in the Developer Track. (Thank you!!!)
More information and registration here: http://www.microsoft.com/italy/eventi/mix/default.mspx
PS: Content to be delivered in Italian only
MVPs around the world are invited every year to attend the MVP Global Summit, one of the largest MVP events. During an intensive week, they receive access to exclusive technical content and they have the opportunity to discuss current and v-next futures with the Product Team too! Being able to attend the event last year…I will reeeaaaallly miss this year edition.
However tomorrow I will be presenting with Anand Balachandran an overview of the content that you can expect to see during the summit. If you are an MVP, if you love mobile stuff…you can’t miss this live meeting!
To all MVP, have fun in Seattle!
Tags: MVP MVP Global Summit 2008
I think that everybody here agree that Windows Vista is the best Microsoft operating system…from a UX point of view
For this reason, I was curious to see how it would look like inside a PocketPc with a small screen. The result? It’s pretty obvious!! You cannot take an application developed for desktop…and make it run (with the same look and feel) on a mobile device. Mobile application are not just smaller application!
Tags: MIX 08 Silverlight Mobile
If you still feel unlucky…I suggest you to play with this Microsoft Slot Machine v1. Bill pays double or triple!
Las Vegas, casino, Slot Machines, Roulette, Texas Poker Holden, Blackjack, … you might want to be sure it’s your lucky day before actually playing
I’m receiving frequent questions these days about Silverlight for Mobile target platform. Silverlight for Mobile can run on both Windows Mobile Professional and Windows Mobile Standard. Touch-screen, soft-keys, mouse, keyboard…you can use anything to input!
The puzzle demo here shows how you can use the same application with different input system.
This is probably the demo where I've seen more interest from MIX attendees. With a bit of logic (coded in Javascript) I can understand most common user gesture...and react accordingly.
Personally I don't really like using carousel when we deal with a lot of information; however it comes in handy for a few items, like a menu. And it looks great on a small device!
The third demo showcase how to use the fish-eye control inside a small screen device; by dragging and dropping the balloon from the lower to the upper area it's possible to dynamically filter users' pictures.
The most common control for a mobile device is out of any doubt the List. In this scenario I'm enumerating the sessions of the MIX conference, giving to the user the feature to filter them by audience (Technical, Creative or Business) or by day. Moreover, by a gesture of the finger, it's possible to visualize the detail of each track.
The first demo, whatever language we are using, must always be Hello World.
In this scenario I'm showing how to apply an animation to the gradient direction of a shape...without any line of code!
I would like to share in the next posts the videos of the 9 demo I showed on stage at MIX. The following videos has been recorded while running on a desktop with my "personal emulator" (you can notice my finger) if you are interested to see how those application perform on a real PocketPC, please refer to the full video here.
PS: I will share in the next weeks bits of the source code, as well as tutorial to start building Silverlight for Mobile applications.
For those of you that were unable to attend the MIX, you can see for free the recording of my session at the following link: http://visitmix.com/blogs/2008Sessions/C02/
Using Microsoft Silverlight for Creating Rich Mobile User Experiences
Have fun!