Monday, February 10, 2014

MVA Course Advanced Windows Store App Development with HTML5 Jump Start Part 3

This is the last two modules of this MVA course. I didn't take notes as copious as I did with Module 4 so I figured it wouldn't be a big deal to combine them.  The certificate of completion is pretty farcical for this course considering there wasn't a single test. I actually showed 100% progress before I even watched the third lecture. Oh well...





Good information but my head hurts and I'm exhausted, so I'm not going to rehash it all when my notes are pretty decent... here they are:

Module 5: Data, Files, and Encryption

-- Design and implement data caching --
In-memory data - the page, function scope, anything in memory. Super fast.
 - How long things stay in memory is important consideration to caching strategy

Expensive data - services, restful calls, database calls.  Slower to retrieve.

Cached data - local settings, local files, indexedDB, HTML local storage. Make it much faster to use certain kinds of data.

Azure caching - improved application performance.  AppFabric Caching does caching in the cloud

codeSHOW() uses caching to preserve the navigation state when the user exits.

roaming settings allow an app to save settings for a given user across devices.

-- Save and retrieve files from the file system --
Storage options consist of...
Application state - session state
User settings - local settings, roaming settings
Application data - temporary files, local files, roaming files, other?
User data - document libraries

Application data is probably more bulky, but the user doesn't necessarily expect to have direct control over.

User data is data that the user expects to own and have control over. Example is a picture or a word processing document.

DEMO: codeSHOW() storage app.
When you switch to another app, current app is suspended and state information is saved. If we kill the app (Alt+F4) then application state data is lost.

-- Secure application data --
Windows 8 has many facilities in place for key generation, encryption, hashing, certificates, etc.

Cryptography namespaces:

Windows.Security.Cryptography
- Static class for encoding and decoding data, generating random numbers, and converting between byte arrays and buffers.

Windows.Security.Cryptography.Certificates
- Types you can use to create certificate requests and install certificate responses

Windows.Security.Cryptography.Core
- Algorithms for encrypting, signing, and hashing data

Windows.Security.Cryptography.DataProtection
- Encrypt or decrypt static data or a data stream
*requires Enterprise Authentication capability and should only be used in enterprise scenarios.

Went over some codeSHOW() code that demonstrates random numbers and content, certificates.

Module 6: Deployment

-- Design and implement trial functionality in the app --
Why offer a trial? Want to increase probability of install, cost is a barrier to entry when value isn't proven.
- Options in store with regard to app
   1. App is available completely free, no monetization
   2. Set a price - but any price without a trial version will scare many users away
   3. In app purchases - free app, pay for other features or content
   4. Make your app free and include ads
 
MSDN sample app demonstrates trial capabilities.
 
Grr, tease us with a link to a blog about ad monetization that we can't see because it's in the chat..... found http://kevinashley.com/category/game/

 
-- Design for error handling --
Back to palermo's blog for a bit about error handling in Javascript
Error messages can sometimes be misleading, such as "expecting semi-colon" when you misspell "var"
Big no-no is a try-catch block with nothing in the catch or finally block. At the very least include a logger.
J.Foster - a catch block with nothing will swallow the exception, comment says //gulp

WinJS.log allows you to log errors. By default calling this causes an error (using without initializing it). WinJS.Utilities.startlog initializes logger so that you can use it.

You can create your own custom logging function and assign it to WinJS.log. Calling  like this: WinJS.log && WinJS("safer") will prevent errors is WinJS.log wasn't initialized.

add an event handler for unhandled errors

-- Design and implement a test strategy --

IE Test Drive website has some interesting demos.

All apps are tested, better by you than by your users.
- source control system should be solid
- unit tests - like making sure you have clean underwear. They tell you that the code that you are writing is doing what it is supposed to do. Must have well documented requirements.

Writing a test plan
   A test plan is a document that states (in great detail) how an app will be tested
   Typically contains:
   - Description of product scenarios
   - Description of test cases to support those scenarios
   - Description of software used for testing.

MS Test manager
   - manage all of your tests: manual, unit, integration, UI
   - integrates with TFS
   - record all steps leading to a bug

developer gets really rich information regarding a bug.
patterns and practices group at Microsoft specializes in best practices for software development.

shows how to get project from codeplex using Git functionality
"associated automation" lets you set up automated testing activities in test plan

suggests "Mocha" as a test framework. "Chai" is another library they use for testing.
Unit testing is not integrated with visual studios test tools
Flexibility in test setup strategy.

-- Design a diagnostic and monitoring strategy --

Visual Studio analyze capability.  Alt+F2 starts a performance analysis.
-Launches app, records actions, and creates a performance profile.
-Results in a report, summary page lists which functions did the most work.
-Call tree tracks which objects call which other calls, tracks time taken.
-Functions list shows all functions that were called
-Processes that were utilized
-Function details gives us metrics

You can generate multiple reports and then compare them.

1 comment:

  1. Thanks for sharing up–to-date on this subject! I find it is very informative and very well written one! Keep up on this quality!

    app development course

    ReplyDelete