1 / 32

‘Metro’ / Modern – ‘WinRT’

‘Metro’ / Modern – ‘WinRT’. Also known as ‘Windows Store Apps’ --o-0-o-- Windows 8 comes as two parts Win32 and WinRT The Traditional Desktop is Win32 The new WinRT is ‘Metro’ or ‘Modern’ --o-0-o-- I will call it METRO

orrick
Télécharger la présentation

‘Metro’ / Modern – ‘WinRT’

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ‘Metro’ / Modern – ‘WinRT’ Also known as ‘Windows Store Apps’ --o-0-o-- Windows 8 comes as two parts Win32 and WinRT The Traditional Desktop is Win32 The new WinRT is ‘Metro’ or ‘Modern’ --o-0-o-- I will call it METRO http://www.winclickstartvulcan2.net/WebNotes/ClickStartMETRO/ClickStartMETRO.html

  2. The ‘Surface’ Tablet Microsoft make and sell :- - a ‘Surface RT’ – which runs ‘WinRT’ only - a ‘Surface Pro’ which runs Win32 & ‘WinRT’ ‘Surface RT’ is designed for personal on-the-move use. ‘Surface Pro’ is for nerds like us – we can use it to create and develop apps for Phone and Tablet. The ‘Pro’ model can be run as a powerful workstation running VS 2012, SQL Server, TFS, and with Hyper-V run virtual machines – so the phone8 ‘Emulator’ works.

  3. Windows 8 – on a Desktop We can use Win8 on our desktops to create apps for the WinRT ‘Surface’ tablet, and test run them, without having a real Tablet device. The ‘Simulator’ is what is used by VS2012. The ‘Simulator’ does not use a VM & Hyper-V But app development for Phone8 does and the test platform is called the ‘Emulator’.

  4. The ‘Simulator’ at work (a)

  5. The ‘Simulator’ at work (b)

  6. a useful tool from ‘Stardock’

  7. ‘Simulator’ & ‘Emulator’

  8. ‘S’ or ‘E’ from Visual Studio 2012

  9. ‘WinRT’ – GUI and XAML mark-up WPF, ‘WinRT’ and ‘Phone8’ all use the same UI technology, based on XAML script. We can transfer 95% of learned skills and knowledge across all three Microsoft platforms. Along with XAML comes data binding, and this too is consistent across the platforms.

  10. ‘Licence’ - Creating Apps As soon as we try to use VS to create apps for Tablet and Phone, we get a dialog to get a licence.

  11. Restrictions – ‘File Access’ There is a ‘Sandbox’ in both ‘WinRT’ for Tablet as well as ‘WP8’ for Windows smartphone. Without the user’s consent, files can only be accessed from the local folder. Local folders can’t be seen from outside the app. Other user files are available only through a file dialog tool. This is NOT as bad as it sounds !

  12. ‘Local’ files – folder structure

  13. ‘Local’ files - accessing

  14. Manifest – allowed user libraries

  15. ‘Restrictions’ – Asynchronous operations Any ‘external’ operation has to be asynchronous. We as developers are NOT allowed to ‘block’ the operation of the Tablet / Smartphone. C# code has ‘await’ and ‘async’ as well as ‘Task’ in its keywords. This is new to many, and takes a little getting used to – BUT – it is quite useable once we have a few good examples, to copy and adapt.

  16. ‘Task’ – return type Often we need to return something – simple data, or a custom object. The ‘Task’ with a type is the way to do this :-

  17. “Goodbye” – ‘MessageBox’ ! You will see stuff like this from time to time :- [ I suggest just give it up – no message boxes at all !? ]

  18. “Goodbye” – ‘MessageBox’ (b) Here is what ‘Mr. Windows himself has to say :- (Charles Petzold, that is …)

  19. Style of Apps – ‘Page’ driven We need to add our own page navigation – app bar icons. Loss of data if controls not ‘bound’ to project properties.

  20. Fewer UI controls – nicer new ones!

  21. MVVM patterns – ‘Prism’ and ‘light’ Both are available to Metro. I prefer ‘Prism’ as it is from Microsoft, and is not a “one man band” effort. This is my personal choice on how I approach things. I got good results with ‘Prism’ but read that the ‘Light’ version from “Laurent Bugnion” (GalaSoft) works okay. I will try it out for my eNotes.

  22. MVVM – more information

  23. MVVM – lots of choices …… Or ‘nothing’ !

  24. ‘Prism’ & Calculator – trial app(a)

  25. ‘Prism’ & Calculator – trial app(b)

  26. ‘Prism’ – code ‘bits and bobs’

  27. ‘Touch’ – is what its all about ! Whether on Desktop, Tablet, or Phone – its TOUCH !!! … for ‘Windows 8’. Acer do a 23” ten point touch-screen. Ten point tracking is the Microsoft standard. Surface does 10 points. Other tablet oriented devices may be less, like 5. The events for ‘WinRT UI’ elements no longer have ‘click’ everywhere, and ‘mouse’. Checkout ‘pointer’, ‘tap’ and ‘press’. [ Only a Button still has a ‘click’ ]

  28. “Data” – using SQL, on Tablet As yet Microsoft have not provided us with SQL provision – strangely!? ‘Phone8’ has L2S (LINQ to SQL) and it works fine. For the moment, I am using ‘SQLite’ and it works fine enough, but lacks good LINQ support. I would expect something soon from M$, perhaps with MSSS 2014 ? --o-0-o-- Since ‘Entity Framework’ works with WP8 we can expect something soon for ‘WinRT’. --o-0-o--

  29. The “Thread Pool” Plenty of ‘Timer‘ choices – Dispatcher, as well as Delay and Periodic via the “Thread Pool”. { .. it is easy to use .. } Guidelines advise up to use the pool for tasks outside of the main UI thread. Here is a set of six UserControls (UCs) which each use a timer from the pool. All six are ticking away and refreshing the local times in the time zones indicated. See ‘ClickStartMETRO’ for more details on how to do this.

  30. the biggest ‘drag’ – Alwyn or Willie?

  31. Metro dragging – more fun ! ‘FlipView’ – ‘ListView’ – ‘GridView’ : above are two ‘ListView’ controls

  32. Last, but ‘yes’ LINQ !‘last but not least’ ‘LINQ to Objects’ works for Tablet and Phone8. If collections are in-memory then LINQ works. ‘LINQ to SQL’ is not as yet available to ‘WinRT’. ‘SQLite’ is available to Metro, but it has some limited ability with LINQ – through ‘sqlite-net’, a wrapper. In my trial apps I use basic LINQ to retrieve a collection for a Table, and then ‘LINQ to Objects’, to do the rest.

More Related