CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

John Papa [MVP C#]

.NET Code Samples, Data Access, and Other Musings

May 2008 - Posts

  • Silverlight Consuming REST Services

    I just finished writing the first draft of a sample I am including in my upcoming book tentatively titled Data Access with Silverlight 2 by O'Reilly. Without giving too much away yet since the final details of the contract are not set in stone, the application example consumes a REST service, manipulates it through LINQ to XML, and binds it to various controls and some composite controls. The interaction with the REST (REpresentational State Transfer) services is pretty slick and quite easy when using Silverlight and LINQ to XML. Of course there are always issues to deal with, but overall it works very nicely.

    Why use REST? Well, REST services are becoming more abundant on the web. They do not expose a contract like WCF so when you deal with this type of data you can parse the XML using LINQ to XML or some other XML tools (though LINQ TO XML is so smooth why bother with anything else in this case). So this raw XML comes barreling into your Silverlight application asynchronously, LINQ to XML makes it fall in line, and its bound to where it needs to go via XAML.

    Sending data back via REST is also very cool. I've got that working now too. I have to be careful not to go overboard fine tuning the examples though or the book will never get written :) Interacting with REST from Silverlight applications is just one piece of the data access puzzle, but its pretty cool.

     

    Cross posted from johnpapa.net

  • DevConnections Las Vegas - Nov 2008

    I'll be speaking at DevConnections in Las Vegas this Fall along with others Julie Lerman and Paul Litwin. The 3 topics I will be presenting are:

    • Data Access with Silverlight 2
    • Integrating Enterprise Library's Data Access Application Block with your Project
    • Practical Strategies with the Entity Framework

    image

    The past few events have been awesome and getting stronger and more fun each time. If you are planning on attending the conference in the Fall, please stop by and say hi.

    My upcoming book tentatively titled Data Access with Silverlight 2 should almost be available by the conference. I am targeting December, but I am hoping I can pull it off for November.

     

    Cross posted from johnpapa.net

  • Silverlight 2 Book Cover Mock Up

    Here is the mock up of my upcoming Silverlight 2 book that I mentioned earlier today. The title is still up in the air, as is the cover art, and ... let's face it ...  just about everything except for the release date of Nov/Dec 2008.  I just wanted to see what it might look like so I mocked up a fake book cover to the amusement of myself and my daughters. Though I think they want a cat or an eagle on the cover :-)

    Data Access with Silverlight 2

     

    Cross posted from johnpapa.net

  • As it Once Was, I am Writing a Book

    It is 3 am and I am learning the subtle balance of typing with one hand while swaying and comforting  my new born child in the other. She was up late crying ... a lot. She had colic. So we took turns staying up with her to comfort her. The problem was I also had a book to finish.

    It has been years since I last wrote any part of a book. I authored or co-authored 8 books on cool topics including SQL Server, ADO, and XML back in the late 90's and early 2000's. Then something happened ... something wonderful. 3 times. I had a child, and another, and another. Suddenly the massive amounts of time I was dedicating to writing books morphed into a blissful parenting experience. I still enjoyed writing so I hit the articles hard writing more than 70 articles over the past 7 years and I spoke at several conferences.

    My kids aren't full grown but I've recently had an urge to get a book out. I've been deep into the new data access technologies since they were announced. I've been working hard at making practical Silverlight 2 applications that are more about how to implement SIlverlight 2 in line of business applications as opposed to just making pretty circles bounce on a screen (though that is cool too). A few weeks later my book idea is refined and on its way to being written and on the shelves. I expect it to be out in November of this year.

    I expect my next few months are now going to be full of work, writing a book and family time ... basically eliminating all sleep. Just like it used to be. At least this time I can use 2 hands to type.

     

    Cross posted from johnpapa.net

  • Entity Framework & LINQ Tonight in Sarasota

    Tonight I will be joining the Sarasota SQL Server User group and the Sarasota .NET User group at their combined May 2008 meeting. I will be presenting the Entity Framework and LINQ using the new bits that came out 2 days ago on Monday including the new features that it brings. I always have a good time at user groups and especially so when its a hot topic like the Entity Framework and LINQ.

    I'll be showing several demonstrations using the Entity Framework that demonstrate how to use it in different scenarios and its future direction. I'm looking forward it!

    Here is the logistical information for tonight's event and Here is link to a google map for directions.


    5/14/2008 @ 6:00 PM - 7:30 PM

    Welcome Time:
    5/14/2008 5:45 PM Eastern Time

    Location:

    The Community Foundation of Sarasota County

    2635 Fruitville Road

    Sarasota, FL 34237

     

    Cross posted from johnpapa.net

  • Visual Studio 2008 and .NET 3.5 SP 1 Beta Download

    Soma announced this morning that Visual Studio 2008 and .NET 3.5 SP 1 is now ready and can be downloaded. This includes several updates, includes support for SQL Server 2008, and has a few new products including the Entity Framework, LINQ to Entities and ADO.NET Data Services (aka Astoria). ScottGu posted some notes regarding what's included in the service pack, as well.

    Of course all of this is released 2 days before I have a demonstration on the Entity Framework and LINQ to Entities on Wednesday to the Sarasota .NET and SQL Server User groups. So I have a few modifications to make for my presentations.

    I received an error when I first tried to install it. The problem was that the service pack was in conflict with Silverlight Tools Beta for Visual Studio 2008 which I was using to create/edit Silverlight 2 applications. Once uninstalling this i was able to get the service pack to install properly. Scott Gu's post discusses this issue as well as the importance of making sure you install Vista SP 1 first.

    Check out ScottGu's post for full details.

     

    Cross posted johnpapa.net

  • .NET Development with the Wiimote

    My friend and colleague Brian Peek has been developing some awesome and fun applications for a while. As a contributing author to MSDN's Coding 4 Fun Bran has been creating some cool applications that you should really check out at his site at www.brianpeek.com.

    Not his latest, but certainly one of his most famous, achievement is his Wiimote .NET Library and the uses that he is putting it to. Brian got the attention of Newsweek magazine for the Wiimote .NET library that he authored. They interviewed him and the article can be found on line at http://www.newsweek.com/id/136381.  The print article should be in the May 19th issue of the International Edition of Newsweek.

     

    Cross posted from johnpapa.net

  • Feeling Blue

    Today I decided to try out a new theme for my site at johnpapa.net. Rich Mercer has a handful of nice themes posted in his site including this one, which is a variation of the Point Space Blue theme. I'm going to try it out and see where it takes me. Its a pretty clean theme though there are a few items I need to touch up for certain. Hey if anything, my daughter likes this one the best so far.

    I have been thrilled with the flexibility and the low maintenance of Graffiti CMS. I spend so much less time fixing problems than I used to with other products that I will leave unnamed.

    image

    Cross posted from johnpapa.net

  • Silverlight, WCF and LINQ to SQL

    I've had some requests lately to write some articles that work with LINQ to SQL. I've ben focusing on the Entity Framework a lot due to its vast nature and that fact that its still relatively unknown to many people. So I am going to work on a LINQ to SQL project that ties into a multi tier model. I am also going to show how this can be hooked into a  Silverlight 2 UI that connects through WCF to the lower layers.

    I'll probably be demonstrating these first at an event I am trying to set up with Joe Healy of Microsoft in Tampa this coming August. The demos will be ready way before then, but I wanted to have some cool materials for this event. There is no title nor date yet, but once the event is set I will be sure to let blog about it. It should be a great day overall.

    I also plan on giving some love to the Entity Framework, regular persistence/mapper models, MVP patterns and more. I just have to find a way to work it all in and still give enough to each topic. Of course, this means all demos are subject to change, but the content will be fresh and cool for certain.

    Here is a very poorly and quickly thrown together diagram of one of the demos I am tweaking.

    image

    Cross posted from johnpapa.net

  • Silverlight and Baseball

    Being a huge Yankees fan and living out of market like I do I recently purchased the MLB.com TV package so I can watch the games on the Internet. They sued to use Real video streaming however I cranked up the video tonight and noticed some changes form last year. After a quick check, yep, its using Silverlight! I'm sure this was announced somewhere along the way and I just purely missed it. But how cool is it that MLB.com is using Silverlight!

     

    mlb

     

    Yes, I spray painted some logos in the image :) to protect, well, myself!

     SL

    Notice the media controls at the bottom of the video. These appear when you hover over the video.

     kick it on DotNetKicks.com

     

    Cross posted from johnpapa.net

  • Entity Framework Q&A - Lazy Loading, ObjectContext, and LINQ

    I've received hundreds of questions regarding the Entity Framework and LINQ. Obviously developers are very interested in the Entity Framework and its data access and modeling implications. 

    I responded to some of the most frequently asked questions in the May 2008 Data Points column. Topic includes:

    • Why use Entity SQL when I can use LINQ to get to entities?
    • What is the role of ObjectContext?
    • How do explicit and eager loading work LINQ and the Entity Framework?
    • How do I see the SQL that will execute?
    • What can I do with complex types?
    • How do I create a complex type?

    You can find my Data Points column in the May 2008 MSDN Magazine issue online.

    2008-05-MSDN

    kick it on DotNetKicks.com

    Cross posted from johnpapa.net

  • Twitter

    I've joined Twitter. Yep, I did it. I'm going to give it a try and see where it leads. You can follow me at twitter.com/john_papa

    My colleague Brian Peek is also trying out Twitter. You can follow him at twitter.com/brianpeek

    image

     

    Cross Posted from johnpapa.net

  • New Update for Deep Zoom Composer for Silverlight 2

    deepzoom Microsoft released an update to the Deep Zoom Composer for Silverlight 2 Beta 1. I'm excited to try this out as I am working on a Silverlight application that uses the "deep zoom" technology and some of the new features/improvements should help it go smoother.

    Yesterday I posted that Expression 2 was released, today I see Deep Zoom Composer has a new release ... just a hunch but I feel a flurry of releases coming in May ahead of Tech Ed.

    In case you are unfamiliar with the "deep zoom" technology ... basically deep zoom allows users to zoom in and out of images ... ZOOM WAY IN and ZOOM WAY OUT. As a reference point, think about google maps and how you can zoom in and out with them. it provides a way to zoom in and out of images. 

    There is a cool example of deep zoom found at the Hard Rock Memorabilia site. Check out how you can zoom in on the memorabilia images or zoom out and view them all.

    You can see all of the improvements to Deep Zoom Composer on the Expression Blend and Design site. But here is a summary of the changes:

    • Improved Exporting
      • It now touts that it will out put a working Silverlight 2 project along with the image files. This will support mousewheel, panning, zooming, and keyboard navigation. Very cool indeed!
    • Design Experience
      • Image arrangement is easier with snap lines
      • Images can be selected and moved singly or as a group
    • Collections Export
      • Exporting collections now works better so WYSIWYG
    • Help
      • They've included links in the application for help on the forms so you do not have to visit the blog and search through comments to posts.

     kick it on DotNetKicks.com

  • Expression Studio 2 Ready For Download

    x Expression Studio 2 is out of beta and has been released. I've been using the betas and they have been pretty good, but its nice to finally get my hands on the full release as v2 is much better than v1.

    Expression Studio contains the following products:

    • Expression Web 2
    • Expression Blend 2
    • Expression Design 2
    • Expression Media 2
    • Expression Encoder 2

    Clipped from their web site, here is a list of features for Expression Studio 2:

    Design for Windows and the Web

    Use a full range of new professional design tools to bring your creativity to the world of the .NET framework and Silverlight. Design the next generation of user interfaces for Windows and the Web.

    Designer Developer workflow

    Combine Expression Studio for designers with Visual Studio for developers for a powerfully integrated solution for designing and coding innovative applications.

    Design for Silverlight 1.0

    Expression Studio 2 is the essential design resource for Microsoft's newest web technology Silverlight 1.0 - use a combination of Expression Blend 2 and Design 2 to create your Silverlight application and Expression Web 2 to integrate it into your website.

    Standards Based design with Expression Web 2

    Design for today's web standards with Expression Web 2, built to translate your visual layouts into fully compliant pages using your choice of versions of XHTML, CSS, XML and XSLT.

    Harness the power of ASP.NET and PHP with Expression Web 2

    Expression Web 2 is the first web design tool to offer deep support for both ASP.NET 3.5 and PHP which allows designers to collaborate with developers on web projects to make compelling sites.

    Design UX with Expression Blend 2

    Collaborate with developers to produce applications with great user experience that both look great and function well. Design application skins with interactivity and animation without needing to type a line of code.

    Design for XAML

    Design graphic elements for Blend and Silverlight and export them in XAML format to retain absolute fidelity through the life of the project. Have confidence that your design lives on.

    Create Artwork with Expression Design 2

    Create artwork for your desktop and web applications using an exciting drawing tool then either export as XAML or slice your images for the Web.

    Manage your design assets with Expression Media 2

    Keep track of your graphic and video files using Expression Media, a team asset management tool that lets you sort, keyword and find them with unsurpassed ease.

    Encode Video for Silverlight with Expression Encoder 2

    Prepare your files for delivery with Silverlight using the Expression Encoder to crop and add markers enabling your websites to interact with your video content.

    kick it on DotNetKicks.com
    Posted May 03 2008, 10:40 AM by John Papa with 1 comment(s)
    Filed under:
  • Best of Simple-Talk Coming Soon

    Tony Davis of Simple-Talk.com sent me a message today letting me know that they are releasing  an eBook called "Best of Simple-Talk" and that one of my articles regarding gathering RSS feeds will be in it as well as my colleague Jonas Stawski's articles. I do not believe it is released yet but I am told that it will be released through promotions, which means it likely will be free.

    image

    They sent me a preview of the eBook titled "Jit N' Run: The Best of Simple-Talk - ASP.NET Vol. 1". It has a lot of good stuff in it with authors like myself, Jonas Stawski, Jesse Liberty and Dan Wahlin.  I assume the eBook will be out in the wild in the near future.

    image

    kick it on DotNetKicks.com
    Posted May 02 2008, 10:40 AM by John Papa with no comments
    Filed under:
More Posts