20. I really don't want to be a grumpy and bitter developer but #microsoft doesn't
make it easy to stay enthusiastic as a #wpf dev. 03.02.2011
@microsoft is king of FUD strategy. causes fear, uncertainty and doubt to
devs around the world. pity they do it to *their* own devs #wpf 25.08.2011
21. not a single mention of #wpf in #bldwin keynote - it's as if it doesn't exist. the
XAML thing they talk about is prop closer to #silverlight 12.09.2011
22.
23.
24.
25. RT @JohnBristowe: Me, attempting to build a Windows 8 app in JavaScript for
the past 30 minutes: http://t.co/TwTrwZic 09.03.2012
@JohnBristowe that's me today as well :(
although all in all JS in Win8 is surprisingly fun :)
09.03.2012
26. implemented my first 3D transformation
animation in CSS yesterday. astonishingly
simple. 13.05.2012
it constantly surprises me how easy it is to
create fluent animations in HTML/JS in all
sort of scenarios. simply not possible in
WPF. 22.05.2012
27. Announcement: (Game Dev Tycoon) is the #win8 game I've
been working on the past months. Store review is underway :)
04.07.2012
28.
29. Announcement: A new NovaMind app is now available on
the Windows Store. #mindmapping http://t.co/aLSPv6bA
27.07.2012
[…] I was extremely surprised how pleasant porting code
from C# was. JS is also surprisingly fast in IE10.
27.07.2012
30.
31.
32.
33.
34.
35.
36.
37.
38.
39. Couple of months ago I switched from C# to JavaScript.
Surprisingly, I don't miss C# one bit. JavaScript is bloody
amazing. 10.08.2012
Using HTML5/JS on WinRT is the most rewarding and
productive environment I’ve ever worked with
– just now
49. JavaScript: Promises handle Async
Object that is a promise for a later value
Hook up to completion with then() or done () method
then(completion, error, progress)
then() returns another promise
Implementation in base.js: WinJS.Promise
Common.js promises/A spec
http://wiki.commonjs.org/wiki/Promises/A
50.
51.
52.
53.
54. DllImport "avicap32.dll" "capCreateCaptureWindow"
static extern int
string int
int int int int
int int
DllImport "avicap32.dll"
static extern bool
int
MarshalAs UnmanagedType ref string
int
MarshalAs UnmanagedType ref string
int
// more and more of the same
First part of many parts talking about Windows 8 development here at TechEd
Changing World
User interaction methods
Piaget’s Theory of Cognitive Development; Sensorimotor stage (birth to 2 yrs) 8-12 months coordination of hand/eye with schemes and intentionality. Logic, means & ends. “First proper intelligence”
Jean Piaget, Swiss developmental psychologist.
The internet
In visual studio
“Sort of like BCL for Javascript” app development on Windows 8
Implemented by jQuery, dojo, node.js, etc.
Then returns another promise so you can chain them…
C++ has a similar mechanism through the PPL
What are the APIs that we’ve got available to us?
ALL OF THEM
We talked about projections already. What we didn’t talk about is the idea that we can author new components in C# and C++.
These are new WinRT components and we can then consume them in JavaScript/C#/C++ - produces WinMD files that can be consumed anywhere.
WinRT is based on COM, interfaces, so doesn’t feel natural in OO lang.
Projections take care of this so it feels natural.
let’s switch gears and talk about where and how these applications run.
we’ve already talked about how apps come from a store.
The app package (Appx) is abb OPC file ( a zip)
The package
It includes anything necessary to deploy or uninstall –
It includes capabilities and declartions so we know the impact in the system.
In the package you will see JS files etc. If in C++ see .dll files and what you would expect.
Blockmap is a series of hashes for each block in your package.
Combination of signature + blockmap verifies the package.. It can be validated as it comes off-the wire… we don’t have to download the whole thing..
and when your app is running, it’s not necessarily making direct API calls to the OS. a lot of APIs are “brokered” and that “broker” decides what to do based on a manifest that’s part of your app.
There are APIs that we can’t just allow to “happen” without the user’s consent and so your application needs to say what it’s going to try and do and the user needs to be in control of that.
The app has to declare what the app wants to do ( capabilities ) which can still be turned down by the user and it also has to declare what it can do on behalf of the operating system or other apps ( i.e. declarations ).
this is a huge change and one that developers need to get from day 1.
the OS is in control of when your app runs. it will definitely suspend it. it may also kill it. you need to code for this from the first line of code that you write.
the basics of it.
BACKGROUND TASKS
Register for events
Register for time-based;
Table 1 – Background task trigger events
Trigger event When the background task is triggered
ControlChannelTrigger On incoming messages on the control channel.
InternetAvailable The Internet becomes available.
InternetNotAvailable The Internet becomes unavailable.
LockScreenApplicationAdded An app tile is added to the lock screen.
LockScreenApplicationRemoved An app tile is removed from the lock screen.
MaintenanceTrigger It’s time for maintenance background tasks.
NetworkNotificationChannelReset A network channel is reset.
NetworkStateChange A network change such as a change in cost or connectivity occurs.
OnlineIdConnectedStateChange Online ID associated with the account changes.
PushNotificationTrigger A raw notification arrives on the WNS channel.
ServicingComplete The system has finished updating an application.
SessionConnected The session is connected.
SessionDisconnected The session is disconnected.
SessionStart The user session starts.
SmsReceived A new SMS message is received by an installed mobile broadband device.
TimeTrigger A time event occurs.
TimeZoneChange The time zone changes on the device (for example, when the system adjusts the clock for daylight saving time).
UserAway The user becomes absent.
UserPresent The user becomes present.
Apps need to store things and especially if they are going to work well online/offline.
The app can store its own data like settings, files, session, cache etc and we give it isolated space on the disk to do that.
App has 3 folders – local, temp and roaming. Local is for most things. Temp is for stuff you don’t mind losing.
However, the user’s data is owned by them and the app has to first ask for the capability to interact with these libraries or take files from the user via the file picker. An app can’t simply open up the user’s photos and start sending them over the internet.
App has that 3rd folder called roaming. Subject to size and timing, this data is then roamed to other PCs where the user uses the same Microsoft Account (unless the user chooses not to do this).
We saw the settings for this in the demo earlier on.
App has that 3rd folder called roaming. Subject to size and timing, this data is then roamed to other PCs where the user uses the same Microsoft Account (unless the user chooses not to do this).
We saw the settings for this in the demo earlier on.