2015.1.31에 Microsoft Comcamp에서 유니버셜 앱에 관해 발표한 슬라이드입니다. 발표 내용은 유니버셜 앱으로 서비스 전반을 개발하는 방법에 관한 내용으로 UI를 만드는 방법 및 Azure를 활용해 여러 디바이스를 잇는 방법, 더 나아가 크로스플랫폼을 향한 전략들을 공유합니다.
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
유니버셜 앱의 가능성
1.
2. 이종인
*바람 인터렉티브 Founder
*Windows Platform Development MVP
* Windows Phone 앱 개발
-
-
lunelake@outlook.com
http://www.facebook.com/BaramInteractive design me
3.
4. 다른 사람과 떠들고 싶다
일상들의 아름다운 순간들을 남기고
주변사람들과 공유하고 싶다
음악을 마음껏 듣고 싶다
맛 집 정보를 얻고 싶다
건강을 관리하고 싶다
빠르게 기록하고 정리하고 싶다
+
놀고 싶다
33. Roaming storage를 통한 데이터 동기화
StorageFolder roamingFolder = ApplicationData.Current.RoamingFolder;
public async void SaveText(string saveText)
{
StorageFile sampleFile = await roamingFolder.CreateFileAsync("dataFile.txt",
CreationCollisionOption.ReplaceExisting);
await FileIO.WriteTextAsync(sampleFile, saveText);
}
ApplicationDataContainer roamingSettings = ApplicationData.Current.RoamingSettings;
public void SaveSetting()
{
roamingSettings.Values["exampleSetting"] = "Hello World";
roamingSettings.Values["HighPriority"] = "65";
}
설정 저장
텍스트 저장
34. OnlineIdAuthenticator를 통한 Onedrive 동기화
public class WindowsAccountAuthenticator
{
OnlineIdAuthenticator authenticator;
public WindowsAccountAuthenticator()
{
authenticator = new OnlineIdAuthenticator();
}
/// <summary>
/// 마이크로소프트 계정 로그인 및 인증
/// </summary>
public async Task SignIn()
{
var targetArray = new List<OnlineIdServiceTicketRequest>();
targetArray.Add(new OnlineIdServiceTicketRequest("wl.signin", "DELEGATION"));
var result = await authenticator.AuthenticateUserAsync(targetArray, CredentialPromptType.PromptIfNeeded);
string AccessToken = result.Tickets[0].Value;
}
}
39. Push Notification
Azure Mobile
Service
Push
wns apns gcm
// windows
var toast = @"<toast><visual>
<binding template=""ToastText01"">
<text id=""1"">Hello</text></binding></visual></toast>";
await
Notifications.Instance.Hub.SendWindowsNativeNotificationAsync(toast,userTag);
// apns
var alert = "{"aps":{"alert":"Hello"}}";
await
Notifications.Instance.Hub.SendAppleNativeNotificationAsync(alert,userTag);
// gcm
var notif = "{ "data" : {"msg":"Hello"}}";
await
Notifications.Instance.Hub.SendGcmNativeNotificationAsync(notif,userTag);
40. 디바이스간 데이터 동기화 시나리오
Azure Mobile
Service
Push
notification 동기화 앱 켜질시
동기화
41.
42. 서비스에서의 웹 서비스 활용
Azure Mobile
Service
Azure Web
Service
43.
44.
45. Design Me에서의 PCL 사용
PCL
Azure
Web Service
Azure
Mobile Service
(Shared code, logic, datamodel.. Etc)
Universal
Windows App
46. Data model 공유
PCL
Universal
App
Mobile Service
Controller
public class Request
{
public string request { get; set; }
}
public class Result
{
public string result { get; set; }
}
Controller
public async Task<HttpResponseMessage>
Post(Request request)
{
Result result = new Result();
//처리
return Request.CreateResponse
(HttpStatusCode.OK, result);
}
Request
Request request = new Request()
Result result = await App.{ClientName}
.InvokeApiAsync<Request, Result>
(“APIName", request);
47.
48. 플랫폼간 긴밀하게 연결되는 서비스
C#
PCL
Universal
Windows App A
z
u
r
e