Chris Bowen's Blog

Development Practices, Tools, Technology, and Community

Posts
  • Chris Bowen's Blog

    List of Game Development Podcasts

    • 0 Comments

    As you might know from my list of podcasts for .NET devs, I’m a big fan of podcasts to help make travel time less… [annoying | mind-numbing | wasteful].

    As my recent work has focused more on game development, I’ve been keeping an eye out for relevant podcasts.  Here are the ones I know of that focus primarily on game development and the gaming industry.

    Game Development Podcasts

    [Last updated – 9/18/2012]

    image58Another Castle
    Charles J. Pratt
    Interviews with game developers, especially with a focus on game development in New York.
    gamedesignadvance.com/?page_id=1616

    Armless OctopusArmless Octopus
    Dave Voyles, Taylor Bliss, Mike Wall
    Focused on the indie game dev community.
    http://www.armlessoctopus.com/category/podcast/

    The Brainy GamerThe Brainy Gamer Podcast
    Michael Abbott
    Interviews with game developers and a focus on the video game community.
    www.brainygamer.com/the_brainy_gamer/podcast/

    Core ElementsCore Elements
    Wes Wilson & Spencer Williams
    Each episode features an interview with a game developer plus gaming industry news.
    http://coreelementspodcast.blogspot.com/

    Experimental Game Dev PodcastExperimental Game Dev Podcast
    About independent (indie) games and development.
    www.indiegamepod.com

    The Game Developer's RadioThe Game Developer’s Radio
    Joseph Burchett & Devin Becker
    Focused on game development and design.
    www.gamedevradio.net

    The Game Engine PodcastThe Game Engine Podcast
    Andrew Bittman, Paul Sztajer, Saul Alexander, and Dan Graf
    Focused on game developers and topics around game development.
    www.gameenginepodcast.com

    Indie Games PodcastIndieGames.com Podcast
    Interviews with indie game developers.
    indiegames.com (and indiegames.buzzsprout.com)

    Irrational InterviewsIrrational Interviews
    Ken Levine & Shawn Elliott
    Irrational’s Ken Levine and Shawn Elliott conduct interviews around the industry.
    irrationalgames.com/insider/irrational-interviews

    LostCastLostCast
    Geoff Blair & Matt Hackett
    A brand new HTML5 game development podcast by Lost Decade Games (creators of the HTML5 “Onslaught!” game).
    www.lostdecadegames.com

    One of SwordsOne of Swords
    Dan Amrich
    Activision’s Dan Amrich hosts industry interviews and provides insights into what’s happening at Activision.
    OneOfSwords.com

    Each of these podcasts has had activity in the past few months.  If you know of any other active ones, please comment below (and thank you!)

    -Chris

  • Chris Bowen's Blog

    Introduction to JavaScript Animation and Windows 8 Games

    • 1 Comments

    Unless you’re aiming for the next great text-only game, chances are something’s going to move in your game. From ships and planets to fireballs and monsters, what are some ways to get them going?

    How Will You Start the Show?JavaScript-based games in Windows 8 can take advantage of many different options.  Here are some of them:

    • Animate DOM elements with JavaScript and CSS
    • Animate DOM elements with new CSS3 features
    • Animate what’s drawn in SVG
    • Animate what’s drawn to a <canvas> element
    • Use the WinJS.UI.Animations library
    • Use one of many animation frameworks

    We’ll take a look at each of these, but first it’s important to know game loop options.

    The Game Loop

    To get things going, you need code that handles input, updates game state, and draws/moves things. 

    You might think to start with a for loop, and move something across the screen.  E.g.:

        for (i = 0; i<10; i++){
            smiley.x += 20;
        }
     

    What happens logically:
    image
     

    What the user actually sees:
    image

    You’ll probably just see the item popping instantaneously to the final location.  Why?  The interim positions will change more quickly than the screen will update.  Not the best animation, is it?

    Later, we’ll get to CSS features and animation frameworks that offer ways to chain animations with logical delays (“move this here, wait a bit, then move it there”), but in the meantime, let’s leave the for loop behind…

    SetInterval & SetTimeout

    Generally, game loops work by calling a function repeatedly, but with a delay between each call.  You can use setTimeout to do something like this:

        function gameLoop() {
            // Update stuff… 
            // Draw stuff…     
          
            setTimeout(gameLoop, 1000/60);  // Target 60 frames per second       
        }

    Just point setTimeout to the function to call and how long (in milliseconds) to wait.  Closely related, setInterval also waits then calls a function, but automatically keeps calling the function until canceled. 

    Using requestAnimationFrame

    But there’s some trouble in setTimeout/setInterval paradise. 

    They work by setting a fixed amount of time between loops, but what if the system isn’t ready to draw an updated frame?  Any drawing code executed is wasted because nobody will see the update.

    There’s now a more efficient way - requestAnimationFrame.  Instead of specifying how long until the next iteration, requestAnimationFrame asks the browser to call back when it’s ready to display the next frame.  For a demonstration, see the requestAnimationFrame example (and the Windows SDK sample):

    image

    Important: to benefit from requestAnimationFrame, you should separate your state-updating code from your visual rendering/drawing code.  Update can continue use setTimeout to run consistently to keep the game going - process input, update state, communicate, etc. - but rendering will run only when necessary via requestAnimationFrame.

    Like setTimeout, requestAnimationFrame needs to be used once per callback.  With a separate render loop, you might have something like this:

        function renderLoop() {       
            requestAnimationFrame(gameLoop);

            // Draw stuff…      
        }

    [Here, I’m using a tip from Martin Wells’ Sprite Animation article that putting requestAnimationFrame before drawing code can improve consistency.]

    Note that if you’re creating a browser-based (vs. Windows Store) game, you’ll want to check for vendor-specific prefixed requestAnimationFrame implementations (e.g. window.msRequestAnimationFrame).

    That’s a basic introduction, but there’s more to game loops that you should look into: loop coordination techniques, integrating event-driven updates, and different ways to compute how much to change in each iteration of the game loop.

    Basic DOM Element Animation

    One way to create HTML games that generally work well across browsers and without plugins, is to use a bunch of DOM elements (<div>, <img>, etc.) and move them around. Through some combination of JavaScript and CSS, you could animate and move things around the browser.

    Let’s take a look at how this applies to a Windows Store game. 

    Start Visual Studio 2012 and under JavaScript Windows Store templates, create a game with the “Blank App” template.  Add any image to the game’s images folder, then and add it via an <img> tag to default.html:

        <body>
            <img id="smile" src="images/Smile.png"
    />
        </body>

    Set some starting CSS in /css/default.css:

        #smile {
            position:absolute;
            background:#ffd800;
            border:4px solid #000;
            border-radius:20px;
        }

    Now we can write some basic animation in /js/default.js.  First add the highlighted to the existing args.setPromise line:

         args.setPromise(WinJS.UI.processAll().then(init()));

    Now, add a variable, init function to start things, and gameLoop to animate things:

    image

    Give it a run, and prepare to be amazed!

    imageimage

    DOM element animation is time-tested and still a perfectly viable option for many situations.  However, more options have emerged since then, so, onward!

    Animation with CSS3

    The latest features in CSS3 (aka “CSS Module Level 3”) offer 2D and 3D ways to change and animate presentation styles defined for DOM elements.  These approaches can be both concise and easy to maintain.

    CSS3 Transitions

    Transforms (both 2D and now in CSS3, 3D) can change appearance of an item – Transforms to rotate, scale, move (called “translate”), and skew (think stretch or italics and you won’t be far off), but they simply change from one state to another.

    Transitions can help you animate the presentation changes from state A to B, simply using CSS.  See the Hands On: transitions sample:

    image

    Our above DOM element example could be modified to apply a style with a transition over 4 seconds.  Something like this:

        left: 500px;
        top: 500px;
        transition:4s linear;

    CSS3 Animations

    Transitions are very useful, but support only a single timing function.  Animations introduce keyframes, which allow multiple timing functions to control animations.  Also, Animations are explicitly called (vs. Transitions, which trigger implicitly.) 

    See the Hands On: animations sample:

    image

    See Also:

    Animation with SVG

    SVG (Scalable Vector Graphics) support using markup and/or code to define shapes that retain clarity/definition as they are scaled.  SVG can even utilize styles defined in CSS, making them even more flexible.

    Because the individual components of an SVG composition are themselves DOM elements, this is technically a special case of the DOM elements approach, so many of the same techniques apply. 

    Some examples (don’t forget, View Source is your friend): SVG-oids, SVG Dice, and SVG Helicopter.

    imageimageimage

    SVG is a powerful option, but when should you use it, and how does it compare with using canvas? See How To Choose Between SVG and Canvas.

    See also:

    Animation on a Canvas

    Support for <canvas> across many browsers has made it a great option games.  Though you can add a canvas via HTML (or dynamically with JavaScript), canvas is driven entirely by JavaScript, so creating animations is a matter of knowing what you’re drawing and where, and modifying over time with JavaScript.

    New to canvas?  Try the ”drawing to a canvas” Quickstart.

    Let’s use canvas in a new example.  Create a new Blank App project and add a <canvas> element to default.html:

        <body>
            <canvas id="gameCanvas" height="800" width="800"></canvas>
        </body>

    Because JavaScript is the only way to “talk” to the canvas, we’ll focus on /js/default.js for the rest.  Add a pointer to init() like above, then the function:

    image

    Because canvas uses immediate mode graphics, it’s not as simple as creating an object and moving by setting location properties (like you can with DOM and SVG animation.)  So, canvas-based games will typically create JavaScript classes for things to be tracked and displayed, then update logic simply sets properties (x, y, etc.) on those instances, which the render loop dutifully draws to the canvas. 

    Here’s what you should see when you run the “game”:

    imageimage

    Of course, there’s a lot more to canvas and canvas animation than that.  Canvas can work with images, video, animations, gradients and much more.  For details, see the Quickstart and ”How to animate canvas graphics", and for demos see Canvas Pad and Canvas Pinball:

    imageimage

      

    Also, there are a number of libraries available to make working with canvas easier, for example EaselJS, which we’ll get to a little later.

    Animating Windows Store Games with WinJS

    The Windows Library for JavaScript (WinJS) contains helpful namespaces and classes to create animations in an efficient and reliable way.

    For example, you can use WinJS.UI.executeTransition to activate one or more CSS transitions.  Our earlier DOM element example could become:

    image

    Even more useful, there’s a full library of animations available in WinJS.UI.Animation, including animations for:

    • Adding/Removing content
    • Transitioning & navigating
    • Dragging & dropping
    • Selecting content
    • et al.

    These are most frequently helpful with Windows Store apps, but games can benefit as well.  To see some in action, try the HTML animation library sample from the Windows SDK:

    image

    See Animating your UI to learn more.

    Using Animation Frameworks

    Just as we saw with JavaScript physics engines in an earlier post, there are many frameworks out there that can make many of common scenarios easier.  Anything that can save time and effort is worth some research. 

    There are many out there, but here are a couple to get you thinking.

    jQuery & jQuery.animate()

    imagejQuery is an JavaScript library that helps make common tasks easier (and reliably cross-browser). 

    Among the many things you’ll find in jQuery, the jQuery .animate() method has many features that can apply to game animation.

    With jQuery.animate, our “smile” example could be written as:

    $('#smile').animate({
        left: '+=500',
        top: '+=500',
        }, 4000);

    A jQuery selector is used to find the smile element, then the animate method will adjust the left and top CSS properties, increasing each by 500 pixels over 4 seconds.

    For some interesting examples/tutorials, see "13 Excellent jQuery Animation Techniques" on WDL.

    CreateJS: Animation with EaselJS & TweenJS

    imageCreateJS is a family of JavaScript libraries and tools to help make things from canvas, sound, loading, to animations easier.

    I introduced using CreateJS for Windows Store Games in an earlier post.  If you’re new to CreateJS, have a look.  As the post details, EaselJS can make using canvas for games much easier.  It also supports features like SpriteSheet, which uses multiple pictures of the same object to create animations, such as a character running:

    imageimage

    However, another CreateJS library, TweenJS, is especially relevant to any discussion of animations. 

    You can use TweenJS to animate objects’ values and CSS properties.  It also offers a chained syntax, where you can specify animations as steps with delays and other connections to relate them.

    imageimage

    Like CSS Transitions and Animations, TweenJS also supports easing functions to control the rate of change of each animation.

    Game Engines

    Not only are there more animation frameworks out there, but there are game-related frameworks as well.  I’ll probably dedicate a post to this later, but some examples are Crafty, melonJS, Akihabara and more.

    A great directory of what’s out there is the Game Engines list on GitHub.

    Also see Bob Familiar’s “Windows 8 Game Development for the Win” list of various game tools and frameworks (free and commercial) that can lead to Windows Store games.

    Let’s Get Moving!

    Ready to dive in?  Here are a few more references to get you started.

    Enjoy, and good luck!

    -Chris

  • Chris Bowen's Blog

    Windows 8 Developer Events – Updated

    • 0 Comments

    WindowsThere’s certainly a lot of interest in Windows 8 and the developer opportunity around it, so here’s an update and summary of various events that can help you learn more.

    Windows Developer Camps

    imageThe series of Windows 8 Developer Camps on the east coast that I mentioned in an earlier post are now underway and very popular (those that aren’t full yet are very nearly so). 

    Here are the events we’re running in in the east:

    March 27, 2012 Reston, VA Done
    March 29, 2012 Chevy Chase, MD Done
    April 11, 2012 Orlando, FL Today!
    April 17, 2012 Tampa, FL Details & Registration
    April 19, 2012 Ft. Lauderdale, FL Details & Registration
    May 1, 2012 Charlotte, NC Details & Registration
    May 22, 2012 Waltham, MA Details & Registration
    May 23, 2012 Atlanta, GA Details & Registration
    May 23, 2012 Farmington, CT Details & Registration
    May 24, 2012 Malvern, PA Details & Registration

    The great news is this list is only a small part of the large number of events being run around the world, so head over to the Microsoft DevCamps site to see them all.

    Windows Developer Event – NYC, April 19

    Along with those Developer Camps, there is also a special Windows Developer Event coming to New York City next week (and filling up quickly as well): 

    image

    Windows reimagined.

    Learn everything you need to start building Metro-style apps for Windows today at our free, full-day Windows Developer Event.

    We'll show you how to use Visual Studio to code fast, fluid, immersive and beautiful Metro-style applications in HTML5/JavaScript, XAML/C# and C/C++. Your investments in these languages carry forward, making Windows a no-compromise platform for developers.

    Whatever language you choose, your app gets deep integration with the Windows shell, including notifications, live tiles, deep links, and contracts with other apps. And now you can build once and support all Windows customers, no matter what type of PC they have—from tablets to laptops to convertibles to desktops.

    Seating is limited and registration is not guaranteed. Secure your spot today!

    Registration

    The event runs from 9 AM to 5 PM on April 19th at Center 548 in New York City. 

    More Windows 8 in the Northeast

    For those of you in the northeastern U.S., here are some other (free) ways to hear about Windows 8:  (Yes, I’ll be on the road a bit...)

    I hope you’re able to join in one of these events!  To get ready, you can download the Windows 8 Consumer Preview and developer tools.

    -Chris

  • Chris Bowen's Blog

    Windows 8 Developer Camps and Hackathons – July through September

    • 4 Comments

    I’m happy to pass along word that a new series of Windows 8 developer events are coming soon!  These are special two-day events, with a DevCamp on day one featuring a full day of sessions plus an InstallFest, followed on day two by a Hackathon with Lightning Talks where you can bring app ideas to life with Microsoft and community experts on hand to help. 

    image

    Windows 8 changes everything.
    Combining the broad reach of Windows, best-in-class developer tools, a re‑imagined user experience, support for new chipsets, and a built-in store with industry-leading business terms, Windows 8 is the largest developer opportunity – ever.

    Join us for free events with new sessions and hands-on opportunities designed to help you start building Metro-style applications for Windows 8 – today. We'll show you how to use Visual Studio to code fast, fluid, immersive, and beautiful Metro-style applications in HTML5/JavaScript, XAML/C# and C/C++. Your existing investments in these languages carry forward, making Windows a no-compromise platform for developers. Attend just one day or join us for two full days of learning. It's your choice.

    DevCamp - Day 1
    clip_image001
    Events run from 9:00AM – 8:00PM

    Our DevCamp covers Windows 8 Release Preview from top to bottom, featuring sessions that run from introductory to intermediate as the day unfolds. These sessions will be followed by an InstallFest to prepare your system for hands-on app development.

    Hackathon - Day 2
    clip_image001
    Events run from 9:00AM – 9:00PM

    Our Hackathon is an open Windows 8 code fest, where you'll put what you've learned into practice. Code to your heart's content, with Windows 8 experts available to guide you through every step of the process. It's the perfect opportunity to get your dream application underway, or to finish that app you've already started.

    This full-day event will be filled with coding, sharing, plenty of food, and the occasional Lightning Talk on topics determined by your apps and questions. Bring your own laptop installed with Windows 8 Release Preview, your apps and your cool ideas and get ready to create!

     

    imageCities and Dates      
    clip_image001
    Separate registration for DevCamps and Hackathons is required

    The choice is yours to join us for either or both days, but please register for each separately.

    Seating is limited, so click the date links below (or call 1-877-MSEVENT) to reserve your seat today!

    Location DevCamp Hackathon
    Manhattan, NY 14-Jul 15-Jul
    St Louis, MO 16-Jul 17-Jul
    Brooklyn, NY 19-Jul 20-Jul
    Nashville, TN 19-Jul 20-Jul
    Los Angeles, CA 20-Jul 21-Jul
    Rochester, NY 27-Jul 28-Jul
    Mountain View, CA 27-Jul 28-Jul
    Atlanta, GA 3-Aug 4-Aug
    Ft. Lauderdale, FL 3-Aug 4-Aug
    Redmond, WA 3-Aug 4-Aug
    Dallas, TX 7-Aug 8-Aug
    Chevy Chase, MD 10-Aug 11-Aug
    Denver, CO 10-Aug 11-Aug
    Irvine, CA 17-Aug 18-Aug
    Boston, MA 17-Aug 18-Aug
    Raleigh, NC 17-Aug 18-Aug
    Reston, VA 17-Aug 18-Aug
    Orlando, FL 17-Aug 18-Aug
    Minneapolis, MN 23-Aug 24-Aug
    Houston, TX 24-Aug 25-Aug
    San Francisco, CA 24-Aug 25-Aug
    Downers Grove, IL 28-Aug 29-Aug
    Phoenix, AZ 7-Sep 8-Sep
    Malvern, PA 14-Sep 15-Sep

    Register today and join us for these fantastic (and free) developer opportunities.

  • Chris Bowen's Blog

    XBox 360 News

    • 5 Comments
    Plenty of news has been coming out recently about the XBox 360.  Here's a brief summary:
      Which Console for You?
    • The XBox 360 Elite has been officially announced:
      • "Xbox 360 Elite is the newest addition to the Xbox family that includes a huge 120GB hard drive (the largest available for any gaming console), a high-definition multimedia interface (HDMI) cable, and a premium black finish. The Xbox 360 Elite also includes a black wireless controller and black Xbox Live® headset."
    • Halo 3 News:
      • The Halo 3 Beta period has been announced as May 16th - June 6th.
      • A few weeks old, but Halo 3 packaging was unveiled as well - Standard, Limited, and Legendary.  Paul Thurrott has some good pictures.
    • Major Nelson (IRL Larry Hryb) posted word of:
      • The next dashboard update (with Windows Live chat integration) and...
      • A QWERTY keyboard input device coming this summer.  The best part is that it will plug directly into the bottom of existing XBox 360 controllers.
      • [Full details of both]

    Personally, I'm counting down to my coming birthday when I hope (nudge, nudge) that somebody drops a copy of Guitar Hero II into my greedy mitts...

    -Chris

  • Chris Bowen's Blog

    Publishers Offering Support for User Groups

    • 3 Comments

    High pile of hardcover books Run a user group?  With funding and sponsors a constant challenge, you’re probably always on the lookout for things to give away at meetings.

    Fortunately, many publishers have great relationships with the user group community and have established programs through which you can receive promotional copies of books and other items to use as giveaways or for book review programs.

    Here’s a list to get you started:

    (Know of any others?  Please comment below or contact me.  Thanks!)

    It’s a symbiotic relationship - you get stuff to help the group, and they get visibility in your community.  Be certain to take advantage of the opportunity.

    -Chris

  • Chris Bowen's Blog

    Introductory F# Resources

    • 3 Comments

    F# I recently gave an “Introduction to F#” session for the Cape Cod .NET User group and, with Talbott Crowell for the Boston MSDN Developer Conference.

    (And for those of you in Maine, I’ll be delivering the session on February 19th with the Maine Bytes User Group in Portland.)

    Here are some resources from the session along with others I hope you’ll find useful as you explore functional programming and F#.

    Slides and Samples

    Resources

    Videos

    Books

    • “Expert F#”
    • “Foundations of F#"
    • “F# for Scientists”
    • “Real-World Functional Programming: With Examples in F# and C#” – Not yet released
    • “F# in a Nutshell” – Not yet released

    Products

    And, for the curious, a few commercial products written in F#:

    I hope you enjoy delving into F#!

    -Chris

  • Chris Bowen's Blog

    Windows 8 Developer Camps – Coming Soon!

    • 4 Comments

    WindowsReady to dive in and learn more about Windows 8 and the developer opportunity it represents?  Then get ready for the upcoming series of Windows Developer Camps!  These are free, full-day, developer-focused events featuring a combination of sessions and hands-on labs, and we’ll have 10 of them right here in the east:

    Windows 8 changes everything.

    Combining the broad reach of Windows, best-in-class developer tools, a reimagined user experience, support for new chipsets, and a built-in Store with industry-leading business terms — Windows 8 is the largest developer opportunity, ever.

    Join us for this free, full-day event designed to share all the knowledge you need to start building Metro-style applications for Windows 8 – today. We’ll begin by showing you how to use Visual Studio to code fast, fluid, immersive and beautiful Metro-style applications in HTML5/JavaScript, XAML/C# and C/C++. Your existing investments in these languages carry forward, making Windows a no-compromise platform for developers.

    Whatever language you choose, your app gets deep integration with the Windows shell, including notifications, live tiles, deep links, and contracts with other apps. And now you can build once and support all Windows customers, no matter what type of PC they have – from tablets to laptops to convertibles to desktops.

    We’ll cap the day off with an open, hands-on lab session. It’s the perfect opportunity to get your dream application underway, or finish that app you’ve already started – with Windows 8 experts available to guide you through every step. Bring your laptop to join in the fun and show off your killer app.

    Get started now!

    The Schedule

    Join us in one of these cities:

    Windows Developer Camps

    Date City More
    March 27, 2012 Reston, VA Details & Registration
    March 29, 2012 Chevy Chase, MD Details & Registration
    April 11, 2012 Orlando, FL Details & Registration
    April 17, 2012 Tampa, FL Details & Registration
    April 19, 2012 Ft. Lauderdale, FL Details & Registration
    May 1, 2012 Charlotte, NC Details & Registration
    May 22, 2012 Waltham, MA Details & Registration
    May 23, 2012 Atlanta, GA Details & Registration
    May 23, 2012 Farmington, CT Details & Registration
    May 24, 2012 Malvern, PA Details & Registration

    Register today and start thinking about the possibilities and what you’ll create!

    -Chris

  • Chris Bowen's Blog

    SqlConnectionStringBuilder

    • 1 Comments

    [Perhaps old news for some, but I've found there's enough people I've bumped into who haven't heard of this to make it worth mentioning.]

    In ADO.NET 2.0, there is a new class, SqlConnectionStringBuilder that can both create a connection string from strongly-typed properties or parse properties from an existing connection string.  It inherits from the base DBConnectionStringBuilder and there are other classes for different systems as well (e.g. ODBC and Oracle.)

    Here's a simple console-based sample:

    using System.Data.SqlClient;

    ...

      static void Main(string[] args)

      {

        //Compose and use a connection string

        SqlConnectionStringBuilder csb = new SqlConnectionStringBuilder();

        csb.DataSource = @"LOCALHOST\SQLEXPRESS";

        csb.InitialCatalog = "SomeDatabase";

        csb.IntegratedSecurity = true;

        Console.WriteLine("Generated Connection String = " + csb.ConnectionString);

        using (SqlConnection cn = new SqlConnection(csb.ConnectionString))

        {

            cn.Open();

            Console.WriteLine("Connection is " + cn.State);

        }

     

        //Parse an existing connection string

        const string CONNECTION = "Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;Packet Size=4096;";

        SqlConnectionStringBuilder csb2 = new SqlConnectionStringBuilder(CONNECTION);

        Console.WriteLine("Server = " + csb2.DataSource);

        Console.WriteLine("Database = " + csb2.InitialCatalog);

        Console.WriteLine("User = " + csb2.UserID);

        Console.WriteLine("Password = " + csb2.Password);

        Console.WriteLine("Packet Size = " + csb2.PacketSize);

        Console.ReadLine();

      }

    Also note that if you need assistance with connection string formats, ConnectionStrings.com is a good reference site with plenty of examples.

    -Chris

  • Chris Bowen's Blog

    Directory of Audio Podcasts for .NET Developers

    • 2 Comments

    On the Joys of Travel

    At least you can be learning something...If you’re anything like me, you might enjoy driving (or flying, riding the train, etc.), but hate that it’s generally “lost” time. 

    For years now, I’ve made a habit of taking whatever MP3 player I’ve had (currently my trusty Zune HD) whenever I hit the highway, listening to podcasts so I feel at least partially productive. 

    And so here’s a listing of audio podcasts (I may add a post for video podcasts later) that you may find useful as a .NET developer. I’ve focused on podcasts that have recent activity, but if you have others that should be added to this index, please let me know.

    The Audio Podcast List   [Updated 7/13/2012]

     

    .NET Rocks!Carl Franklin, Richard Campbell 
    http://dotnetrocks.com

    Bytes by MSDN (also in video format) – Various Hosts
    http://msdn.microsoft.com/en-us/bytes.aspx

    CodeCast Ken Levy, Markus Egger
    http://www.code-magazine.com/codecast

    Coding QA Podcast – Federico Silva Armas, Matthew Osborn 
    http://codingqa.com

    Community Megaphone Podcast Dane Morgridge, G. Andrew Duthie 
    http://www.communitymegaphonepodcast.com

    The Connected ShowDmitry Lyalin, Peter Laudati 
    http://www.connectedshow.com

    Deep Fried Bytes Keith Elder, Chris Woodruff
    http://deepfriedbytes.com

    Developer Smackdown Clark Sell, Mark Nichols
    http://DeveloperSmackdown.com

    Hanselminutes Scott Hanselman
    http://www.hanselminutes.com

    Herding CodeK. Scott Allen, Kevin Dente, Scott Koon, Jon Galloway
    http://herdingcode.com

    Microsoft DevRadio Various Hosts
    http://channel9.msdn.com/Blogs/DevRadio

    Misfit Geek Podcast Joe Stagner
    http://misfitgeek.com/podcast

    NextGen User Group Podcast Richard Costall
    http://www.nxtgenug.net/podcasts.aspx

    The Official jQuery Podcast Ralph Whitbeck & Elijah Manor
    http://twitter.com/jQueryPodcast

    Pluralcast David Starr
    http://www.pluralsight.com/community/blogs/pluralcast

    Polymorphic Podcast Craig Shoemaker
    http://www.polymorphicpodcast.com

    Radio TFS – Paul Hacker, Mickey Gousset 
    http://www.radiotfs.com

    Software Engineering RadioBernd Kolb, Martin Lippert, Markus Volter, Michael Kircher, Robert Blumen
    http://www.se-radio.net

    Spaghetti Code Podcast Jeff Brand
    http://feeds2.feedburner.com/SpaghettiCodePodcasts

    Sparkling Client Silverlight Podcast Erik Mork, Monica Mork 
    http://www.sparklingclient.com

    The Thirsty Developer Dave Bost, Clark Sell 
    http://www.thirstydeveloper.com

    The Web Ahead – Jen Simmons
    http://5by5.tv/webahead

    Windows Phone Radio – Windows Phone Team
    http://windowsteamblog.com/windows_phone/b/windowsphone/

    Windows Weekly (also in video format) – Paul Thurrott
    http://www.twit.tv/ww

    Yet Another Podcast Jesse Liberty
    http://feeds.feedburner.com/JesseLibertyYapcast

    Any Others?

    Again, if you know of other related podcasts out there, contact me or sound off in the comments!

    -Chris

  • Chris Bowen's Blog

    Using CreateJS in your JavaScript-Based Windows 8 Game

    • 2 Comments

    So, you’re making a Windows Store game using JavaScript and HTML5?  Excellent!

    The good news is many others have created games with web-based technologies and, with many common features that games need, some great libraries have emerged to make things easier.

    imageCreateJS is a set of JavaScript libraries and tools for games and other kinds of apps:

    • EaselJS – The HTML5 canvas element is a great way to create games, but displaying, managing, and moving things can be tricky.  EaselJS makes this (and more) easier.
    • TweenJSTweening is about showing transitions from one state/value to another.  TweenJS offers ways to change, animate, and ease transitions of values and properties.  Move something across the screen, make something pulse when clicked, cycle through colors, whatever you’d like.
    • SoundJS – You want to play sounds.  Sounds aren’t always easy in JavaScript.  This helps change that.
    • PreloadJS – Helps manage the loading of sounds, images, data, etc. to help with efficiency and consistency.
    • Zoë – A tool that exports SWF animations to sprite sheets used with EaselJS

     

    imageimageI’ve used CreateJS in my “Catapult Wars” WinJS tutorial series and, certainly far more impressively, the Atari arcade game experience was developed using CreateJS as well (and there are many other examples.)

    We’ll focus on EaselJS for now, but more on the other parts of CreateJS at the end of the article.

    Getting Started

    First, you’ll need a Windows Store game into which you’ll plug CreateJS.  In Visual Studio 2012, create a new project and choose JavaScript –> Windows Store –> Blank App:

    image

    If this is your first look at JavaScript Windows Store apps, read Getting started with Windows Store apps and Part 1: Create a "Hello, world" app for a good background.  Also, read “JavaScript templates for Windows Store apps” to learn about the moving parts in the “Blank App” template.

    The key places to put your own content are default.html, /js/default.js, and /css/default.css.

    Go ahead and run it (just press F5).  Now, aren’t you glad you did?  We’ll make things less boring more game-like soon.

    Plugging in CreateJS

    imageLet’s get started.  We’ll focus on EaselJS here, but every part of CreateJS can be added the same way.

    1. Download EaselJS.  Grab as a ZIP, or clone with Github for Windows.
    2. Save/extract to a reusable place (like “C:\Code\CreateJS\EaselJS”).
    3. Find the “lib” folder and easeljs-<version>.min.js.  This has everything you’ll need, compacted and ready to go.  Keep this ready for step 5.
    4. Back in Visual Studio, in Solution Explorer, find the “js” folder.  Right-click and add a new folder named “createjs”.
    5. Drag and drop easeljs-<version>.min.js file from step 3 into that new “createjs” folder:

     

    image

    EaselJS is ready to use, but our game still doesn’t “know” about it.  Open default.html and simply drag the EaselJS file you added right into the source.  Visual Studio will wire up the reference for you:

    image

    Okay, let’s play!

    How EaselJS Works

    EaselJS focuses on making it easier to work with the HTML5 canvas element.  A few of the key classes:

    • Stage – The Stage is essentially your ambassador to the canvas, coordinating everything to be drawn and redrawing based on the “tick” (a kind of heartbeat), that’s very much aligned with game loop concepts.
    • Ticker – Keeper of the “tick”, this class lets you manage and get details about the timing of the game.
    • DisplayObject – Base class for things you’ll display and move:  Bitmap, Text, Shape, et al.
    • SpriteSheet – A set/series of images that are viewed one at a time to create an animation effect.  See the SpriteSheet demo for an example.
    • Filter – You don’t use Filter directly, but its subclasses (ColorFilter, ColorMatrixFilter, BoxBlurFilter, AlphaMapFilter, AlphaMaskFilter) are great for applying effects.  See the Filters demo to see them in action. 

    There’s more of course (see the online EaselJS docs, and examples like the API Demo for more), but these will get things started.  Speaking of which…

    Getting Started

    First, we’ll need a canvas to draw on, so in default.html, replace the default <p> element with a new <canvas>:

    <body>
        <canvas id="gameCanvas" width="800" height="600"></canvas>
    </body>

    (For simplicity, the canvas is fixed size, but a real game would use JavaScript to scale it automatically based on screen size.)

    Now, some JavaScript to get things started.  We’ll add an init() function and have it called when everything is ready.  In default.js, find the app.onactivated handler.  Change this line:

    args.setPromise(WinJS.UI.processAll());

    to this:

    args.setPromise(WinJS.UI.processAll().then(init));

    Then, just add the init() function after.  Something like this:

    image

    Setting the Stage

    Init needs to:

    • Create a Stage and point to our canvas
    • Create some Shapes to draw – You could also add anything else derived from DisplayObjectBitmap, Text, etc.
    • Add the Shapes to the Stage – The Stage will then be able to manage them as “children”
    • Update the Stage – This refreshes the canvas, putting things into action

    Let’s add that to init(), along with a few variables:

    image

    [Note that with recent versions of EaselJS, classes are namespaced so you’ll need “createjs.” before any uses.  Keep this in mind if you’re looking at older examples.]

    Run the game and you’ll have something like this:

    image

    Yes, it’s your game equivalent of “Hello, world”, but at least there’s something game-like on the screen!

    Getting the Ball Rolling

    We won’t create the full game here, but here’s a taste of how to add a game loop with some basic motion.

    Add the following to the end of init() and a new gameLoop() function:

    image

    We’re asking the Ticker class to start the game’s heartbeat.  30 frames per second, it will call the gameLoop() function, where you would place code to read input, move things about, check for collisions, end the game, etc.  [Note you need the stage.update() call to have EaselJS refresh the canvas based on what you’ve changed.]

    image

    For now, the ball simply moves slowly, sadly fated to move in one direction… forever.  Now’s your chance to step in to move the paddles, bounce the ball, score points, etc.

    For deeper use of EaselJS, including input, collisions, and scoring, see my Catapult Wars tutorial series.  There are also some helpful demos on the CreateJS site, and more as part of the EaselJS download.

    Other CreateJS Family Members

    Congratulations!  You’re ready to put EaselJS to good use in your game, saving you time and trouble.  The other libraries in the CreateJS family can save you time as well, so a quick introduction is in order.

    imageSoundJS

    Sound can be very tricky in JavaScript-based games, and SoundJS handles detecting playback capabilities, and give you ways to play, pause, loop, and overlap sounds that would take a bunch of manual code to get working consistently.

    You can get an idea of the supported features in this test suite:

    image

    imageTweenJS

    Tweening is about adjusting values from a start to an end.  It could be animating the position of a ball, the size or rotation of a paddle, or even other attributes like something’s color.  TweenJS supports tweening, including chained calls and delays.  Here’s an example:

    image

    TweenJS also offers a set of easing functions.  Easing is a function that controls the rate of change. 

    For example, you could simply move from A to B at constant rate, but for a more polished effect, you could start motion from A slowly, move quickly across the screen, then slow down to settle into position B.  (This is called ease in/out.)  Here’s an example that shows various easing functions:

    image

    imagePreloadJS

    PreloadJS can be useful to load and instantiate your graphics, sounds, and other assets so they’re ready to go in your game.

    You can load individual files, or specify a manifest of multiple assets to load and indicate how you’d like to process them.

    I hope you find this guide and these libraries useful.  Good luck with your Windows Store game!

    -Chris

  • Chris Bowen's Blog

    Office 2007 Document Inspector

    • 4 Comments

    I have a new favorite feature in Office 2007.  I often need to send documents to contacts, but I want to ensure there's no extra information tagging along for the ride (revision history, document properties, speaker notes in PowerPoint, etc.) 

    You used to have to resort to macros or manual removal, but in Office 2007, there's a built-in tool called the Office System Document Inspector that will cleanse Word, Excel and PowerPoint documents of comments, annotations, history, etc.

    To launch the Inspector, click the "big office button" in Word, Excel, or PowerPoint, choose "Prepare", then Inspect Document:

    LaunchingDocumentInspector 

    The Document Inspector will then display, with options that vary based on the type of document you've opened.  For example, in PowerPoint you'll see:

    PowerPointInspector

    Choose which information you'd like to find and remove, then click Inspect.  The Office Developer Center has more information on this tool.

    Hope you find this useful!

    -Chris

    Technorati tags: ,
  • Chris Bowen's Blog

    HTML5 Game Camp Series Coming Soon

    • 7 Comments

    Update:  Slides and links from the events are now available.

    HTML5 Logo by the World Wide Web Consortium (http://w3.org)Ready to learn HTML5?  Enjoy games, too? 

    Join in the HTML5 Game Camps, free events offering a chance to learn about the next wave of web standards including HTML5, CSS3, Canvas, SVG, and more.  And while you gain practical knowledge about HTML5 and JavaScript techniques, it’s all joined together by the fun of creating games!

    Web CampsThese are part of the Microsoft Web Camps series and feature a half day of sessions followed by hands-on game creation time.  Get up to speed with HTML5 and game dev concepts in the sessions, then turn your ideas into reality as we leave the slides behind.  Design and develop creations of your own, with plenty of guidance and help for your questions.

    The Schedule

    Here’s where the HTML5 Game Camps are heading, with links to details and registration:

    • Atlanta, GA – November 10 – Georgia Tech – Registration
    • Cambridge, MA – November 17 – Microsoft NERD – Registration
    • New York, NY – December 9 – Columbia University – Registration
    • University Park, PA – December 14 – Penn State – Registration

    (Note some of these events are morning through afternoon, and others are afternoon to evening.)

    Don’t forget to read the prep steps at the bottom of the event pages.  To get ready for coding, consider installing WebMatrix (it’s free) and other tools via the Web Platform Installer.  Also, consider attending with a friend and tackling the game creation as a team!

    Bonus Points for Rochester, NY

    For those of you in the Rochester, NY area, there’s a special RIT Game Camp the weekend of December 2nd-4th.  It’s all about game development, and features multiple ways to learn about and create games:

    • RIT Game JamHTML5 Camp (Saturday, 12/3)
    • Game Jam (all weekend)
    • XNA in a Day (Saturday)
    • Windows Phone Camp (Saturday)

    It’s free, hosted on the campus of RIT, and open to everyone.  So, choose what you’d like to participate in, and enjoy!

    -Chris

  • Chris Bowen's Blog

    New England Code Camp 14 – The Schedule!

    • 2 Comments

    code camp 14 v 002 (5)This Saturday, October 2nd, will be New England Code Camp 14 (what is Code Camp?), a free day filled with with (48!) sessions given by and for the area developer community.

           New England Code Camp 14  
           Saturday, October 2nd   
           8:30 AM to 6:40 PM (Doors at 8:00)
           Microsoft 
           201 Jones Road (6th Floor), Waltham, MA

    Register at http://TheDevCommunity.org

    It’s a Saturday very well spent!

    Thanks to the Contributors

    First, we’d like to thank the contributing companies who have really stepped up to make this event possible:

     

    Thanks to these companies for their support of our developer community!

    The Schedule

    CC14 will feature an amazing 48 sessions by 32 speakers in 6 rooms, all for free!  The session grid is below, and session descriptions are online.  We’ll have printouts of the grid and descriptions waiting for you at registration.

     image
    (Click to expand)

    Note, this schedule will change (late-breaking changes are a regular Camp occurrence) but hopefully not terribly much.

    Special Features

    Entrepreneurial Track

    New with this Code Camp is the Entrepreneurial Track (or the “E Track”).  Organized by Patrick Hynds, the E Track (highlighted in blue in the schedule), is an opportunity to learn about the business side of technology, including a chance to hear from four area startups as they share their experiences. The E Track will run from 1 – 6:40 in MPR C.

    Speed Networking Seminar

    Returning from Code Camp 13, Kim Coffin and colleagues will be running a speed networking seminar from 12 to 12:30 in MPR C.  Drop by during lunch to make new connections with fellow attendees!

    Social Media

    Finally, if you’re a fan of social media tools, we’ll be tagging everything for Code Camp 14 as #NECC14.

    See you at Camp!

    -Chris

  • Chris Bowen's Blog

    JavaScript Physics Engines and Windows 8 Games

    • 1 Comments

    Driven by opportunity and visions of success in the Windows Store, you set to work, turning your gaming idea into code.

    “It Was My Understanding There’d Be No Math”

    Maybe you wanted to move something across the screen.  Maybe check if it hit a target.  Oh, and there’s wind, and friction, and maybe things should bounce when they collide…

    Forgotten Math...The specter of forgotten math begins to loom.

    Thankfully, there are physics engines.  Simply put, they take care of some of the math and work involved in games and simulations.  Of course they don’t eliminate math and complexity, but they can make many scenarios easier:

    • Physics-related math – Matrices, vectors, velocity, rotation, momentum, etc.
    • Rigid body dynamics – Sounds unfriendly, but focuses on the motion and interactions of things whose shapes don’t change (save when deformed by say a collision or damage.)  This also includes joints to connect multiple objects together to create more complex objects like a ragdoll of a person, a truck with parts/wheels/cargo, etc.
    • Soft body dynamics – Less frequently-used, this is simulation of objects whose shape can change.  Cloth is a pretty common example of this.
    • Collision detection – Need to know when something hits or overlaps another?  There are may ways to do this, from relatively simple bounding shapes, to often more accurate (and more complex) per-pixel approaches, and on to the vast world of 3D.

    Why write such things yourself when others have taken the time to create great libraries?

    That said, you may not need a physics engine at all.  For the simplest games, it’s pretty easy to roll your own logic for basic bounding-box collision checking and basic motion.  However, games become complex quickly, so even if you don’t imagine you’ll need one, the up-front investment in learning & using physics engines can pay off sooner than you’d think.

    JavaScript Physics Engines

    Here’s a list of some key JavaScript-based physics engines that you might consider in your Windows Store game or simulation.   

    imagebox2dweb

    Home - http://code.google.com/p/box2dweb/
    Download - http://code.google.com/p/box2dweb/downloads/list

    A JavaScript port of Box2DFlash (aka Box2DFlashAS3), itself a port of the Box2D engine, box2dweb offers a single-file implementation, which makes it easy to add to your app.

    The box2dweb site has an interactive demo and directs you to Box2DFlash for documentation (since it’s a direct port).  According to the box2dweb download site, it was last updated in June, 2011

    imageBox2DJS

    Home - http://box2d-js.sourceforge.net/
    Download - http://sourceforge.net/projects/box2d-js/

    Like box2dweb, Box2DJS is also port of Box2DFlash/Box2DFlashAS3. It’s somewhat older (at least at time of writing) and does require more files to be added to your project than box2dweb.

    The Box2DJS home page has instructions, sample code, and demos.  Here are a few of them:

    imageimageimage

    According to the Box2DJS download page, the last update was in April, 2010.

    imagePixel Lab Box2d-JS

    Home - http://box2d.thinkpixellab.com/
    Download - https://github.com/thinkpixellab/box2d

    This version of Box2d by Pixel Lab is a clone of Box2DJS, updated to have better compression and to resolve bugs in the original version.

    The Pixel Lab Box2d-JS site has some live demos, mirroring the ones featured on the Box2DJS site.  Interestingly, this engine was used in the Agent 8 Ball game:

    image

    According to the download page on Github, the compiled version was last updated in April, 2012.

    imageAmmo.js

    Home - https://github.com/kripken/ammo.js
    Download - https://github.com/kripken/ammo.js

    Ammo.js is a 3D physics engine, and an automated port of the Bullet Physics Library (written in C++).  Like box2dweb, it is built into a single file (“ammo.js”), making it simple to import.

    The lastest version of Ammo.js (built as “/builds/ammo.js”) was updated in September, 2012.  Again, with this post being primarily an index, see the last section for links to more detailed analysis of Ammo.js.

    imageJigLibJS2

    Home - http://brokstuk.com/jiglibjs2/
    Download - https://github.com/bartdeboer/JigLibJS2

    JigLibJS2 is an automated port of the JigLibFlash physics engine.  It’s a 3D physics engine, and on the JibLibJS2 home (and in the download source) there’s an interesting canvas demo (using three.js for 3D rendering) with multiple objects, including a car you can drive:

    image

    The download page on Github shows the latest updates in September, 2012

    imageCannon.js

    Home - http://schteppe.github.com/cannon.js/
    Download - https://github.com/schteppe/cannon.js

    Cannon.js is a 3D physics engine, based on… well, nothing.  Unlike many physics engines, cannon.js is “100% open source JavaScript, written from scratch”.  Cannon.js cites inspiration from three.js and ammo.js, yet claims to be lighter and smaller than ported engines such as ammo.js and JigLibJS.

    Though the home page samples use WebGL, Chandler Prall’s Javascript Physics Engine Comparison has a nice example of using cannon.js with the three.js CanvasRenderer.

    According to the cannon.js download page, the latest updates were made in September, 2012.

    Another Option: Windows Runtime Components

    Another interesting option for Windows Store apps is to use Windows Runtime Components, components written in other languages such as C++, C#, and VB, and call them from your JavaScript-based game.

    imageFor example, the Farseer Physics Engine is based on .NET, but could be wrapped and exposed to a JavaScript-based Windows Store app.

    Keep in mind that while this can work, it also adds new levels of complexity to your app.  For example, which side “owns” the various pieces of game state?  But, if you’re already familiar with another non-JavaScript physics engine, this may be worth considering.

    What Next?

    Here are some other helpful articles to get you started:

    As I mentioned, this post lists only a subset of what’s out there.  If you know of other helpful engines, please post in the comments!

    -Chris  

  • Chris Bowen's Blog

    IronPython and Silverlight Resources

    • 1 Comments

    This is a long-overdue follow-up to my visit with the Cambridge Python Meetup Group.  I had a great time speaking with the group about Silverlight, IronPython and dynamic languages. 

    Here are the resources I showed or that we discussed during the session:

    Silverlight

    IronPython and the DLR

    Other

     

    Thanks to the group for being an excellent audience and to Peter Marquez for being a great host!

    -Chris

    P.S.  For those of you interested in IronPython and dynamic languages, attend our next Roadshow (from 9/10-9/20) where I'll be spending one of the sessions covering those very topcs!

     

  • Chris Bowen's Blog

    Announcing New England Code Camp 11!

    • 5 Comments

    CC11: “Developer Stimulus Package”

    CodeCampChris Pels and I are excited to announce that the 11th edition of the venerable New England Code Camp series will be held on March 28th in Waltham, MA!

         New England Code Camp 11: ”Developer Stimulus Package”
         Saturday, March 28th, 8:30 AM – 7 PM+
         Microsoft, 201 Jones Road, Waltham, MA

    Richard Hale ShawCode Camps (started in 2004 with New England Code Camp 1), are free events organized by and for the developer community.  A fantastic chance to share knowledge without marketing noise getting in the way.  Check out the Code Camp Manifesto for the guiding principles.

    Register Now!

    Registration is free at The Dev Community site!

    Update 3/23 – Schedule Now Live

    The (always subject to change) schedule is now available, featuring over 40 sessions!

    Mega Saturday Format

    Michael CummingsIn recognition and support of the growth of other Code Camps in the northeast (including NH, CT, and NY), this time we’re packing everything and everyone into a single Mega Saturday.  Needless to say, this is going to be an intense day, so come to Camp well rested!

    Call for Speakers

    Code Camp is driven by volunteer speakers, and simply put, we need you

    Chris LoveNobody expects each speaker to be a veteran of national conferences (though we do have some!)  Code Camps are great because we hear from many perspectives – we want to hear yours!

    So, have something to share?  Submit a session today:

    1. Sign in to an existing account or create a new one at TheDevCommunity.org site.
    2. Complete a Speaker Registry profile (if you don't already have one.)
    3. Go to the Code Camps home page.
    4. Next to the CC11 entry, you should see a "Submit a Session" link.
    5. Submit as many sessions as you'd like.
    6. Please ensure that you also register as an attendee.

    Call for Contributors

    Feeding FrenzyUpdate 3/23 – Sincere thanks to Infragistics who have stepped up to provide lunch for Code Camp!  Thanks also to Infragistics’ own Tony Lombardo who is making the trip from NYC to speak as well.

    Code Camps rely on contributors to donate giveaways and funding for food to help make the event happen.

    You’ll have a highly-targeted audience appreciating your support of the developer community, so please let me know if your company is interested in contributing.

     

    See you all there!
    -Chris

  • Chris Bowen's Blog

    ASP.NET MVC Resource Guide

    • 1 Comments

    MVCThis post is inspired by the presentation that Patrick Hynds and I gave on ASP.NET MVC at StackOverflow’s DevDays conference in Boston.  Whether you attended DevDays or  happen on this from the web, I hope this is useful for you to learn more about ASP.NET MVC. (Let me know if you have additions or questions.)

    Getting Started

    ASP.NET MVC is an implementation of the Model-View-Controller pattern on ASP.NET and is freely available via:

    ASP.NET MVC 2 Preview 2 is also available, providing a look at the next version.  Note that ASP.NET MVC 2 will also ship with Visual Studio 2010 (itself available as Beta 2).

    Learning ASP.NET MVC

    So, why is this useful? There’s a 3 minute overview "Why ASP.NET MVC?" for decision makers, and a 10 minute technical “ASP.NET MVC How?” video for developers.

    ASP.MVC Learn To start learning ASP.NET MVC, go to www.asp.net/mvc/learn.  There’s tutorials, videos, sample applications, etc. to get you underway.

    Then, grab a cup of coffee and sit down to study the Nerd Dinner sample application.  It has plenty of intermediate concepts like testing, repository, validation, and more.

    Here are some other places you can turn for more:

    Going Deeper

    These are intermediate topics we touched on in the Boston session, and pointers for learning more.

    Routing

    Learning the M-V-C of ASP.NET MVC is only part of the story.  Routing is what takes an inbound web request and maps it to a controller action (and arguments).  There are routing tutorials on the ASP.NET site and on MSDN.

    You can also define custom routes, route constraints (a route that is satisfied only when constraints are met), and custom route constraints.

    T4 Templates

    Code generation in Visual Studio is customizable via T4 templates, and ASP.NET MVC uses these as well.  Need a different view or controller created in your projects?  Change them or add new ones.  They can change for all projects, or you can add/override them in specific projects.

    Learn more at T4 Templates: A Quick-Start Guide for ASP.NET MVC Developers.

    MVC Contrib

    One of the key features of ASP.NET MVC is flexibility in implementation.  Head to MVC Contrib to find additional options for extending and modifying how ASP.NET MVC functions, including:

    • Filters
    • View engines
    • Controller factories
    • Model binders
    • Routing
    • Controllers
    • and more

    Key Bloggers Covering ASP.NET MVC

    Attendee Questions

    We had good questions during and after the DevDays session and I wanted to share details for some of the key ones:

    Model Binding

    There were a few questions about taking data from a submitted page and getting it to arguments in an action method.  This is well supported via model binders, which let you map posted form data to classes passed as arguments to action methods.

    Learn more about model binding at:

    ViewModel Pattern

    Using the ViewData dictionary is one way to get data to a view, but you can also create classes to contain that data. Called the ViewModel pattern, these classes help to structure and identify the data needed.

    You can learn about ViewModel here:

    ASP.NET WebForms vs. ASP.NET MVC?

    If you’re wondering whether/when to use ASP.NET WebForms or ASP.NET MVC, Rachel Appel has a good blog post and a session recording from Mix ‘09 on the topic.

    It’s important to keep in mind that you can mix ASP.NET MVC and ASP.NET WebForms in an application, so this isn’t necessarily an either-or proposition.

     

    Let me know if you’ve found something else particularly helpful in learning about ASP.NET MVC.  I’ll be happy to add it.

    -Chris

  • Chris Bowen's Blog

    Code Camp 11 – The Schedule!

    • 13 Comments

    CodeCamp We're just under a week from New England Code Camp 11: "Developer Stimulus Package" (what is Code Camp?), a free day filled with with technology sessions given by the local developer community.  Code Camp 11 will be held on March 28th at the Microsoft offices in Waltham, MA.

    Registration is at over 300 350 375 400 people and still open at:

          http://TheDevCommunity.org/CodeCamps

    Sessions and Schedules

    But the real story is that there's been a fantastic show of support from volunteers giving their time and expertise to speak.

    CC11 is currently scheduled to offer 41 44 sessions by 32 speakers, all for free!  The grid (as always, subject to change) is below, here are the session descriptions, and we'll have printouts of the grids and descriptions waiting for you at registration.

    The Schedule (click to expand):

    CC11Schedule

    Register today, plan out your weekend with the schedule below, and we'll see you at Camp!

    P4050052Saturday Evening Geek Gathering

    A Code Camp tradition for years, we're informally gathering over at the Waltham Westin's lobby bar for a chance to unwind on Saturday night.  Drop by after sessions are over to relax, chat, and network with fellow New England devs!

    Thanks to Infragistics!

    Infragistics Last but certainly not least, budgets are hard everywhere these days, but Infragistics has really stepped up to help make Code Camp a success by sponsoring  lunch!  Many thanks to them, and you can see Infragistics’ own Tony Lombardo who is coming from the NYC area to speak.

    See you at Camp!

    -Chris

  • Chris Bowen's Blog

    The March 2009 Northeast Roadshow

    • 7 Comments

    Roadshow.png It’s time again to pack the car with our laptops, giveaways, staggeringly unhealthy travel snacks, and dangerous quantities of coffee as we set off across the northeast for the March 2009 Northeast Roadshow

    The Roadshow is a series of free, full day events where we deeply focus on topics for developers and architects, sprinkled with our “unbelievable” senses of humor, demos that usually work, and plenty of giveaways to keep unruly audiences at bay in case they don’t.

    Crossing from VT to NYIn welcome news - after a brief Roadshow hiatus to focus on the MSDN Developer Conference series, Bob Familiar will again be joining Jim O’Neil and me as we sweep through these cities, on this our eighth series:

    Bob in ActionJoin us as we cover Windows Azure, .NET Debugging, Programming with F#, Game Development with XNA, SQL Server for Developers, and Effective .NET Practices.  Click the above registration links to read the full agenda.

    Sincere thanks to the companies and organizations who make the Roadshow possible by hosting us in various cities, including KnowledgeWave, Autotask, Rochester Institute of Technology, The Hartford, and the State of Maine Government Offices.

    Register today, and we’ll see you on the road!

    -Chris

Page 2 of 23 (458 items) 12345»