Skip Navigation LinksHome > View Post

RIA/JS: The barebones demo

Earlier this week I promised some blog posts about my new project: RIA/JS and I'm pleased to bring you the first, of hopefully many. I wanted to start with a series of short webcasts that show the technology and the pieces that are currently available. Note that these pieces are just an early preview, but you should get some ideas of where we're headed and this is a great time to provide us feedback on what you like/don't like and what you need.

I wanted the videos to be very short, around 5 minutes. This first one is a little longer as it has to set the scene - but it's still only 12 mins and I promise it will be 12 minutes well spent! Off you go:

Things you’ll need to get started:

Also, the NuGet package you want is: RiaServices.jQuery

If you don’t NuGet yet, you should, but you can still get the scripts you need over here on codeplex: http://wcf.codeplex.com/releases/view/69862

And about the demo:

I'd really recommend watching the web cast, but in case you want the code I entered into the console:

// create an array to hold my data
var contracts = [];

// create the data source and
//
refresh it (populate the array)
$([contacts]).dataSource(
  {
    serviceUrl: "/RiaJs-Demo1-ContactService.svc",
    queryName: "GetContacts"
  }).refresh();

// add a new contact, write back
// to the DB using implicit-commit
$.observable(contacts).insert(0,
  {
    FirstName: "Howard",
    LastName: "Dierking"
  });

Stay tuned as next time I plan to show more features of data source and this time, I promise we’ll be closer to 5 mins.

Note: There is a little ‘bugette’ in the RiaServices.jQuery NuGet package at the moment that adds two JSON endpoints:

<system.serviceModel>
  <domainServices>
    <endpoints>
      <add name="soap" type="Microsoft …
      <add name="JSON" type="Microsoft …
      <add name="json" transmitMetadat …
    </endpoints>
  </domainServices>

You can delete either of the highlighted lines and you’ll be good to go!

 
Josh Post By Josh Twist
5:43 PM
05 Oct 2011

» Next Post: RIA/JS: Buffer, Commit or Revert &ndash; the choice is yours
« Previous Post: A new challenge

Comments are closed for this post.

Posted by Dave lowe @ 07 Oct 2011 8:31 AM
hey Josh,
I caugh your BUILD presentation and found it highly informative.Wouldn't mind checking this one out but is there a download of it available on Channel9 at all? Only I'm spending a lot of time travelling these days so dont have a reliable connection?

Posted by josh @ 07 Oct 2011 4:59 PM
Hi Dave,

You can download the video from vimeo at http://vimeo.com/30058467 - there's a link on the right of the page.

HTH!

Josh

Posted by Dave lowe @ 08 Oct 2011 3:21 PM
nice one cheers josh, watched it on the train yesterday - looks pretty exciting. the only concern i have with this kind of javascript based magic is where does it fit in with accessibility concerns? i've always tried to follow the approach that you build a site/app so it works without any script then layer then ajax whizzy stuff on top?

Posted by Josh @ 08 Oct 2011 5:26 PM
Hi Dave,

You raise a great point. There is guidance emerging from the WAI about this called ARIA - http://www.w3.org/WAI/intro/aria.

I think it's early days on that front but rich, single-page scripted apps are going to be huge. There's a bunch of reasons, not least - offline/disconnected support (especially on devices like phones with native wrappers like that offered by phonegap.com, or windows 8 WinJs applications).

Just take a look at the source of Google+!

© 2005 - 2014 Josh Twist - All Rights Reserved.