160419 build2016 리뷰 2편

Edit

Intro to Bluetooth Background Communication

  • 페어링 없이 통신
    • Rfcomm (블루투스 이전버전)
    • GATT (BTLE)

Rfcomm 에서 BG소켓 사용하기

RFCOMM

GATT

BT LE Advertisements





Async Programming Improvements for C++ and UWP

VC++ 개선사항

- C++17 지원
- rename, extract method 지원
- templete에서 자동완성 지원

async code 개선점

기존의 콜백 헬
using namespace Windows::Storage::Pickers;
using namespace concurrency;

auto picker = ref new FileOpenPicker();
picker->FileTypeFilter->Append(L".jpg");
picker->SuggestedStartLocation = PickerLocationId::PicturesLibrary;

create_task(picker->PickSingleFileAsync()).then([this](StorageFile^ file)
{
    create_task(file->OpenReadAsync()).then([this](IRandomAccessStreamWithContentType^ stream)
    {
        auto bitmap = ref new BitmapImage();
        bitmap->SetSource(stream);
        theImage->Source = bitmap;
    });
});
개선된 co_await 코드
task<void> ShowImageAsync()
{
  auto picker = ref new FileOpenPicker();
  picker->FileTypeFilter->Append(L".jpg");
  picker->SuggestedStartLocation = PickerLocationId::PicturesLibrary;

  auto file = co_await picker->PickSingleFileAsync();
  auto stream = co_await file->OpenReadAsync();
  auto bitmap = ref new BitmapImage();
  bitmap->SetSource(stream);
  theImage->Source = bitmap;
}
co_await로 구현된 소켓 읽기 코드
auto tcp_reader(int total) -> future<int>{
    char buf[4 * 1024];
    auto conn = co_await Tcp::Connect("127.0.0.1", 1337);

    for (;;)
    {
        auto bytesRead = co_await conn.Read(buf, sizeof(buf));
        total -= bytesRead;

        if (total <= 0 || bytesRead == 0)
            return total;
    }
}

코루틴이 인기!

파이썬
async def abinary(n):
    if n <= 0:
        return 1

    l = await abinary(n - 1)

    r = await abinary(n - 1)
        return l + 1 + r
C#
async Task<string> WaitAsynchronouslyAsync() { 
    await Task.Delay(10000); 
    return "Finished"; 
}
C++ 1z
future<string> WaitAsynchronouslyAsync() 
{
    o_await sleep_for(10ms); 
    co_return "Finished"s; 
}

C++에서 coroutine은 언제부터?

  • Visual Studio 2015, Update 2 부터 Experimental 모드로 지원됨.
  • 표준화 될때까지는 /await 플래그 필요.




UWP Application Data: Building a Continuous App Experience

앱저장소 분류





Bringing Desktop Apps to the UWP Using Desktop App Converter

Project Centennial

데스크톱앱을 UWP앱으로 변경
데크크톱앱을 UWP앱 패키지형태로 배포
  • 데스크톱앱을 UWP 컨테이너로 컨버팅 툴 다운로드




Protecting Premium Video in Windows with PlayReady

http://playready.azurewebsites.net/
PlayReady Tests Server
  • test content
  • license service
  • test player
http://playerframework.codeplex.com/
PlayReady 지원 플레이어 프로젝트




todo doc

Customizing Your Device Experience with Assigned Access
https://channel9.msdn.com/Events/Build/2016/P508
Microsoft Translator: Speech Translation Made Easy
https://channel9.msdn.com/Events/Build/2016/P577
HockeyApp for UWP Apps: Beta Distribution, Crash Reporting and User Metrics
https://channel9.msdn.com/Events/Build/2016/P463
Modeling Data for NoSQL Document Databases
https://channel9.msdn.com/Events/Build/2016/P468
Native iOS, Android, & Windows Apps from C# and XAML with Xamarin.Forms
https://channel9.msdn.com/Events/Build/2016/P548
OneDrive API – Overview, What's New, and Scenarios
https://channel9.msdn.com/Events/Build/2016/P559
What's New with Microsoft Graph SDKs
https://channel9.msdn.com/Events/Build/2016/P563
Introducing the File Picker for OneDrive and OneDrive for Business
https://channel9.msdn.com/Events/Build/2016/P565
Introduction to Azure Table Storage
https://channel9.msdn.com/Events/Build/2016/P582
Universal App Model Overview: What's New in the UWP App Model
https://channel9.msdn.com/Events/Build/2016/B809
What's New in Windows UI/UX for Universal Windows Platform (UWP) Apps
https://channel9.msdn.com/Events/Build/2016/B853
SQL Database Technologies for Developers
https://channel9.msdn.com/Events/Build/2016/B814
Using HockeyApp with Xamarin Apps
https://channel9.msdn.com/Events/Build/2016/T668-R1
Deep Dive Into IOT Starter Kit App: Architecture and Getting Started on Building Your IOT Solution
https://channel9.msdn.com/Events/Build/2016/T673-R1
Pen and Ink: Inking at the Speed of Thought
https://channel9.msdn.com/Events/Build/2016/B865
Cross-Platform Mobile with Xamarin
https://channel9.msdn.com/Events/Build/2016/B836
Native iOS, Android, & Windows Apps from C# and XAML with Xamarin.Forms
https://channel9.msdn.com/Events/Build/2016/T667-R1
Become a Visual Studio 2015 Power User
https://channel9.msdn.com/Events/Build/2016/B819
Developer's Guide to Connecting Devices to Azure IoT
https://channel9.msdn.com/Events/Build/2016/B844
Windows 10 IoT Core: From Maker to Market
https://channel9.msdn.com/Events/Build/2016/B860
ASP.NET Core Deep Dive into MVC
https://channel9.msdn.com/Events/Build/2016/B812
Building Network-Aware Applications
https://channel9.msdn.com/Events/Build/2016/B828
Deploying ASP.NET Core Applications
https://channel9.msdn.com/Events/Build/2016/B811

todo video

Runtime Editing Tools for XAML
https://channel9.msdn.com/Events/Build/2016/P465
%23%20160419%20build2016%20%uB9AC%uBDF0%202%uD3B8%0A%0A@%28%uD669%uD604%uB3D9%20%uB178%uD2B8%uBD81%29%5B.net%2C%20build%2C%20uwp%2C%20iotcore%5D%0A%0A%5Btoc%5D%0A%0A%23%23%20Intro%20to%20Bluetooth%20Background%20Communication%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P460%0A-%20%uD398%uC5B4%uB9C1%20%uC5C6%uC774%20%uD1B5%uC2E0%0A%20%20%20%20-%20Rfcomm%20%28%uBE14%uB8E8%uD22C%uC2A4%20%uC774%uC804%uBC84%uC804%29%0A%20%20%20%20-%20GATT%20%28BTLE%29%0A%0A%23%23%23%20Rfcomm%20%uC5D0%uC11C%20BG%uC18C%uCF13%20%uC0AC%uC6A9%uD558%uAE30%0A%21%5BAlt%20text%5D%28./1461051027916.png%29%0A%0A%23%23%23%20UWP%20%uBE14%uB8E8%uD22C%uC2A4%20%uAC1C%uBC1C%20%uAD00%uB828%uAE00%0Ahttps%3A//msdn.microsoft.com/en-us/windows/uwp/devices-sensors/bluetooth%0A%0A%23%23%23%23%20RFCOMM%0A-%20https%3A//msdn.microsoft.com/en-us/windows/uwp/devices-sensors/send-or-receive-files-with-rfcomm%0A-%20Windows.Devices.Bluetooth.Rfcomm%0A-%20Bluetooth%20RFCOMM%20APIs%0A-%20%uC608%uC81C%0A%20%20%20%20-%20%uD30C%uC77C%20%uC8FC%uACE0%20%uBC1B%uAE30%0A%0A%23%23%23%23%20GATT%0A-%20https%3A//msdn.microsoft.com/en-us/windows/uwp/devices-sensors/gatt-scenarios%0A-%20Windows.Devices.Bluetooth.GenericAttributeProfile%0A-%20Bluetooth%20Generic%20Attribute%20Profile%20%28GATT%29%20APIs%0A-%20%uC608%uC81C%0A%20%20%20%20-%20%uBE14%uB8E8%uD22C%uC2A4%20%uB370%uC774%uD0C0%20%uC8FC%uACE0%uBC1B%uAE30%0A%20%20%20%20-%20BLE%20%uC628%uB3C4%uACC4%20%uC81C%uC5B4%0A%20%20%20%20-%20PPT%20%uB9AC%uBAA8%uCEE8%0A%0A%23%23%23%23%20BT%20LE%20Advertisements%0A-%20https%3A//msdn.microsoft.com/en-us/windows/uwp/devices-sensors/bluetooth%0A-%20Windows.Devices.Bluetooth.Advertisement%20%0A-%20Bluetooth%20Low%20Energy%20advertisements%20using%20the%20APIs%0A%0A%3Cbr/%3E%0A%3Cbr/%3E%0A%3Cbr/%3E%0A%0A%23%23%20Async%20Programming%20Improvements%20for%20C++%20and%20UWP%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P489%0A%0A%23%23%23%20VC++%20%uAC1C%uC120%uC0AC%uD56D%0A%20%20%20%20-%20C++17%20%uC9C0%uC6D0%0A%20%20%20%20-%20rename%2C%20extract%20method%20%uC9C0%uC6D0%0A%20%20%20%20-%20templete%uC5D0%uC11C%20%uC790%uB3D9%uC644%uC131%20%uC9C0%uC6D0%0A%0A%23%23%23%20async%20code%20%uAC1C%uC120%uC810%0A%uAE30%uC874%uC758%20%uCF5C%uBC31%20%uD5EC%0A%60%60%60cpp%0Ausing%20namespace%20Windows%3A%3AStorage%3A%3APickers%3B%0Ausing%20namespace%20concurrency%3B%0A%0Aauto%20picker%20%3D%20ref%20new%20FileOpenPicker%28%29%3B%0Apicker-%3EFileTypeFilter-%3EAppend%28L%22.jpg%22%29%3B%0Apicker-%3ESuggestedStartLocation%20%3D%20PickerLocationId%3A%3APicturesLibrary%3B%0A%0Acreate_task%28picker-%3EPickSingleFileAsync%28%29%29.then%28%5Bthis%5D%28StorageFile%5E%20file%29%0A%7B%0A%20%20%20%20create_task%28file-%3EOpenReadAsync%28%29%29.then%28%5Bthis%5D%28IRandomAccessStreamWithContentType%5E%20stream%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20auto%20bitmap%20%3D%20ref%20new%20BitmapImage%28%29%3B%0A%20%20%20%20%20%20%20%20bitmap-%3ESetSource%28stream%29%3B%0A%20%20%20%20%20%20%20%20theImage-%3ESource%20%3D%20bitmap%3B%0A%20%20%20%20%7D%29%3B%0A%7D%29%3B%0A%60%60%60%20%20%20%20%20%20%20%20%0A%20%20%20%20%0A%uAC1C%uC120%uB41C%20co_await%20%uCF54%uB4DC%0A%60%60%60cpp%0Atask%3Cvoid%3E%20ShowImageAsync%28%29%0A%7B%0A%20%20auto%20picker%20%3D%20ref%20new%20FileOpenPicker%28%29%3B%0A%20%20picker-%3EFileTypeFilter-%3EAppend%28L%22.jpg%22%29%3B%0A%20%20picker-%3ESuggestedStartLocation%20%3D%20PickerLocationId%3A%3APicturesLibrary%3B%0A%0A%20%20auto%20file%20%3D%20co_await%20picker-%3EPickSingleFileAsync%28%29%3B%0A%20%20auto%20stream%20%3D%20co_await%20file-%3EOpenReadAsync%28%29%3B%0A%20%20auto%20bitmap%20%3D%20ref%20new%20BitmapImage%28%29%3B%0A%20%20bitmap-%3ESetSource%28stream%29%3B%0A%20%20theImage-%3ESource%20%3D%20bitmap%3B%0A%7D%0A%60%60%60%0A%0A%60co_await%60%uB85C%20%uAD6C%uD604%uB41C%20%uC18C%uCF13%20%uC77D%uAE30%20%uCF54%uB4DC%0A%60%60%60csharp%0Aauto%20tcp_reader%28int%20total%29%20-%3E%20future%3Cint%3E%0A%7B%0A%20%20%20%20char%20buf%5B4%20*%201024%5D%3B%0A%20%20%20%20auto%20conn%20%3D%20co_await%20Tcp%3A%3AConnect%28%22127.0.0.1%22%2C%201337%29%3B%0A%20%20%20%20%0A%20%20%20%20for%20%28%3B%3B%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20auto%20bytesRead%20%3D%20co_await%20conn.Read%28buf%2C%20sizeof%28buf%29%29%3B%0A%20%20%20%20%20%20%20%20total%20-%3D%20bytesRead%3B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20if%20%28total%20%3C%3D%200%20%7C%7C%20bytesRead%20%3D%3D%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20total%3B%0A%20%20%20%20%7D%0A%7D%0A%60%60%60%0A%0A%23%23%23%20%uCF54%uB8E8%uD2F4%uC774%20%uC778%uAE30%21%0A%uD30C%uC774%uC36C%0A%60%60%60python%0Aasync%20def%20abinary%28n%29%3A%0A%20%20%20%20if%20n%20%3C%3D%200%3A%0A%20%20%20%20%20%20%20%20return%201%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20l%20%3D%20await%20abinary%28n%20-%201%29%0A%20%20%20%20%0A%20%20%20%20r%20%3D%20await%20abinary%28n%20-%201%29%0A%20%20%20%20%20%20%20%20return%20l%20+%201%20+%20r%0A%60%60%60%0A%0AC%23%0A%60%60%60csharp%0Aasync%20Task%3Cstring%3E%20WaitAsynchronouslyAsync%28%29%20%0A%7B%20%0A%20%20%20%20await%20Task.Delay%2810000%29%3B%20%0A%20%20%20%20return%20%22Finished%22%3B%20%0A%7D%0A%60%60%60%0A%0AC++%201z%0A%60%60%60cpp%0Afuture%3Cstring%3E%20WaitAsynchronouslyAsync%28%29%20%0A%7B%0A%20%20%20%20o_await%20sleep_for%2810ms%29%3B%20%0A%20%20%20%20co_return%20%22Finished%22s%3B%20%0A%7D%0A%60%60%60%0A%0A%23%23%23%20C++%uC5D0%uC11C%20coroutine%uC740%20%uC5B8%uC81C%uBD80%uD130%3F%0A-%20Visual%20Studio%202015%2C%20Update%202%20%uBD80%uD130%20Experimental%20%uBAA8%uB4DC%uB85C%20%uC9C0%uC6D0%uB428.%0A-%20%uD45C%uC900%uD654%20%uB420%uB54C%uAE4C%uC9C0%uB294%20/await%20%uD50C%uB798%uADF8%20%uD544%uC694.%0A%0A%3Cbr/%3E%0A%3Cbr/%3E%0A%3Cbr/%3E%0A%0A%23%23%20UWP%20Application%20Data%3A%20Building%20a%20Continuous%20App%20Experience%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P495%0A%23%23%23%20%uC571%uC800%uC7A5%uC18C%20%uBD84%uB958%0A%21%5BAlt%20text%5D%28./1461119053165.png%29%0A%0A%3Cbr/%3E%0A%3Cbr/%3E%0A%3Cbr/%3E%0A%0A%23%23%20Bringing%20Desktop%20Apps%20to%20the%20UWP%20Using%20Desktop%20App%20Converter%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P504%0A%0A%23%23%23%20Project%20Centennial%0A%uB370%uC2A4%uD06C%uD1B1%uC571%uC744%20UWP%uC571%uC73C%uB85C%20%uBCC0%uACBD%0A%uB370%uD06C%uD06C%uD1B1%uC571%uC744%20UWP%uC571%20%uD328%uD0A4%uC9C0%uD615%uD0DC%uB85C%20%uBC30%uD3EC%0A%0Ahttps%3A//www.microsoft.com/en-us/download/details.aspx%3Fid%3D51691%0A-%20%uB370%uC2A4%uD06C%uD1B1%uC571%uC744%20UWP%20%uCEE8%uD14C%uC774%uB108%uB85C%20%uCEE8%uBC84%uD305%20%uD234%20%uB2E4%uC6B4%uB85C%uB4DC%0A%0A%3Cbr/%3E%0A%3Cbr/%3E%0A%3Cbr/%3E%0A%0A%23%23%20Protecting%20Premium%20Video%20in%20Windows%20with%20PlayReady%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P507%0A%0Ahttp%3A//playready.azurewebsites.net/%0APlayReady%20Tests%20Server%0A-%20test%20content%0A-%20license%20service%0A-%20test%20player%0A%0Ahttps%3A//developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/eme/%0AEME%20DRM%20test%20player%0A%0Ahttp%3A//playerframework.codeplex.com/%0APlayReady%20%uC9C0%uC6D0%20%uD50C%uB808%uC774%uC5B4%20%uD504%uB85C%uC81D%uD2B8%0A%0Ahttps%3A//msdn.microsoft.com/en-us/library/windows/apps/mt282145.aspx%0APlayReady%20MSDN%20%uC18C%uAC1C%0A%0Ahttps%3A//code.msdn.microsoft.com/PlayReady-samples-for-124a3738%0APlayReady%20UWP%20%uC5B4%uD50C%uB9AC%uCF00%uC774%uC158%20%uC0D8%uD50C%0A%0A%3Cbr/%3E%0A%3Cbr/%3E%0A%3Cbr/%3E%0A%0A%23%23%20todo%20doc%0A%0ACustomizing%20Your%20Device%20Experience%20with%20Assigned%20Access%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P508%0A%0AWindows%20SDK%20for%20Facebook%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P544%0A%0AMicrosoft%20Translator%3A%20Speech%20Translation%20Made%20Easy%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P577%0A%0AAzure%20Data%20Lake%20Deep%20Dive%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P413%0A%0AHockeyApp%20for%20UWP%20Apps%3A%20Beta%20Distribution%2C%20Crash%20Reporting%20and%20User%20Metrics%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P463%0A%0AModeling%20Data%20for%20NoSQL%20Document%20Databases%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P468%0A%0ASelecting%20the%20Right%20VM%20Size%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P523%0A%0ANative%20iOS%2C%20Android%2C%20%26%20Windows%20Apps%20from%20C%23%20and%20XAML%20with%20Xamarin.Forms%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P548%0A%0AOneDrive%20API%20%u2013%20Overview%2C%20What%u2019s%20New%2C%20and%20Scenarios%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P559%0A%0AWhat%27s%20New%20with%20Microsoft%20Graph%20SDKs%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P563%0A%0AIntroducing%20the%20File%20Picker%20for%20OneDrive%20and%20OneDrive%20for%20Business%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P565%0A%0AMicrosoft%20Graph%20Overview%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P569%0A%0AIntroduction%20to%20Azure%20Table%20Storage%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P582%0A%0AUniversal%20App%20Model%20Overview%3A%20What%u2019s%20New%20in%20the%20UWP%20App%20Model%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B809%0A%0AWhat%27s%20New%20in%20Windows%20UI/UX%20for%20Universal%20Windows%20Platform%20%28UWP%29%20Apps%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B853%0A%0ALinux%20Command%20Line%20on%20Windows%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/C906%0A%0ASQL%20Database%20Technologies%20for%20Developers%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B814%0A%0AUsing%20HockeyApp%20with%20Xamarin%20Apps%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/T668-R1%0A%0ADeep%20Dive%20Into%20IOT%20Starter%20Kit%20App%3A%20Architecture%20and%20Getting%20Started%20on%20Building%20Your%20IOT%20Solution%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/T673-R1%0A%0APen%20and%20Ink%3A%20Inking%20at%20the%20Speed%20of%20Thought%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B865%0A%0ACross-Platform%20Mobile%20with%20Xamarin%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B836%0A%0ANative%20iOS%2C%20Android%2C%20%26%20Windows%20Apps%20from%20C%23%20and%20XAML%20with%20Xamarin.Forms%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/T667-R1%0A%0A.NET%20Overview%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B891%0A%0AThe%20Future%20of%20C%23%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B889%0A%0ABecome%20a%20Visual%20Studio%202015%20Power%20User%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B819%0A%0ADeveloper%27s%20Guide%20to%20Connecting%20Devices%20to%20Azure%20IoT%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B844%0A%0AEntity%20Framework%20Core%201.0%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B852%0A%0AWindows%2010%20IoT%20Core%3A%20From%20Maker%20to%20Market%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B860%0A%0AASP.NET%20Core%20Deep%20Dive%20into%20MVC%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B812%0A%0ABuilding%20Network-Aware%20Applications%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B828%0A%0ADeploying%20ASP.NET%20Core%20Applications%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/B811%0A%0A%23%23%20todo%20video%0A%0ARuntime%20Editing%20Tools%20for%20XAML%0Ahttps%3A//channel9.msdn.com/Events/Build/2016/P465

이 글은 Evernote에서 작성되었습니다. Evernote는 하나의 업무 공간입니다. Evernote를 다운로드하세요.

댓글