Twitterlight has been updated with some new features that really up the usability of the app.
http://www.twitterlight.com

-
Defaulted the view to Public, so non-Twitter users can see data on page load
-
Added profile pics back in
-
Added link to Twitter page on username
-
Made some massive changes to how the app's structure reorganizes:
- Moved to Grid wrapper to support dynamic resizing
- Removed C1 combobox due to bug (couldn't locate parent canvas, as it's now a grid)
- Added Erik Klimczak's animating wrap panel to handle animating tweet movement between positions (He claimed a mERIKle on this one)
- On resize, tweets lose some opacity if they don't cleanly fit on the screen... when resized back to larger size, tweets come back alive (disabled for Safari on Windows)
- Added a zoom slider, mostly for fun, but because sometimes you just need to see a profile picture a little better... or free up some real estate
This has become a work in progress, so let me know if you have features you'd like to see. Some are:
- Make password textbox actually a password textbox
- store tweet history for paging back through older tweets
- store username and/or pw
- Add reply/direct messaging shortcuts
thanks for the help on this, especially Josh Holmes for his suggestions.
Ok ok, I've bitten the bullet and upgraded the Twitterlight Silverlight Twitter client to Silverlight 2.0 Beta 1. The Coding4Fun article has been updated with the latest source.
The client is live at twitterlight.com.
The major updates involved changing how some of the synchronous web service calls (authenticate, create TinyUrl) work within the app, now that all web references (woops, "service references" now) are asynchronous. Some XAML tweaks and minor code changes, and we're good to go.
View the initial post describing the article.
We've released the latest version of the Facebook Developer Toolkit on CodePlex.
This release addresses a change to the Profile.SetFBML() method within the Facebook API. As of Thursday, Jan 17, 2008, Facebook will no longer accept the legacy version of this method, which allowed three versions of Facebook Markup Language (FBML) within the same parameter. The updated version of the Profile.SetFBML method will accept three separate parameters to limit unnecessary parsing, which will ease profile load times.
Using the Facebook Developer Toolkit, the previous call of
FBService.SetFBML(generalFBML, FBService.UserId);
now becomes
FBService.SetFBML(profileFBML, profileActionFBML, mobileProfileFBML, FBService.UserId);
A full example to test setting the profile FBML would look like:
new protected void Page_Load(object sender, EventArgs e)
{
base.Api = FACEBOOK_API_KEY;
base.Secret = FACEBOOK_SECRET;
base.Page_Load(sender, e);
if (!IsPostBack)
{
try
{
// Use the FacebookService Component to populate Friends
Facebook.Entity.User u = FBService.GetUserInfo();
Collection<Facebook.Entity.User> f = FBService.GetFriends();
//Test Get/Set FBML (Profile parameter)
string userMessage = string.Format("Hello, {0}, you have {1} friends!", u.Name, f.Count);
FBService.SetFBML(userMessage, null, null, FBService.UserId);
lblHelloWorld.Text = FBService.GetFBML(FBService.UserId);
}
catch (Exception)
{
// do error handling
}
}
This is a breaking change for existing code, which we felt was more logical than throwing a runtime exception. Post comments to the CodePlex site's discussion board if you have questions or comments.
The Twitterlight Coding4Fun article has been published. I've added some updates, including url link support. Check it out!
All the source code is available, just make sure you add in references to the C1.Silverlight.dll.
Enjoy. - steve
=======================================================================
I ended up with a bit of bench time this week, so I've been working on two projects here at Clarity: Eating Jimmy Johns like it's going out of style, and immersing myself in Silverlight 1.1/2.0 and the accompanying control toolsets. Also my foos skills apparently never left.
Lately I've become a regular Twitter user (everyone: "hello, steve"), and was itching to play with the Twitter API, so I set out to create a Silverlight 1.1 mashup. I also wanted an auto-updating page to use for viewing my tweets, without having to install a desktop app.
Visit the Twitterlight Alpha.

My goals here were:
Experience the joy of working around Silverlight cross-domain call prevention. Btw, different ports in VS count as cross-domain too. This is achieved by hosting a local web service within your web project, which can in turn call external web services to marshal your Silverlight app its data. I'm not going to step through how to do this, as tutorials are popping up like crazy on this... although most refer to the "Add Silverlight Link" step as "magic". This goal was job one for me, because, while it's easy to see the initial draw to the beautiful designs created via XAML/Blend, unless true functionality can be added to these apps, this technology won't spread at the speed I'm hoping it will.
Test drive some emerging control sets. For starters, I've used ComponentOne's Sapphire Toolset Alpha. My cube neighbors can vouch for a bit of the learning curve you may experience tackling an alpha release component suite, but all in all I think C1 is doing a really nice job with their controls. Documentation and forum support are not great, but will come in time; and the coming of Blend support will only make using these controls easier. For now, I pretty much stuck with creating all C1 controls via C#, as Intellisense helps discover what's available for use.
Deploy a Silverlight app. Done and done. The apprehension I felt regarding moving away from good old "localhost" was unnecessary... The only major change required by my solution was to select the Silverlight project's Web Reference to the local web service, and change the "Web Reference URL" property to the new, deployed web service location. Copy, paste, deploy, foos.
You will need to install the Silverlight 1.1 Alpha September Refresh before running this... browser-wise I've tested in IE7 and Firefox 2.0. And of course, you'll need a Twitter account! I'll post the code in the near future for this app, in the meantime I plan to try some other toolsets.
Email me at sholstad@claritycon.com with feedback. I'm available on Twitter at http://twitter.com/steveholstad.
Upcoming additions:
- TinyUrl and hyperlink support
- Resize to full browser size
- Search for and follow other Twitterers
Some Silverlight 1.1 / ComponentOne Sapphire Gotchas: (Updating as I go)
- Textboxes would not accept text(!) unless FocusManager.Initialize(this) is called on page load.
- Tab does not move focus to next control, it moves focus back to the browser (enhanced silverlight keyboard support is on the way)
- Cannot create password-masked TextBox, and even the workaround posted cannot work due to an alpha bug in C1 control... this explains why I have the horrendous white background/white foreground password textbox in this demo...
- C1 controls are not functioning as expected in Safari
- Have heard reports that Vista x64 users can't view Silverlight content
Add to: | Technorati | Digg | del.icio.us | Yahoo | BlinkList | Spurl | reddit | Furl |
About a month ago, I began using the October 2007 CTP release of Sandcastle, Microsoft's offering for generating code documentation files from existing .NET 2.0 assemblies. The product will no doubt become the standard for generating your project's docs, replacing the previously ubiquitous NDoc (which is no longer supported, partly due to personal attacks directed towards chief dev Kevin Downs. What a nice way to support his volunteer efforts, huh?). Along the way I'll try to absolutely mangle a boxing metaphor... Here we go:
Round One: Me vs. The 'Castle Command Line
Carmen my love.. I dance so sweet for you!
My first encounter with Sandcastle was a knockdown, drag out tussle with lack of documentation and the joys of the command line, but I stuck it out in honor of our comrades from the 1980's and beyond... sarcasm aside, I was pleasantly surprised by the output of the tool. The docs were professional looking, and with some love could have been presentable to our clients if needed. (I was only looking to generate some docs to give our dev team an easy to way see how our previous committment to full code documentation was shaping up)
Decision: It was easy to tell this was going to become a powerful tool in the near future, but was still on the undercard with the hairy 300lb guy they pulled out of a bar... or maybe that's just the Cedar Rapids circuit?
Round Two: Introducing the Sandcastle Help File Builder
Would you like some punch to drink? Ha Ha Ha!
Once my team decided we needed a complete snapshot of our code-level XML documentation, I was thinking of the best way to create one help file for all assemblies, that included our custom comments and offered the functionality and usability NDoc had provided for so long, all without the painful command line monotony I envisioned. Lo and behold, Eric Woodruff's NDoc-style GUI appeared. Yes, I see the irony of Microsoft trumping an open source project with it's own offering, only to have a UI created that is a mimic of the original.... but hey, what works, lives.
The GUI tool relies on the Sandcastle 2007 October CTP, the HTML Help Workshop for building HTML help files, and the HTML Help 2.0 compiler just as the command line utilities do, but wraps all this in a clean, intuitive interface. I simple enabled our projects to produce XML document outputs (via the Project Property --> Build tab), and referenced these output files using the UI tool. It took about 40 minutes for the help documents to compile, but afterwards we had a web site and generated help docs for our team to review for missing comments. The web site is slow and clunky, but I've got a little man-crush going with the .chm. Puppy love I guess. And imagine the help a full .chm file could be to an incoming team member. At some point this will become a client-worthy offering that a lot of consultants may not take the time to produce, so this tool has become a nice value-add in my .NET toolbelt.
Decision: Sancastle with the CodePlex GUI are prepped for the spotlight, stay tuned to see how these products evolve.
Round Three: Gratuitous Bald Bull
My barber didn't know when to quit... Do you?
Okay, okay, I'm done... calm down.
Must-have Mike Tyson Punch Out references: http://en.wikipedia.org/wiki/Little_Mac#Little_Mac
Add to: | Technorati | Digg | del.icio.us | Yahoo | BlinkList | Spurl | reddit | Furl |
Today is the target launch date for Google's OpenSocial, a programming API targeting social networks such as Orkut, LinkedIn, Friendster, Plazo & more. This move is intended to challenge the stranglehold Facebook currently is developing with social network programmers. I'm not much of a Facebook fan; nothing against the site itself, I just don't have the energy anymore to constantly monitor that type of site... I did check out Orkut, which seems to be wildly popular in Brazil & Asia, but much like David Hasselhof's singing career, totally missed the boat in the states.
Normally I don't post a lot of current event type news, but since Clarity has done so much to aid in Facebook development, thought that I'd put this out there to see if any of the Facebook developers would take a look at OpenSocial and see how it stacks up.
Right now I have the feeling that:
- Trying to develop on a standard platform for multiple proprietary network sites will be frustrating
- If the target sites themselves aren't taking off, then why would devs commit to developing for them?
If anyone checks it out, post a quick review here.
Google's OpenSocial
TechCrunch breaks the news
NY Times
Technorati Tags:
OpenSocial, Google, API, Facebook
Del.icio.us Tags:
OpenSocial, Google, API, Facebook
Add to: | Technorati | Digg | del.icio.us | Yahoo | BlinkList | Spurl | reddit | Furl |
I spent the last couple of weeks creating a posting for Coding4Fun's blog site, called YeahTrivia. The demo consists of a WCF client & server communicating via the wsDualHttpBinding channel. I used the article to learn quite a bit about implementing WCF to abstract service communication outside of an app's core code. Learning this new design pattern is a bit intimidating: I find that the hardest part in shifting your thought process is to take the first step... awhile back I attended Juval Lowy's WCF class, but until now haven't had time to apply it.
I'll be posting some of my favorite features of WCF and WPF as I continue to dive in. Be sure to check out the demo and tell me what you think.
To start, here are the config files of the client and server I used to create a wsDualHttpBinding communication channel:
Server:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="BaseURI" value="http://localhost:8088/Trivia"/>
<add key="QuestionLoadDelay" value="4000"/>
<add key="QuestionTime" value="11000"/>
</appSettings>
<system.serviceModel>
<services>
<service name="Trivia.Server.GameServer" behaviorConfiguration="MyServiceTypeBehaviors">
<endpoint address="http://localhost:8088/Trivia"
binding="wsDualHttpBinding"
contract="Trivia.Common.ITrivia" />
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceTypeBehaviors" >
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Client:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<wsDualHttpBinding>
<binding name="WSDualHttpBinding_ITrivia"
clientBaseAddress="http://localhost:8082/Trivia/"
closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00"
sendTimeout="00:01:00"
bypassProxyOnLocal="false"
transactionFlow="false"
hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
messageEncoding="Text"
textEncoding="utf-8"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32"
maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" />
<security mode="Message">
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8088/Trivia" binding="wsDualHttpBinding"
bindingConfiguration="WSDualHttpBinding_ITrivia" contract="Trivia.Common.ITrivia"
name="WSDualHttpBinding_ITrivia">
</endpoint>
</client>
</system.serviceModel>
</configuration>
The client config contains some extra binding attributes that are optional, but I wanted to show you the exact files that were generated using the Svcutil utility. Use Svcutil.exe to generate a proxy class which, when created and added to your client project, is used to marshal calls via WCF to the service. To generate my client class, I started my service and ran the following at the command line:
svcutil /language:cs /out:ServerProxy.cs http://localhost:8088/Trivia
Not a complete solution, but should get you started in the right direction. For a working example, check out the article and let me know if you have any questions.
Technorati Tags: Coding4Fun, WCF, WPF
Del.icio.us Tags: Coding4Fun, WCF, WPF
Add to: | Technorati | Digg | del.icio.us | Yahoo | BlinkList | Spurl | reddit | Furl |
Wow, it's been awhile, and I apologize for the delay in posts. I took some time off to get married and head off to Greece... amazing times.
Now that I'm back, I thought I'd take a moment to pass on some interesting news: Apple is releasing a first SDK in February that will allow developers to create and install 3rd party applications onto the iPhone. This means some exciting times for you pretty Mac devs out there...
CNN's report makes a good point: that this is most likely a reactionary move to stop the bad publicity they've received from scores of iPhone owners looking for a more customized experience.
As some of you may know, I've been a late-adopter to many things Apple, but this is one more piece that may have me carrying an iPhone sooner than later (at least once an faster network is supported).
Comments welcome!
steve
It's an interesting exercise every once in a while to take a look at the technologies we use in everyday development, and how they evolve over time. I started out writing HTML 4.0 & ASP 3.0 apps in high school, then watched as .NET 1.0, 1.1 and 2.0 became entwined in our vocabulary. Sitting here tonight, I'm writing some test apps using VS 2008 Orcas and HTML 4.0. Wait a tic, what happened with HTML's progression? Think of all the incredible web technology that has sprouted in the last 10 years: it's all been so exciting and glittery that everyone was deked into advancing other areas like scripting, AJAX & CSS. The last release of an HTML spec was released in July 1997. I'm not here to trash a standard we've all learned to love, but everyone who's ever programmed a web page can see some improvements could be made: think "DIVitis", for one. Surprised it took this long? Me too.
The cavalry is coming. The WhatWG (Web Hypertext Application Technology Working Group) was formed by an association of Apple, Opera & Mozilla browser vendors and independent web developers, with a goal of updating the hypertext markup language specs to support some much needed updates. The group formed in 2004 after they became concerned about the W3C's lack of direction and support for the everyday developer. A major concern for me is the fourth name you don't see as a founder of the WhatWG group. Microsoft IE definitely is the elephant in the room when we're talking about upgrades and standardization. The good news is that the W3C has picked up the call, and the WhatWG and W3C working drafts of HTML 5 are now advancing in tandem. Still, the WhatWG blogs state that the spec is being developed with IE compatibility in mind, and that many features can be supported in IE using JavaScript workarounds...what a potentially painful annoyance for developers. Standardization: so close, yet so far away.
On a quick side note: Some writers have pointed out that until the next generation of browsers update their HTML rendering engines, any upgrades to the spec are useless; It's pretty obvious to me that this is a classic "cart before the horse" worry... how are vendors supposed to support a format that is not yet formalized? Plus, being that three of the big four browser vendors founded the group is a clear sign that they are preparing to make upcoming browsers support the latest HTML.
The HTML 5.0 spec is being developed using a three-pronged approach. WhatWG sums the branches up nicely:
The work is currently split between three specifications.
Web Forms 2.0 is targeted to the common needs of web authors. Advanced widgets like RTF controls, menus and toolbars are the domain of Web Applications 1.0. These drafts are in active development. Web Forms 2 is nearing maturity; proposals are currently being discussed and specified for Web Applications 1.
Web Controls 1.0 is intended to add functionality to Javascript and CSS that aid the creation of custom widgets. However, this will be influenced by the design and implementations of XBL2, and so will not be available in the near future.
I'm not diving into a code sample here, because A) the constructs are still changing frequently, b) c'mon, I'm planning a wedding here, and c) Elliotte Harold does a really nice job of it here.
You can start developing sites using these standards once browsers begin to support them, even though the final recommendation won't come until the implementation is complete; be wary of changes until then. Keep an eye out for browser betas that allow testing of these new capabilities. The spec is fully backward compatible, so old browsers will continue to display content as expected.
Some references:
Elliotte Harold's review of HTML 5.0
WhatWG's FAQ Blog
WhatWG's working spec
W3C's working spec
HTMLHTML 5.0 W3C WhatWG Web Programming ASP
Recently a project I was working on required us to dynamically load an assembly at runtime, and invoke a method on the newly loaded assembly. After we had this working, I
noticed that when we tried to then load a newer version of the dynamic assembly, the newer bits weren't being picked up, and old code was executing. Time to investigate a
bit further:
I came across a great article by Jon Shemitz that pointed me in the right direction.
AppDomains are a powerful concept in .NET, however as most applications you write live within a single AppDomain, you may not have noticed them before. My problem was that
in .NET, you cannot simply unload an assembly directly. However, if we were to create a new AppDomain, load our dynamic assembly within it, call the methods needed, and
then unload the AppDomain, we could load, unload, update versions and reload until our hearts content. The final piece of our puzzle (that we already had in place) is to
use an interface to allow us the ability to invoke methods on the loaded assembly from our manager executable.
The solution I've created to demonstrate this concept uses four projects:
AppDomainLoad: A basic console application that simply news up an instance of the Manager class and calls the entry method.
WorkerShared: This project holds any objects that will be used by both the Manager and Worker classes. This is the only assembly that will be loaded by both AppDomains.
Our shared interface, IWorker, lives in this project. A utility class calls
AppDomain.CurrentDomain.GetAssemblies() to let us know what really is being loaded at runtime. This is a handy method to use, even in standard single AppDomain
applications, to ensure you only load what you need.
WorkerManager: The .dll that creates a separate AppDomain, loads an instance of the dynamic assembly, and casts this instance to the IWorker interface. After all this, the
Manager simply calls a method available from the interface. Once the work is complete, the AppDomain is unloaded, which drops any assemblies loaded within the worker
domain.
DisconnectedWorker: Where the rubber hits the road, this project executes the actual work. The worker class a) implements the IWorker interface b) derives from
MarshalByRefObject, which allows access to objects across domain boundaries (because these interactions are basically remoting under the covers), and c) is marked as
Serializable.
One final note, after building the projects, I placed the WorkerShared.dll and DisconnectedWorker.dll bits into the C:\BlogProjects\AssemblyPool directory. This is only to
simplify the project code; your project can locate these assemblies however you need. For this example, create the directory and drop the assemblies.
Here's the example code. The key classes' code is shown below. Let me know if you
have any questions.
IWorker interface
namespace WorkerShared
{
public interface IWorker
{
// Define required methods:
void DoWork();
}
}
WorkerManager
using System;
using WorkerShared;
namespace WorkerManager
{
public class Manager
{
private const string CONFIG_ASSEMBLY_POOL = @"C:\BlogProjects\AssemblyPool";
private const string CONFIG_DYNAMIC_ASSEMBLY_PROJECT = "DisconnectedWorker";
private const string CONFIG_DYNAMIC_ASSEMBLY_FULLY_QUALIFIED_NAME = "DisconnectedWorker.Worker";
private const string FORMAT_WORKER_DOMAIN_FRIENDLY_NAME = "Dynamic Worker Domain";
private const string FORMAT_WORKER_DOMAIN_CREATED = "Created '{0}' AppDomain";
private const string FORMAT_WORKER_DOMAIN_UNLOADED = "Unloaded '{0}' AppDomain";
private const string FORMAT_WORK_COMPLETE = "All work complete.";
private const string FORMAT_START_ASSEMBLIES = "Starting Assemblies Loaded:";
private const string FORMAT_END_ASSEMBLIES = "Post-unload Assemblies Loaded:";
public void RunAppDomainExample()
{
// Show current assemblies before we start:
Console.WriteLine(FORMAT_START_ASSEMBLIES);
Utilities.WriteCurrentLoadedAssemblies();
// create display name for appDomain
string workerName = string.Format(FORMAT_WORKER_DOMAIN_FRIENDLY_NAME);
// Construct and setup appDomain settings:
AppDomainSetup ads = new AppDomainSetup();
ads.ApplicationBase = CONFIG_ASSEMBLY_POOL;
ads.DisallowBindingRedirects = false;
ads.DisallowCodeDownload = true;
ads.ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
// Create domain
Console.WriteLine();
AppDomain workerAppDomain = AppDomain.CreateDomain(workerName, null, ads);
Console.WriteLine(FORMAT_WORKER_DOMAIN_CREATED, workerName)
;
// do work on proxy
IWorker workerInstance =
(IWorker)
workerAppDomain.CreateInstanceAndUnwrap(CONFIG_DYNAMIC_ASSEMBLY_PROJECT,
&nbs
p; CONFIG_D
YNAMIC_ASSEMBLY_FULLY_QUALIFIED_NAME);
// Execute the task by invoking method on the interface instance
workerInstance.DoWork();
// Unload worker appDomain
AppDomain.Unload(workerAppDomain);
Console.WriteLine(FORMAT_WORKER_DOMAIN_UNLOADED, workerName)
;
Console.WriteLine();
// Show current assemblies before we start:
Console.WriteLine(FORMAT_END_ASSEMBLIES);
Utilities.WriteCurrentLoadedAssemblies();
Console.WriteLine(FORMAT_WORK_COMPLETE);
Console.ReadLine();
}
}
}
DisconnectedWorker
using System;
using WorkerShared;
namespace DisconnectedWorker
{
[Serializable]
public class Worker : MarshalByRefObject, IWorker
{
public void DoWork()
{
// Show the assemblies loaded in this appDomain
Utilities.WriteCurrentLoadedAssemblies();
}
}
}
Utilities
using System;
using System.Reflection;
namespace WorkerShared
{
public static class Utilities
{
public static void WriteCurrentLoadedAssemblies()
{
Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach (Assembly assembly in assemblies)
{
Console.WriteLine("Loaded:
{0}.", assembly.ManifestModule.Name);
}
}
}
}
Payday: The Project Output
Starting Assemblies Loaded:
Loaded: mscorlib.dll.
Loaded: Microsoft.VisualStudio.HostingProcess.Utilities.dll.
Loaded: System.Windows.Forms.dll.
Loaded: System.dll.
Loaded: System.Drawing.dll.
Loaded: Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll.
Loaded: AppDomainLoad.vshost.exe.
Loaded: System.Data.dll.
Loaded: System.Xml.dll.
Loaded: AppDomainLoad.exe.
Loaded: WorkerManager.dll.
Loaded: WorkerShared.dll.
Created 'Dynamic Worker Domain' AppDomain
Loaded: mscorlib.dll.
Loaded: Microsoft.VisualStudio.HostingProcess.Utilities.dll.
Loaded: DisconnectedWorker.dll.
Loaded: WorkerShared.dll.
Unloaded 'Dynamic Worker Domain' AppDomain
Post-unload Assemblies Loaded:
Loaded: mscorlib.dll.
Loaded: Microsoft.VisualStudio.HostingProcess.Utilities.dll.
Loaded: System.Windows.Forms.dll.
Loaded: System.dll.
Loaded: System.Drawing.dll.
Loaded: Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll.
Loaded: AppDomainLoad.vshost.exe.
Loaded: System.Data.dll.
Loaded: System.Xml.dll.
Loaded: AppDomainLoad.exe.
Loaded: WorkerManager.dll.
Loaded: WorkerShared.dll.
All work complete.
Well, that pretty much wraps up MIX 2007. What a great showing by Microsoft. Keeping with Clarity tradition, thought I should throw up a few fuzzy pics:

Keynote conference layout

Guitar Hero and Gears of War got a LOT of attention. Is this the defining geek image of our generation?

This is your shirt. This is your shirt when you fly Southwest. Any questions?
My final session of Tuesday was a deep dive on ASP.NET AJAX, with Jeff Prosise, co-founder of Wintellect and Matt Gibbs, Development Manager at Microsoft.
Jeff and Matt did an excellent job of challenging the advanced AJAX guys while still engaging coders with less experience using the ASP.NET AJAX libraries. These two guys seemed to get along really well, and (are you sitting down?) the banter between them was friendly and funny... not that common of a combination from my experience with major conference presentations. The expertise of ASP.NET AJAX they showed by easily handling difficult questions sold me, I'll be checking their blogs from now on.
Code-wise, these two didn't so much deep dive into one particular example, but instead provided "seed" information that I plan to research after the conference. In fact, I left not quite sure what specific points I could write about here, but I am positive that I just accumulated a lot of great tips & tricks that may come up with my clients in the future. A few tips:
- When using multiple UpdatePanels per page, start getting into the habit of setting the UpdateMode flag to "Conditional". This prevents non-updated panels from sending their contents (viewstate, etc) up the pipe. No need to send this traffic unless the content needs to be updated, right? Keep in mind that with this method, if UpdatePanel A needs to update whenever UpdatePanel C is changed, you'll have to explicitly call UpdatePanel A's Update method in the managed code (example: PanelA.Update();)
- Immediately go and download Nikhil Kothari's Web Development Helper Utility. What a great tool for watching your asynch postbacks firing client-server: turn logging on and start reducing your traffic size.
- The ASP.NET AJAX library .pdb files are now available, add 'em to your project to allow debugging into the libraries themselves. Email Matt if you see any bugs.
- I will forever be stealing the phrase "New it up" to mean instantiating an object. It's stuck in my head forever, much like Bonnie Tyler's "Total Eclipse of the Heart".
- An UpdatePanel's brain actually lies within the System.WebForms.PageRequestManager class, so take a look at leveraging it's events to manipulate your partial page updates:
var mgr = System.WebForms.PageRequestManager.getInstance();
mgr.add_InitializeRequest(InitRequest);
function InitRequest(sender, args) {
args.set_Cancel(!confirm('Really postback?'));
}
Even though this example isn't very real-world, you could use something like this to prioritize async calls, preventing a more important in-progress request from being cancelled by a subsequent one. Jeff also used a similar method to draw attention to an updated content area after the asynch postback completed. Related docs:ASP.NET AJAX PageRequestManager doc
Great job, guys. Turn around, bright eyes...
I received more detailed info on Silverlight 1.1, here's a quick synopsis:
Silverlight 1.0 provides the core functionality for Microsoft's new cross-browser, cross-platform web presentation plugin. Version 1.1 (now available in Alpha) adds the .NET framework, allowing powerful coding in familiar territory to .NET developers.
- The Silverlight version of the framework is a trimmed-down, factored subset of the full .NET Framework
- This refactored framework drops unnecessary parts, such as COM Interop, and provides others on a "pay for play" basis. This allows the Silverlight .NET Framework to be ~4MB, versus the full version's ~50MB.
- Uses the same tools, APIs and technology as full version, requiring minimal code changes to support both a rich interactive web application and a full desktop implementation of your project
- Silverlight lives in a sandbox, much like the HTML DOM, which is familiar ground to web developers
- No way exists to break out of this sandbox, and no permission elevators are provided
- Safe, isolated storage exists in an obfuscated location, allowing Silverlight to maintain a local storage location on the client machine. Don't forget, all this is CLIENT SIDE execution! The framework is downloaded to the client machine, and what we've thought of as server-side execution now is executing on the client itself. When you hit a breakpoint when debugging, you are attached to the client browser process itself. Any immediate window edits, etc, actually affect the client instance.
- Client-based file upload controls will allow direct manipulation of files specified by the user on their local disk. The thinking is that if the user specified the file, it is safe for Silverlight to manipulate it.
- Cross-domain support is in progress
- 1.1 adds XAML extensibility, Control classes (user controls) and a subset of sample controls
- Data binding is on the way
- Only a subset of full WPF, so features such as 3D imaging not available.. these features really require the full hardware processing of a desktop machine to render correctly.
So, what do you need to build and run a Silverlight app? Here are the recommendations for most developers: (all available at http://www.silverlight.net)
- Silverlight 1.1 Alpha runtime installation
- Visual Studio Codename "Orcas" Beta 1
- Silverlight Tools Alpha for Visual Studio Codename "Orcas" Beta 1
- Expression Blend 2 May Preview
- ASP.NET Futures
I attended Omar Khan's Visual Studio Codename "Orcas" Preview for AJAX Web Development this afternoon, and walked away very excited about getting my hands on it. Unlike the Silverlight alpha & beta previews, which will take nearly a complete paradigm shift by designers and developers to fully appreciate, Orcas appears to be ready to move development teams smoothly into the latest release of .NET 3.5. They've accomplished this by satisfying .NET developers wants, needs & more:
Needs
My #1 ASP.NET IDE complaint is history: Nested Master Pages now render correctly to the design window, instead of the previous IDE approach of "if at first you don't succeed, String.Empty". This will encourage more code reuse by allowing simple usages of multiple master pages for common content.
Comprehensive ASP.NET AJAX 1.0 support: A "huge investment in Javascript tooling for Orcas" is evident by the numerous AJAX Master Page, AJAX form and AJAX control items that are now available as file types you may add to your project. AJAX ojbects are now available within the Orcas toolbox.
This commitment also means that your days of debugging inane client script errors may soon be ending: Impressive context-sensitive Intellisense is now in place for Javascript, including smart discovery of object types (a var assigned to an integer gets numeric Intellisense options, etc). Even your external script libraries are available within Intellisene if linked into the page. And, if script library "A" references second library "B", you'll have Intellisense when editing the library "A" in the IDE; shared libraries are supported throughout a web project in this manner.
One of the coolest features I saw was the ability to comment your javascript and have the information parsed as Intellisense tags. Summary, description, parameter and return values can be specified in the Javascript functions, making client-side coding so much easier. Commenting a return type even explicitly sets the calling code's variable to the specified data type. (I worry this could be error-prone: would err later if function changed but comment didn't?)
SCRIPT DEBUGGING!!! I know that VS 2005 supports client-side debugging, but c'mon, are you really using it? Orcas makes debugging script much more intuitive: when a breakpoint is set on a file, the breakpoint is mapped to the file executing at the browser, giving the effect of direct breakpoint placement. Once you enable script debugging on the browser itself, you're off to the races... I can't WAIT for this one.
Wants
Multi-Targeting: This describes Orcas' complete support of previous .NET framework versions. Simply changes the target platform property, and the IDE configures itself to completely work within the desired version. Sounds simple, but it's a big deal: Target .NET 3.5 and projects reference the System.Core and System.Web.Expressions namespaces required by the latest technologies. Change to .NET 2.0 and the references are gone, the project type dialogs no longer contain > 2.0 project types, the compilers move to 2.0, config files are immediatley rewritten for compliance, etc. This is ideal for project teams that are currently supporting previous .NET projects in 1.1 or 2.0, but still want to move forward with development in 3.5. We can have the best of both worlds.
Linq To Sql File: .dbml file types can be used to create Linq data context objects, which allow direct querying of a SQL database. This gives you strongly-typed, object- relational data objects for direct data access. Admittedly, I am a newbie to LINQ, but I have some serious doubts about this type of tool... sounds great, but in these demos they rarely discuss the issues that tend to trip us up: Error handling, paging, caching, validation, saving back to database, etc.
Whoa, nice
Integrated CSS tools, including the ability to use split views (markup & design view); a CSS properties window which also identifies every element or class a particular object's current styling is deriving from (sweet); design view adjustment of margins & sizing; the ability to create new style classes within the IDE and drag/drop them immediately into your external, linked CSS files; the really handy ability to adjust margin, sizes, etc within the VS IDE design view, while your changes are applied directly to the current CSS file(s).
I'm sure the team at Clarity will be posting more and more about Orcas as we continue to explore all of the new features... for now, I'm considering it a "Krill-er App"... sorry, just couldn't resist that.
Wow. We just finished up the Microsoft MIX 07 keynote address, and as Ray Ozzie and Scott Guthrie were detailing the latest announcements from the Microsoft dev front, some eyepopping demos and incredible platform announcements were made public. As I took notes, everytime I saw something I couldn't wait to get my hands on, I shorthanded a WOW next to the item. The WOWs are piling up out here:
Without some screenshots, no blog cannot begin to describe how these new apps look. All I can say is that the standard html site, and even the latest AJAX enabled sites will pale in comparision to the new "rich interactive applications" to be created in the coming months.
>> Silverlight 1.1 Alpha is now available, INCLUDING managed code support! All 37 .NET supported languages are supported cross browser. The ability for a designer to create XAML-based designs within Microsoft Expression Suite, sitting alongside a developer referencing the same files within Visual Studio is mind-blowing, as for the first time, the design/dev relationship is now a two-way street. In the past, designers would create and spec out the general project layout, only to have devs mangle the design to the point of no return. No more. To make design tweaks the designer need only adjust his/her XAML files, and return them back to the developer. By the way, Silverlight is STANDARDS based.
Basically Silverlight comes down to three parts
- Robust, even HD-quality, seamless video integration & streaming
- .NET support in X-browser, X-platform web plugin
- A service platform used to evolve "universal web" and "experience first" applications
>> The announcement of Microsoft Expression Suite, which includes Expression Media for video encoding; Expression Design for producing XAML projects managing "assets" (graphics, styles, etc); Expression Blend for combining design and multimedia; and Expression Web, for incorporating these projects into a web-based Silverlight site.
>> Micrsoft Streaming Service: We now have access to 4GB of upload space to host any videos for live streaming into our sites. What a great way for devs without storage space and/or a Windows Server with streaming capabilities to take advantage of all Silverlight will offer.
>> Scott Guthrie's walk-through of the UX for a first time Silverlight visitor was shockingly friendly. A clean XP machine, on first visit to a Silverlight site required one click to install the Silverlight runtime. Assuming the demo was somewhat legit, the entire installation was complete in under 20 seconds, and the app instantly launched.
>> Remote, Cross-browser, Cross-platform debugging: Devs now have the ability within Visual Stuio to attach to a remote machine running a Silverlight application, regardless of operating system and browser. Imagine sitting inside VS, watching remote breakpoints being hit, while tweaking any objects you desire within the immediate window... pretty amazing to see a Mac being adusted on the fly via Visual Studio.
>> Full, open source, dynamic language support, including command line utilities (IronPython, JavaScript, Dynamic VB, IronRuby)
>> SO much more... I have a ton of topics to get to, I'll keep adding as we go...
All downloads are released as of this morning at http://www.microsoft.com/silverlight/downloads.aspx
More Posts
Next page »