Steve Holstad's "the bright lights"

"Just because your voice reaches halfway around the world doesn't mean you are wiser than when it reached only to the end of the bar." - Edward R. Murrow
in
Gadfly Upcoming Features

We've had a LOT of great feeback come in regarding Gadfly the past few weeks, thanks to everybody that's made an effort to tell us what they love, hate and want to see in the future.  I thought it was only fair to publish a list of upcoming items, both to whet your whistle and to commit me to getting them done in the very near future.  Does anybody say "whet your whistle" anymore? 

Upcoming Features:

  • Short URL preview control:  This is going to be above and beyond any of the basic URL un-shortening previewers around today.  We see this as a dynamic user control that pops the full, original url, some sort of page preview or screenshot of the destination, site metadata, and maybe even some video.  Ever been stung by people shortening malicious links?  With Gadfly, those days will be over.  I can't wait to get this control in place.

  • Threaded Conversations/In-Reply-To Tracking:  This is a must-have that's been requested by multiple users... we'll be adding support for tracking a conversation by displaying a chain of tweets that have been involved in a "reply-to" thread, aka a Twitter conversation. 

  • Drag and Drop Groups:   A lot of requests for this one.

  • Trending Topics:  I'll come clean: I didn't think people used these as much as they do.  They'll be in place soon.

  • Enhanced Geolocation Functionality:  We have some ideas to make this more clean, more accurate and more fun.  Also there may be some upcoming changes to the Twitter API that will enable Gadfly to do more with the raw geolocation data we currently generate.

  • Out of Browser Authentication:  Gadfly already supports multiple Twitter accounts.  These are fully functional in the web browser... but currently in the installed OOB version you can only access accounts you registered with Gadfly from the browser (so you can't add new accounts directly in OOB).  Looking for ways around this, but tough without the HTML Bridge available.  I do have a method that works (click a tweet link in OOB)... so maybe this is possible.

  • Skinnable Gadfly.  We've tossed around the idea of making Gadfly skinnable.  A few requests for this and a very cool way to make it "yours" and show off some design skills.  I'd love to host a Gadfly Skin library at some point.  Creating a Zune-like skin would be one of our first attempts at this.   GadZune.  Flypaper.  If you name it they will come.

Upcoming Bug Fixes:

  • We are aware of some issues with the Tweet controls inside the panels, where the profile pic floats a little bit to the side. 
  • Quite a few minor tweaks will be included in the next release to continue stabilizing the Gadfly Beta.

And remember: we're still listening and will be pushing a build soon, so keep feedback coming via comments or on Twitter @steveholstad or @gadflyclient

http://gadfly.claritycon.com

Introducing Gadfly, The Silverlight Twitter Client (with Out of Browser support)

We recently released Gadfly, our Silverlight Twitter client, to public beta.  This project stems from my old Twitterlight days, and thanks to a few kind souls here at Clarity, the project gained momentum and has become a very well received Silverlight offering.  Gadfly has already become the everyday Twitter client for some, thanks to the feature list below and support for Silverlight Out-of-Browser (OOB), which is part of Silverlight 3.  OOB applications are one-click installations onto a client system, and behave much as a desktop application would without the need for a separate framework installation, such as AIR.  Another nice feature of OOB apps is the ability to deliver both web and desktop experiences to users while maintaining a single code base.  And we're talking cross-browser, cross-platform for these, too.  OOB apps live in the browser sandbox for obvious security reasons, but I think that even with its current limitations out of browser will have a huge impact on RIA developers starting immediately and expanding more and more as the feature list grows.

 To be sure, we're still gathering feedback from users, planning additions and adding polish, but the current release is pretty solid and has a ton of features.  We have even more additions in mind, check the next post for a few of the ideas we've started/brainstormed.  I won't rehash all of the features of Gadfly, as http://gadfly.claritycon.com has been launched with a cool-factor I could never achieve.  It's also the place for you to launch Gadfly and give it a go. 

A quick overview of some of my favorite features:

  • Virtualizing Stack Panels.  Lee Roth did the work on this custom control that produces significant performance gains and memory reduction by virtualizing the list of items bound to the panel, and recycling the Tweet controls to eliminate the need for newing up one control for each item in the list.  Currently we store up to 300 friend tweets in isolated storage, without virtualization you'd see noticable lag while they are loaded, created and databound.  I don't have a screenshot because it's a bit of an abstract concept, but just take a moment the appreciate the virtualization awesomeness in your head.....mmmmmmm....cool.  Seriously this was a ton of work and Lee's been knee deep in virtualization lately.  Check out his write-up.

  • Slick design.  Erik Klimczak put together the look and feel of the app, which I think really shows off some of what the Clarity Design Team can do in a very short period of time.  Lots of detail and nuance in here.. you'll have to discover on your own what the app does when Twitter is down or when you near the Twitter API limit.  Hmm, apps can have a sense of humor now?

  • Multiple custom group types.  Notice the left hand bar?  That contains any search groups you've added, any users you've singled out, and custom groups of users you created, a few "system" groups most Twitter users love (DMs, Mentions, Public, etc), a customizable geolocating Nearby group, and Gadfly Picks, which we'll discuss below.  You can have as many of these groups active as you like, and they will resize to fit the current screen area.  Horizontal scrolling is available for the rest, as well as the ability to click the group name to scroll the group back into view.

Gadfly screen 1


  • Fleep-A-Tweet.  Yeah I just made that up.  But you CAN click on the tweeter's profile pic and the tweet will flip to view more detail about that person.  Still not satisfied?  Then click the expander and see that user's recent timeline, or add/drop the person as a friend.  And c'mon, you KNOW "fleep a tweet" is fun to say.  It's kinda Chef Boyardee.  Yeah I said it.

Gadfly screen 2


  • Manage your custom groups.  Pretty self explanatory.

Gadfly screen 3


  • The Nearby group and geolocating tweets.  THE Kevin Marshall's contribution to Gadfly:  If you open the "Nearby" system group, Gadfly will try to determine your current location.  If your location is found, you'll see all tweets by users located within 20 miles of the specified location.  If you want to set the location manually, click the current location and enter a city, zip, landmark, etc and we'll try to map it to a geolocation.  A perfect feature for travelers who want to keep aware of local tweeters as they change areas.  (Note, some providers and corporate networks will struggle to accurately display your current location).  Btw he calls this type of thing a "Kevinnovation".  Patent pending.

Gadfly screen 4

  • Gadfly Picks.  This feature from George Durzi has some HUGE potential.  Here's how it works:  you rate tweets you love (5), hate (1) or whatever and Gadlfy starts to learn your preferences.  As Gadfly Picks' algorithm starts to identify other Gadfly users that have similar likes/dislikes as you, you'll start to see Gadfly Picks populate with ~3 recommended tweeter's timelines.  The Picks are regenerated each hour, so if you don't like some of the recommendations, just rank their tweets with a lower score and they'll drop out of your Gadfly Picks from now on.  You can also check out George's post for more info.

Gadfly screen 5

So there are a few of my favorite additions, I really hope you give Gadfly a try. And PLEASE send feature requests, bugs and comments to me via blog comments or on twitter @steveholstad.  And if you have any postive feedback we'll take that too, as anything helps to bring Lee back from the virtual world he's been living in.

The Gadfather.

http://gadfly.claritycon.com

 

Silverlight March Madness Bracket Application

Last week was the start of the NCAA men's basketball tournament, aka March Madness. I did the obligatory bracket predictions via the usual sites, but noticed this could be an excellent opportunity to showcase Silverlight. Jeff had been tossing around the idea of creating something like this for awhile, and he convinced me to get cracking. Basically the app is a data-driven bracket layout system that allows me to setup a visual tournament structure. Teams are assigned to a starting "slot" (2 slots per game of course). Once this is in place, the user can create a new predictions for each game by simply clicking or drag/dropping the desired team onto the desired slot.

Demo the app: http://brackets.claritycon.com

Clarity Bracket Drag and Drop NCCA Bracket Silverlight app

Adding drag and drop to a Silverlight application is becoming more and more trivial. I've done this manually in the past, but now use the Silverlight Drag Drop Manager framework found on CodePlex. The individual teams are each assigned to an instance of DragSource, while each game's slots are assigned to a new DropTarget. I created a few user controls, one to bind to the team information I wished to display, and another to act as the "ghost", which appears when a drag is in process. Then it's a matter of dynamically determining which DragSources (teams) are allowed to be placed on which DropTargets. I then made some minor customizations the framework to suit my needs, added some styling and drag and drop was in place. In case you're wondering, my modifications were basically to expand the legal droppable area to slightly outside of the actual DropTarget, as early testers didn't feel the targets were easily hit.The brackets for this tournament setup are too large to cleanly show on one screen, so I added some transition animations to give a panning-like feel as the user navigates between four regions and the Final Four. Right now the effect is decent, but I am looking for a way to avoid the slight delay I'm seeing as the new page dynamically loads the DragSources and DropTargets. I have been told about some WPF workarounds, but nothing as yet for Silverlight. I'll post an update if I find a solution.

In order to make the app a little more fun I've added the ability to create private groups, added per-round scoring, enabled Twitter updates when games results are posted, and a live chat module. It's also utilizing the NCAA March Madness Developer Platform, which links directly to each game's live video feed.

Clarity Bracket Drag and Drop NCCA Bracket Silverlight app

I've created a Sweet 16 version of the app (it spots you the first two rounds we missed)... if you want to try it out:

  • http://brackets.claritycon.com
  • Create a user under “New Player Registration”
  • Click the “2009 Sweet Sixteen” tournament
  • Under “Join Existing Group”, enter the following:
    • Group Name: TwitterTesters
    • Group Password: tweet
    • Entry Name: [your entry’s nickname]
  • Click your entry name in the Group Home grid
  • Single-click or drag/drop your predictions into the open slots (As the tourney has already started you will have the first two rounds auto populated for you)
  • Don’t forget to navigate to all four regions, and the Final Four, to complete your picks
  • Picks are saved as you go, no need to “Submit”
  • If you enabled twitter updates, follow the ClarityBracket user at http://twitter.com/claritybracket - this is in early testing… but should see updates after a game is finalized by admin (me)
  • Chat is the newest feature, so feel free to post away… though keep in mind it is global and public!

Good luck, have fun and let me know what you think.

Thirsty Developer Show - Twitterlight (Silverlight + Twitter Client)

Last week Larry Clarkin of The Thirsty Developer and I sat down to discuss my hobby project Twitterlight, a fully-functional Twitter client written in Silverlight. We discussed Twitter's REST service, getting started with Silverlight development and some common pitfalls to avoid.

I think it turned out nicely, check it out and let me know if you have questions or thoughts: Listen to the podcast

The source code is available at http://employees.claritycon.com/sholstad/publicsource/Twitterlight_v22.zip

And of course, don't forget to follow me on Twitter.

Twitterlight updated to Silverlight RTW

Twitterlight, THE browser-based Silverlight Twitter client, has been updated from Beta 2 to the official Silverlight 2.0 RTW.

 http://www.twitterlight.com

 

WhereTheEL: Tracking the Chicago CTA "El" System

Try the WhereTheEL alpha

The past few weeks I have been spending some of my days creating a project we have discussed here at Clarity for quite some time: live tracking the trains of the Chicago "EL" system.  Currently GPS data is not yet available for individual trains, so we decided to leverage the growing community of active Twitter users to "crowdsource" this information.  A basic user scenario goes something like this:

Sweet Lou is standing on the platform of the Red Line's Addison station.  When his southbound train arrives, he hops on and pulls up a favorite Twitter client on his phone.  He sends a quick Twitter message directed to the WhereTheEL Twitter user: "@WhereTheEL Red Add S"  (red line, Addison, southbound).  Happy with contributing to the community, he cranks up "Go Cubs Go" and enjoys the ride.

Ozzie is in the loop, waiting at the Jackson station for a Red Line train.  In a hurry, he's not sure how long he should wait before catching a cab... so he pulls up the WhereTheEL site on his phone and is happy to see the image below.  Looks like a Red Line train is approaching the loop, so he skips the cab and waits for its arrival.

whereTheEl_Screen1

Building the App

The site checks in with its LINQ to SQL data context every thirty seconds to determine if/where any trains have been reported by Twitter users, and determines the trains' current positions.  On page load, the train routes are loaded from a kml file, and an overlay is created to draw the paths.  A second map overlay is created to display the collection of EL stations loaded from the database, with each object containing customized markup to display when the station marker is clicked.

The brain behind the site mentally walks the tracks, estimating where the train should be according to the last reported position.  The time between stations is calculated from the posted CTA schedules.  For each active train, a marker object is geocoded to the appropriate station.  In the scenario above, checking the site ten minutes after Lou reported seeing the Red Line would display a train approximately ten minutes past the Addison station.  Users can click on the train icons to view basic sighting information, and station icons to view CTA schedules.

In order to keep the map constantly updated, a windows service was created to access the Twitter REST API to retrieve any messages targeted at the WhereTheEL user.  These "replies" are then saved using LINQ to XML into message objects.  The messages are parsed to perform the lookups for train line, station and direction.  If a match is found, the object is inserted into the database via LINQ to SQL for mapping display on the web site.

popup1EL Train popup 

Detailed instructions on how to contribute are posted on the site:

Some future feature ideas:

  • Notifications: allow user to subscribe to line/station/time specific text notifications via Twitter Direct message
  • Host Google map control within AJAX Update Panel when supported
  • Silverlight conversion for animation of active trains
  • Ability to notify service regarding accidents/delays/etc
  • Create mobile application to leverage phones' GPS functionality (auto-reporting)
  • The bottleneck right now is the time from the Twitter Reply creation to availability in the API feed, so may need to find a more direct route (Twitter Direct messages)
Twitterlight updated with animating wrap panel

Twitterlight has been updated with some new features that really up the usability of the app.

http://www.twitterlight.com

twitterlight screen shot

  • 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.

 

 

 

 

Twitterlight to Silverlight 2.0 Beta 1

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.

Facebook Developer Toolkit 1.6 Released on CodePlex

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.

Twitterlight: Silverlight 2.0 (Alpha) Twitter Mashup

 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.

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

Ding Ding! Sandcastle Oct CTP and the Sandcastle Help File Builder

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.

Sandcastle Help File Builder

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

 

OpenSocial Google API Release taking on Facebook

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: , , ,
Del.icio.us Tags: , , ,
Coding4Fun: YeahTrivia client & server using WCF & WPF

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: , ,
Del.icio.us Tags: , ,

Apple to provide SDK & allow 3rd party apps on iPhone

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

WhatWG, W3C and HTML 5.0

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



More Posts Next page »