//build/ 2014 Day 3 session recap

I have attended live the sessions described below on day 3 at the Build conference and these are my notes from these sessions. Some parts might not be easily readable or understandable (even for me Smile )  because the sessions were fast-paced and I tried to write down everything which seemed important to me. Nevertheless I hope that this brief summary is helpful to some of you.

The Future of C#

  • Roslyn
    • The .Net Compiler Platform
    • Reimplementation of C# and VB compilers in C# and VB respectively with rich public APIs
    • Available on CodePlex
    • Roslyn source
    • Rewritten to get a richer IDE experience, build and share tools and extensions, clean architecture, OSS
    • Diagnostics Framework
    • Source and end-user preview
    • Call to action: install, previews, fork the compiler source
    • SDK Preview: samples, tools, project templates to build for Roslyn, Syntax Visualizer
    • Project Template: C# node => Roslyn
      • Diagnostic with code fix
    • Roslyn Syntax Visualizer: navigate the syntax tree
    • Diagnostic Analyzer: checks and shows squiggles
    • Code Fix Provider: transform code with fix
    • C# languages design notes on CodePlex
    • VB Select Case As Type => direct use in case block
    • C#:
      • Console.WriteLine() => using System.Console; => WriteLine();
      • Easier declaration
        • Primary constructor on the class
          • public class Point (int x, int y)
        • Initialization of the auto properties
          • It doesn’t call the setter, sets directly the private variable
          • public int X { get; set; } = x;
          • public int X{ get; } = x;
        • Accessibility modifier on the parameter
          • public class Point (int x, private readonly int y)
          • Creates private variable automatically
        • Object initializer
          • Dictionary initialization
            • new JObject() { [“x”] = p.X }
            • LINQ query:
              • new JArray (from points where … select … );
        • Indexed member (syntactic sugar only)
          • From json[“x”] to json.$x
        • Declaration expression
          • Our parameters have to be declared
            • var x; TryGetInt(json.$x, out x);
          • Can be initialized
            • TryGetInt(json.$x, out int x)
            • TryGetInt(json.$x, out var x);
            • TryGetInt(json.$x, our var x = 1)
        • await inside catch and finally blocks for async close or logging
        • Exception filters also in C# (already in VB and F#)

Cutting Edge Graphics in HTML

  • Options:
    • Images
    • SVG
    • Canvas
      • Fill rule
      • Dashed lines
  • JPEG
    • Save image quality 0-6, for web 0-50
    • Tool RIOT
  • WebGL
    • IE11 has WebGL on all devices
    • On tablets and phones GPU is always used
    • Spring 14 update
  • Antialiasing
    • Enable on WebGL
    • It looks smoother
    • Lines will use gradient
    • No antialiasing on DirectX 9 devices
  • WebGL best practices
    • Don’t render in the background
    • Don’t render if the scene is not changing
  • Babylon.js: framework for WebGL
    • On GitHub
    • Physics engine and collision engine included in Babylon.js
    • For web app
      • HTML page, CSS, JavaScript file
      • Add canvas to HTML page
      • Add script reference babylon.js to the HTML page
      • In the JavaScript file:
        • new Babylon.Engine(canvas, useAntiAliasing)
      • Babylon.SceneLoader,Load => engine.runRenderLoop , scene.render
          • Loads Json
          • Loads scene with textures, shadows
          • When loaded asynchronous
            • scene.executeWhenReady()
      • web.config: declare .ddl and .babylon as known types
    • You have to create the scene by using Blender 2.7
    • Sandbox for Babylon.js to test scene by drag & drop
    • Replace JPEG with DDS
      • JPEG and PNG converted to BMP
      • Using DDS is 4 times less memory footprint
    • Offline support
    • Full support for Windows Phone 8.1
      • Virtual joystick
      • Camera follows finger
      • Move phone
    • Support for Oculus Rift
      • No plugin needed, just JavaScript and Internet Explorer
      • Cut screen in half for left and right eyes

Animations in Windows Phone XAML Apps

  • Timing is crucial
  • Animations are slow and annoying, e.g. blinking
  • What makes animations great?
    • Fluidity
    • Context
    • Subtle feedback
    • Emotional appeal
  • Library of animations designed by motion experts
    • ThemeTransitions
    • ThemeAnimations
    • Examples:
      • Page Navigation Theme Transition
        • SlideNavigationTransitionInfo
      • NavigationTransition
        • Common
        • Slide
        • Continuum

You can find also lots of pictures from the conference and also some of the most important slides here on OneDrive.

I will be watching online some sessions that I missed at the conference because the sessions was either full or overlapping with the ones that I attended live. The recap of these sessions will be coming soon…

Useful links
Advertisements