Extreme RIA = Silverlight 3 + PHP Accessibility, Networking Listing, Data Handling Interoperability 김영욱 Developer Evangelist DPE/Microsoft KOREA yowkim@microsoft.com
Silverlight Silverlight communication
Silverlight 2 Silverlight 1.x Silverlight 2 LINQ UI Core Inputs Media XML WPF RIA BCL VB.NET Python WCF Ruby.NET CLR DRM C#
Silverlight 3 Tooling Visual Studio 2008 tools for Silverlight 10~30% 더작아진배포파일 Expression Blend 3 Korean tomorrow! 향상된개발자와디자이너의협업시나리오 스케치플로우를통한시안작업 디자인기능강화
H.264/AAC/MP4 Silverlight 3 supports H.264/AAC/MP4 Industry standard format Hardware decoders on most devices YouTube, iphone, Flash supported format Base format for QuickTime and itunes Example: Silverlight plays.m4a Silverlight 3 H.264 vs. VC1 DRM Windows Media Server
GPU Acceleration Opt-in feature on the Silverlight 3 plug-in Enables final surface draw with the GPU Opt-in feature per element Use GPU to blend/composite multiple elements Use GPU to stretch elements Example: Full screen media Works in-browser and in full-screen mode Scenarios Performance no other visual impact
Perspective 3D Perspective 3D Put 2D objects in 3D space X,Y,Z rotation and X,Y,Z rotation point Support Local/Global X,Y and Z offsets Demo in 2 slides
Effects Effects and Pixel Shaders Impact visual behavior (versus functional behavior) Silverlight 3 supports drop shadow and blur Silverlight 3 supports custom effects Custom effects are implemented as shaders Shaders typically authored using HLSL Compiled into byte code using a DX SDK utility Silverlight 3 consumes the byte codes Shaders allow developers to modify each pixel on a UI element before the pixel is rendered Shader = a per-pixel function or operation
Local Messaging Cross plug-in Silverlight communication Multiple plug-ins on the same page Multiple plug-ins on different browser tabs Multiple plug-ins in different browsers Implementation Shared memory implementation Exposed like named pipes String based messages Scenarios Mixed HTML and Silverlight architecture
UI Framework Improvements Merged resource dictionaries BasedOn styles Styles can be cleared (changed at runtime) Multi-select ListBox Listening to handled routed events New VSM invalid states Supported on TextBox, CheckBox, ComboBox, ListBox, RadioButton (post Mix: PasswordBox) More details: T16F (Karen Corby)
Other Improvements SystemColors SaveFileDialog Text Improvements ClearType Text (Post Beta) CaretBrush (Silverlight 2 Caret was black) Flag to optimize for animating text Glyphs support for system font Image refinements
New SDK Controls DockPanel Expander Label TreeView ViewBox WrapPanel ChildWindow DatePickerTextBox TabPanel +Others
Other Big Additions In the business talk Navigation framework Data control additions SEO support N-Tier data support See T40F (Brad Abrams) Web service stack improvements Binary XML, SOAP faults, credentials See T42F (Eugene Osovetsky) Silverlight toolkit release See T15F (Shawn Oster)
Silverlight Out of the Brow ser Silverlight runs out of the browser (sandboxed) Built into the core Silverlight runtime Enabled per application Manifest update User gesture to take out of the browser Right click Custom button in the application New networking APIs Connected, disconnected and changed state Offline APIs Launch state, update APIs
Networking Silverlight communication
Silverlight Networking 1. HTTP 2. RSS 3. REST 4.Standard Web Service (SOAP) 5. WCF 6.TCP/IP WEB
Silverlight web communication 1. HttpWebRequest HttpWebResponse Http 기본통신방법을제공 2. WebClient 좀더상위클래스로세세한제어가필요하지않은일반적인경우다적용이가능하며사용하기쉽다.
Silverlight web communication private void SetGuestBoardList() { } WebClient wc = new WebClient(); wc.downloadstringcompleted += new DownloadStringCompletedEventHandler (wc_downloadstringcompleted); wc.downloadstringasync(new Uri("http://localhost/winkey_guestboard_list.php")); void wc_downloadstringcompleted(object sender, DownloadStringCompletedEventArgs e) { // 가져온데이터를보여주는코드 MessageBox.Show(e.Result); } }
Demo RSS Reader http://www.winkey.pe.kr/rss
Cross Domain Issue A 서버 B 서버 clientaccesspolicy.xml or crossdomain.xml 사용자
clientaccesspolicy.xml 000: <?xml version="1.0" encoding="utf-8"?> 001: <access-policy> 002: <cross-domain-access> 003: <policy> 004: <allow-from http-request-headers="*"> 005: <domain uri="*"/> 006: </allow-from> 007: <grant-to> 008: <resource path="/" include-subpaths="true"/> 009: </grant-to> 010: </policy> 011: </cross-domain-access> 012: </access-policy>
crossdomain.xml 000: <?xml version="1.0"?> 001: <!DOCTYPE cross-domain-policy SYSTEM "http://www.m acromedia.com/xml/dtds/cross-domain-policy.dtd"> 002: <cross-domain-policy> 003: <allow-access-from domain="*" secure="true" /> 004: </cross-domain-policy>
RSS Tag <rss> RSS 의시작과끝을나타낸다. <channel> 하나의 RSS안에는여러가의채널을가질수있다. 각각의채널을표시한다. <title> 채널이나게시글의제목을나타낼때사용한다. <link> 채널이나게시글의 Link 를나타낼때사용한다. <description> 채널이나게시글의내용을출력할때사용한다. <language> 언어를출력한다. 단이때각언어의약어를사용해야한다. 한국어이면 KO 영어면 EN 등등이다. <pubdate> 해당채널이나게시글이배포된날짜와시갂을출력한다. <totalcount> 총개수를나타낸다. <item> 채널에속해있는게시글을표현한다. <author> 글쓴이를표현할때사용한다.
RSS Entity Class public class RSSEntity { public string Title {get;set;} public string Author { get; set; } public string Link { get; set; } public string Description { get; set; } public string PubDate { get; set; } }
LINQ
LINQ Language-INtegrated Query (LINQ) Language Features (through LINQ to Objects) LINQ to Data LINQ to DataSet LINQ to SQL LINQ to Entities LINQ to XML and XML Integration
LINQ Code sample XDocument xmlstories = XDocument.Parse(e.Result); var feed = from rss in xmlstories.descendants("item") select new RSSEntity { Title = (string)rss.element("title"), Author= (string)rss.element("author"), Description = (string)rss.element("description"), Link = (string)rss.element("link"), PubDate = ((DateTime)rss.Element("pubDate")).ToShortDateString(), };
Data List 1. DataGrid 2. Custom Control 3. ListBox
Data Template <ListBox x:name="lstlist" SelectionChanged="lstList_SelectionChanged"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text="{Binding PubDate}"/> <TextBlock Text="{Binding Title}" Width="500" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> lstlist.itemssource = feed;
Data Template <ListBox x:name="lstlist" SelectionChanged="lstList_SelectionChanged"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text="{Binding PubDate}"/> <TextBlock Text="{Binding Title}" Width="500" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox>
Selection Changed Event private void lstlist_selectionchanged(object sender, SelectionChangedEventArgs e) { RSSEntity feed = (RSSEntity)lstList.SelectedItem; } System.Windows.Browser.HtmlPage.Window.Navigate(new Uri(feed.Link),"_new");
장애인차별금지및 권리구제애관한법률 2009 년 4 월시행
Accessibility 2007 년 4 월에제정된장애인차별금지및권리구제등에관한법률 - 동법 14 조 : 정보접근및의사소통에서의정당한편의제공및단계적범위및편의내용 ( 필요한수단 ) 누구든지신체적기술적여건과관계없이웹사이트를통해서원하는서비스를이용할수있도록접근성이보장되는웹사이트 - 동법 21 조 : 정보통신및의사전달에서의정당한편의제공장애인에게전자정보및비전자정보를동등하게접근할수있는필요한수단을제공해야함을명시하고있습니다.
Accessibility
UIA(User Interface Automation) 1. Windows XP later 2..NET & Native 3. Message base 4. 드림보이스, 센스리더, 이브 Screen Reader UIA
Demo Windows 내레이터 UIA Message Silverlight UIA Test
Thanks you