Posts

Showing posts with the label SILVERLIGHT

Upgrading to WCF RIA Services v1.0 and Ria Services Toolkit

The kind folks on the Silverlight and RIA Services teams have come out with v1.0 of RIA Services. However, the instructions they provide can be a bit misleading as to “What does what”. Here’s the skinny: 1) You can download the Silverlight 4 Tools installer, dated 5/13/2010 here . This will uninstall previous interim versions of the SDK, runtime and RIA Services – you do not have to uninstall anything before running it. 2) However, the above WILL NOT refresh the RIA Services Toolkit. That you must uninstall first, and then run the new Toolkit installer, dated 5/14/2010, which is here . I like the Web Platform Installer, but you can never be absolutely sure what exactly you are getting with it because the installation process is much more opaque than using an MSI installer file. If you use the above two steps, you are pretty much guaranteed to be 100% up to date! And don’t forget – you can run the tools installer from a DOS prompt with the /x option to extract everything to th...

The big Silverlight 4 Question

You get all this honking and hoopla and what not, but nobody seems to think about the big Silverlight 4 Question: Can I install Visual Studio 2010 Beta 2, Silverlight 4 Tools, WCF RIA Services, The November 2009 SIlverlight Toolkit, and Blend 4 Trial on the same machine that I have Visual Studio 2008, Siverlight 3, SIlverlight 3 Toolkit, Blend 3 and so on – and will they co-exist peacefully on the same machine? Answer: Yes! All you may need to do is uninstall your previous RIA Services Preview. Everything else will “just work”. I just did it and tested it all out. Bart Czernicki mentions an issue that you can review here . Disclaimer: No animals were harmed in the creation of the UnBlog post. Your mileage may vary. Oh, and one final note: If you are going to install WCF RIA Services with Visual Studio 2010, you will no longer be able to use RIA services with Visual Studio 2008. They don't install "side -by-side".

Flash vs Silverlight

Some interesting observations I read recently from a Flash blogger: Flash was not intended for RIA applications. ActionScript was created for animated vector graphics; queuing messages on a single thread. It was hijacked to support Flex with complex content; but the threading model didn’t change. But Silverlight was built from the start for fully fledged applications. I’m looking forward to the MVP Summit and MIX to see what’s coming in Silverlight 3. Currently, I’m developing real – world application with Silverlight. I’m putting together pieces and utility classes that I expect to be able to use going forward. For me, the clear winner is having a feature – complete subset of the .NET Framework to code with, being able to share my creations in both Silverlight and the full .NET Framework, and not having to deal with the intricacies of the ActionScript learning curve to get what I want. I’ve been coding C# since 2001 and at this late stage of the game I feel prett...

Referencing a non-Silverlight Assembly in a Silverlight Project

“Bailout? Hey! I’m having trouble paying my bills. How about it?” -- Me This one comes up a lot, and the bottom line is, you can’t do it. But - I think it is important to understand why it won't work: You cannot reuse non-Silverlight assemblies since the desktop CLR and Silverlight CLR are based on two different Frameworks. They are similar, but they aren’t “the same”. The BCL’s (Base Class Libraries) that are referenced in each type of project may have similar names but they are completely physically different files . But you can reuse the original code if it's compatible and available to you in source code form. In Visual Studio, you can create a new Silverlight class library project, then right click to add an existing item. You can click the arrow on the right side of the Add Button, and choose "Add As Link". This will not copy the .cs file to your new project, so when you modify the .cs file in one place, the other place will be automatically updated. You...

Silverlight vs. Flash – Where’s the Fire?

Is fuel efficiency really what we need most desperately? I say that what we really need is a car that can be shot when it breaks down. –-Russell Baker I had a chance to reflect a little bit today on Silverlight and Flash and I’d like to offer these observations. I have some not insignificant experience with Flash. Many developers are too new to remember FutureSplash – but I remember it very well, and I used it when it first came out, circa 1995. That was the predecessor of today’s Flash, which was ultimately purchased by Macromedia, and now of course subsumed into Adobe. A lot of the stuff you read today revolves around “Flash vs. SIlverlight”. The media loves controversy, and they’ll hammer on this subject ad-infinitum – often to the extreme detriment of any real content.  If you are on Twitter, the latest volley was about MLB (Major League Baseball) dropping Silverlight and going back to Flash for their video coverage. Its seems like every Tom, Dick and Harry Blo...

Silverlight 2 RC0 : Important Considerations for Developers

There are hundreds of “Me Too” blog posts about this, so I won’t bore you with more of the same. There are, however, two of what I think are very important considerations about Silverlight 2 RC0 that developers need to know about. You can only find out about this stuff if you take the time to RTFM carefully. In this case that would be the info on Scott Guthrie’s blog and possibly on Tim Heuer’s blog as well.  Pete Brown also does a great job of covering details, and he writes well. Finally, another smart person to follow would be Mike Snow , who is a Senior Software Design Engineer in Test (SDET) for Visual Web Developer Tools.   1)   RC0 is a developer release only . You cannot deploy RC0 applications to the web. They won't work. It's only for test environments where you want to ensure that existing or new applications will work with the final Silverlight 2 release. To repeat: there is no end-user installable runtime for RC0, only the developer runtime with the ...

Learning Experiences: What Developers Want

“The last update to the Hypertext Markup Language — the lingua franca of the web — was the 4.01 specification completed in September, 1999.” – Digg Post Recently I read a post on Jesse Liberty’s blog about getting flamed by some commenter who didn’t like what he was publishing. I responded in a comment that I thought he was doing just fine, and that you cannot expect to please everybody. But I also recommended that he put up one of those free poll “thingies” that would allow his visitors to vote on what they did want to see, and Jesse took me up on it. He put up a comprehensive poll that allowed write-in suggestions. I thought it was very well designed. The preliminary results of some 250 responses (including mine) is quite revealing, I think: “The results have held steady from the very beginning – Webcasts have overwhelmingly been the "last choice" for over 2/3 of users and in-depth tutorials have been the first choice; with short videos and short tutorials splitting t...

Silverlight: Handy Dynamic Javascript Debugger Favorite

Often you need to be able to View Source on a page that has injected dynamic javascript to see what you did, and,surprise – it’s not there. Here is a neat way to view source (including any dynamically generated elements or script):     javascript:document.write('<xmp>'+document.documentElement.innerHTML+ '</xmp>');   What this does is simply using the <xmp> (“example”) tag to literally render  your “stuff” without parsing. You can add this to your browser’s favorites as an A-HREF link and that way you can simply choose the favorite to view the complete source on any page.  This is extremely useful when using the Silverlight Browser classes to manipulate the DOM of the underlying Page. Here’s a sample like (this may not work as Blogger does funny stuff, but you can still mouse over it): Debug Js

Bugs in Silverlight?

Dr. Evil: Right, people you have to tell me these things, okay? I've been frozen for thirty years, okay? Throw me a frickin' bone here! I'm the boss! Need the info. I've seen more than a few posts on the Silverlight Forums where people are complaining (or sometimes just asking for help / guidance) on issues where they appear to be attempting to "tax the system"  and thus expose what they believe is "a bug".  Hey - Silverlight has bugs - even release software does -- that's not the issue. But creating artificial programming situations where one can claim "It's a bug" is not always a  legitimate effort. More often than not, this revolves around issues like "memory leaks" when attempting to set up some sort of "test" code that does some operation in a tight loop, or some similar operation that does not necessarily relate to what would likely happen in a "real world" Silverlight application. The poste...

Client-side database with Silverlight?

Image
I’ve seen some discussion threads about doing things like putting VistaDb (a 100% managed code database) into a Silverlight app. Most of this was wishful thinking, IMHO. If you are going to put a database into a Silverlight app, obviously the data file(s) need to go in IsolatedStorage. So that’s one hurdle – handling file access. And VistaDb is kind of on the large side for inclusion in a Silverlight app that’s designed to download into the browser. I took a look at SharpHsql , which a much simpler managed – code database effort that has had its ups and downs since being ported from the JAVA implementation.  I tried ripping out the Provider (which depends on System.Data – not present in Silverlight Framework) and thought I was making progress, but then I saw that there were still too many other dependencies on stuff from the full Framework that just isn’t there in Silverlight, so I gave up for now. However, I still think this is an idea that has merit. Think of a notetaking app...

Silverlight 2 Beta 2 Downloads

Image
NOTE: Since this post has been a "work in progress", updated links are found starting at the nota bene number 2. You want "Silverlight_Chainer.exe". Jeesh! I don’t know why they seem to make this stuff so hard to find. Here they are, more later ( go to the bottom for more recent links, including the "chainer")   Silverlight 2 Beta 2 Download (4.66 MB) Silverlight 2 Beta 2 Documentation (50.3 MB) Have fun!   At this point I haven’t been able to locate links for the Silverlight 2 Beta 2 Visual Studio Tools, or the June Preview of Expression Blend.  You would think what with Tech Ed and all that Microsoft would be scrambling to get these links up on the Silverlight.net site, but – hey, that’s progress, huh? if you happen to be reading this and you find the Tools or other links before I do and update this post, leave a comment with the hyperlink  so we can do a service to the .NET Developer community. N.B. – The latest from MS at the Silverlight.net...

Where is Silverlight going? (or-- Why Silverlight will succeed)

Cows (livestock) produce 18 percent of total greenhouse gas emissions, more than all the cars and trucks on earth. -- U.N. report I've been watching the buzz around Silverlight 2 Beta 1 since it came out, and there's a new beta that will be out this week (yes, I was the guy that asked Scott Guthrie when it would be released at the MVP Summit conference).  If you look at my "Playground" short url site with a Silverlight tag query, IttyUrl.net , you'll see hundreds of new Silverlight - related links, as developers and pundits post their creations, articles, and streaming videos to show what they've learned and to share their techniques. The underlying Silverlight technologies (XAML/WPF/WCF and .NET) are encouraging client-side Windows developers to think beyond boring forms apps and get into the promising world of vector graphics with 3D, streaming HD media and "animated everything". Microsoft is simply extending existing proven technology to  enc...

ASP.NET Quick 'n Dirty Exception Logging*

If you need an easy way to handle logging exceptions in your ASP.NET web application but want to avoid all the complexities of using a logging library and / or setting up all the database "Stuff", here is  an easy way to handle it:   In web.config: <appSettings>     <add key="logExceptions" value="true"/>   </appSettings >  <system.web> In Global.asax.cs: public class Global : System.Web.HttpApplication     {         public static bool LogErrors = Convert.ToBoolean(ConfigurationManager.AppSettings["logExceptions"]); //... protected void Application_Error(object sender, EventArgs e) {     if (LogErrors)     {     Exception ex = Server.GetLastError().GetBaseException();     File.AppendAllText(Server.MapPath("App_Data/exceptions.txt"),              ...

Silverlight 2.0 Goodness - and IE 8.0 too!

Image
May the Flying Spaghetti Monster touch you with his noodly appendage! -- Pastafarian saying ** Silverlight 2.0 Beta 1 Plug in Runtime ** Silverlight 2.0 Beta 1 Tools for Visual Studio 2008 (Includes SDK - installs everything except Blend) ** Expression Blend 2.5 March Preview (handles Silverlight 2.0 projects) ** Expression Studio 2.0 Beta (includes Expression Web, Expression Blend, Expression Design, Expression Media and Expression Encoder.)  This release continues to enable building rich client applications with WPF and also helps designers target Silverlight 2.0 for delivering stunning web applications. ** Silverlight 2.0 documentation and links to Quickstarts, etc. All this stuff was just put out from MIX. Have fun! With version 2.0, now that I can use real .NET libraries in the browser, this is where I start getting seriously interested in Sillverlight . Once you get the bits installed, there is a very nice series of Hands On Lab s that you can download for the f...

Silverlight 2.0: Cross-Domain Access Redux

Scott Guthrie has been publishing some "pre release" very cool blog posts about the upcoming Silverlight 2.0 release. One of the most interesting features is that cross-domain access will be allowed (think JSONp and Crockford's JSONRequest or other cool ideas). Here's a short quote: Cross Domain Network Access Silverlight 2 applications can always call back to their "origin" server when making network calls (meaning they can call URLs on the same domain that the application was downloaded from). Silverlight 2 applications can also optionally make cross-domain network calls (meaning they can call URLs on different domains from where the application was downloaded from) when the remote web server has an XML policy file in place that indicates that clients are allowed to make these cross-domain calls. Silverlight 2 defines an XML policy file format that allows server administrators to precisely control what access a client should have. Silverlight 2 also honors...

Microsoft Silverlight 1.1 Alpha is here!

Image
If you pick up a starving dog and make him prosperous, he will not bite you. This is the principal difference between a dog and a man. - Mark Twain At the MVP Summit in March, Scott Guthrie and friends previewed the 1.1 Alpha of Silverlight (named of course, after my good friend David Silverlight , who runs XMLPitstop.com and other fine sites). We weren't allowed to talk about it until now - and the 1.1 Alpha is now available - along with some nice Quickstart SDK samples . Among other fine features, this offers a reduced-set WPF runtime hosted in Internet Explorer, streaming video, and - SURPRISE - Managed code in the browser -- including Javascript access to managed code! Get it while it's hot! Now the big question you'll hear is whether this is going to be a "Flash killer". I don't think that will happen right away, but when you look at the streaming video codec and DRM support, support for managed code, dynamic XAML loading and much more, it certainly repr...