brian peek senior developer aspsoft clint rutkas academic evangelist microsoft corporation dan...

25
Coding4Fun Windows Presentation Foundation Animation, YouTube, iTunes, Twitter, and Nintendo's Wiimote Brian Peek Senior Developer ASPSOFT Clint Rutkas Academic Evangelist Microsoft Corporation Dan Fernandez Evangelism Manager Microsoft Corporation Scott Hanselman Program Manager Microsoft Corporation

Upload: marcelo-bursey

Post on 14-Dec-2015

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

Coding4Fun Windows Presentation Foundation Animation, YouTube, iTunes, Twitter, and Nintendo's Wiimote

Brian PeekSenior DeveloperASPSOFT

Clint RutkasAcademic EvangelistMicrosoft Corporation

Dan FernandezEvangelism ManagerMicrosoft Corporation

Scott HanselmanProgram ManagerMicrosoft Corporation

Page 2: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

Whet your appetite and have fun Lots of content, very little time (45 minutes)

~ 10 minutes per project We will whip through (most) slides

Resources at the end, slides available online All questions will be answered afterwards Sit back, relax, and enjoy

Coding4FunWhat to expect

Page 3: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

WiiEarthVR InnerTube BabySmash TwitterVote Vote for your favorite

Agenda

Page 4: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

Virtual Earth 3D Reflector is your friend As is http://blogs.msdn.com/VirtualEarth3D/

Wiimote WiimoteLib, my .NET Wiimote API Connects to Wiimote and Balance

Board Vuzix VR920 Glasses

Twin 640x480 LCD displays that support stereoscopic 3D

Sensors to determine roll, pitch, yaw in any position

Easy to use SDK P/Invoke to 3 methods for head

tracking, 4 methods for stereoscopic imagery

WiiEarthVR – Components

Page 5: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

VE3D GlobeControl on a WinForm Use center of gravity on Balance Board to

move user through environment Use Nunchuk to change user’s altitude Set VE3D camera’s roll/pitch/yaw to VR920

sensor values Every other frame, move camera left/right

several “units” and pass alternate frames to left/right eye of VR920

The final effect is a fully-immersive flying glider experience through Virtual Earth 3D

WiiEarthVR – Putting It Together

Page 6: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

WiiEarthVR In Action

Brian PeekSenior DeveloperASPSOFT Inc

demo

Page 7: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

iTunes Apple publishes COM SDK Includes VB, C# examples Copy of Music Library in XML

iTunes Playback QuickTime COM control MediaElement control only plays

back WMA, WMV, MP3, MP4 Audio

Programming iTunes

Page 8: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

YouTube’s API URL-Based, XML/REST API Search, Subscriptions, Upload,

Favorites, Comments, Common Feeds

Auth only required for upload FFMPEG

Swiss-army knife of video conversion (59+ formats)

FLV, MP3, MP4, WMA, WMV Resizing, re-sampling of data

ffmpeg.exe –i “foo.wmv” foo.mp4”

Programming YouTube Video

Page 9: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

Pulls a list of videos and images using the YouTube API

Downloads each video Converts each video

to MP4 & WMV Syncs to iTunes and/or Zune Updates master list on UI thread

InnerTube Download, convert, and sync YouTube videos

2 Feeds: (1) Top-Rated videos, (2)Dan’s Favorite

50 x 10 MB = 500MB

2 RSS, 50 images

50-100 conversions

30 seconds per video

Page 10: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

InnerTube In Action

Dan FernandezEvangelism ManagerMicrosoft

demo

Page 11: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation
Page 12: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

BabySmash Client

BabySmashWeb

BabySmashService

Reporting Site w/Charts

BabySmash“Big Ass Table”? DB

JIST: Babies smash, metrics are sent up to the server and the reporting site shows a nice histogram bell curve of what keys are being smashed. Then we take the babies’ money. PayPal FTW!

BabySmashMobile

Page 13: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

BabySmash WPF

BabySmash Silverlight

Reporting Site ASP.NET

MVC

BabySmash

Surface SQL2008

JIST: Babies smash, metrics are sent up to the server and the reporting site shows a nice histogram bell curve of what keys are being smashed. Then we take the babies’ money. PayPal FTW!

BabySmash Windows Mobile

TodayBabySmash

ADO.NET Data Service

Page 14: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

BabySmash In Action

demo

Scott HanselmanProgram ManagerMicrosoft Corporation

Page 15: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

Uses Twitter Replies for votes Currently supports two

different types of polls Comma delimited

poll c#,vb,f#,c++ Number range

poll 1-10

TwitterVote

Page 16: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

Simple page execution TwitterService calls REST twitter

URLsExample:

http://twitter.com/ statuses/user_timeline/ coding4fun.xml

Popfly and Silverlight powers the User Interface

Pipe delimited list sent to a graph

TwitterVote

TwitterService

Default.aspx

Poll

Page 17: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

TwitterVote In Action

Clint RutkasAcademic Developer EvangelistMicrosoft Corporation

demo

Page 18: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

vote now

Page 19: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

Coding4Fun BookPre-order now, shipping November 15th

1. Alien Attack2. LEGO Soldier3. Warcraft RSS Reader4. PeerCast5. InnerTube6. TwitterVote7. Wiimote R/C Car8. Wiimote Whiteboard9. Holiday Lights10. Home Server Mail

Page 20: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

DEVLABShttp://msdn.microsoft.com/devlabs

Page 21: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

Coding4Fun Resourcesblogs.msdn.com/coding4fun/

WiiEarthVRWiimote Library – codeplex.com/wiimotelibProject source: Coming soon

InnerTube iTunes SDK - http://tinyurl.com/6zfyfuYouTube API - http://tinyurl.com/2afz7q Project – codeplex.com/innertube

BabySmash Project: codeplex.com/babysmash

TwitterVoteTwitter API: http://apiwiki.twitter.com Project: codeplex.com/twittervote

Page 22: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

Evals & Recordings

Please fill

out your

evaluation for

this session at:

This session will be available as a recording at:

www.microsoftpdc.com

Page 23: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

Please use the microphones provided

Q&A

Page 24: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation

© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market

conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 25: Brian Peek Senior Developer ASPSOFT  Clint Rutkas Academic Evangelist Microsoft Corporation  Dan Fernandez Evangelism Manager Microsoft Corporation