WLWPlurk 第二版發布

欠了好久~ 總算一口氣把它寫完:
請到這裡下載: http://wlwplurk.codeplex.com/

  1. Upgrade code with VS2010.
  2. Add login page for change account. Using registry to save your login information.
    WLWPlurk_1.jpg
  3. Add post content page to let you modify your plurk before post it.
    WLWPlurk_2.jpg

How to use it:
Just download this binary, extract it and put on your Windows Live Writer plugin folder such as C:Program FilesWindows LiveWriterPlugins

This project implement base on two major component:

  1. Json.net (http://json.codeplex.com/)
  2. NPlurk (http://nplurk.codeplex.com/)
    You need plurk API key from http://www.plurk.com/API/ to use this source code.

MICROSOFT WINDOWS 8 BUILD STUDY NOTE (4)

HW-59T - Improving performance with the Windows Performance Toolkit

refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/HW-59T

Note:

  • Motivation for performance analysis:

    • Performance related to multiple layered impact such as : hardware, OS, other application and process impact.
  • Stage of performance improvement:

    • Preception –> Measurement –> Analysis.

    • It will be back and forth after analysis and re-preception.

  • Tool list:

    • Trace Capture: Windows Performance Recorder

    • Tacce Analysis: Windows Performance Analizer

  • Things to look out:

    • Don’t assume you know what’s wrong.

    • Don’t enable too much instrumentation

    • Don’t trace longer than you need.

PLAT-203T Async everywhere: creating responsive APIs & apps

refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/PLAT-203T

Note:

  • Async only support on some API:

    • XAML, Tile on UI

    • GPS and portable debice on Device

    • All network and communicate

    • Applifetime, Authentication, Crytography on Fundamental

  • Await

    • Await is a simple way to against async API.

    • Await will make the async highest priority and let the compiler know here need to wait the result come back. Code will run as sequencial.

  • Error handling

try { FileOpenPicker p = new FileOpenPicker(); p.FileTypeFilter.Add(".jpg");ry var operation = p.PickSingleFileAsync(); operation.Completed = (IAsyncOperation f) => { MyButton.Content = f.GetResults().FileName; }; operation.Start(); catch(...) {}</blockquote> * try catch will only cover RED one, it need refine code to cover whole scope
try { FileOpenPicker p = new FileOpenPicker(); p.FileTypeFilter.Add(".jpg"); MyButton.Content = (await p.PickSingleFileAsync()).FileName; } catch(Exception e) {}
* It will separate into “RED” and “Green” one but still cover on try catch. * 5 top tips from presenter. * Don’t worry about the COM apartment. * Remember to start your operation. * File picker cancel != Async Cancel * It will complete but return NULL. * “use exception for exceptional things” * Don’t worry about Dispatcher.Invoke… * Don’t worry about the concurrency Refer: [http://blogs.msdn.com/b/ericlippert/archive/2010/10/29/asynchronous-programming-in-c-5-0-part-two-whence-await.aspx](http://blogs.msdn.com/b/ericlippert/archive/2010/10/29/asynchronous-programming-in-c-5-0-part-two-whence-await.aspx)

MICROSOFT WINDOWS 8 BUILD STUDY NOTE (3) ABOUT touch

APP-186T - Build advanced touch apps in Windows 8

refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-186T

  • Major point of touch app design:

    • Unify pen and touch into PointerPoint

    • Get mouse and pen for free

    • performance performance and performance

  • Touch and Gesture support in framework

    • Metro app with HTML or XAML—> Gesture event

    • ICoreWindow –> Using point (touch simulate mouse click)

    • Windows Runtime –> PointerPoint with GestureRecognizer

  • PointerPoint:

    • Whole related point implement is here, HID data also can get using PointerPoint.
  • GestureRecognizer:

    • It just like the Win7 multiple touch support on MSFT, it support kind of gesture such as:

      • Tap, Hold, rotate and Scale
    • But more support on Win8 such as:

      • HoldWithMouse?

      • RightTap

        • To simulate with right click on mouse, such your finger about right click here.

        • mmmm….. it should be MSFT patent here for right click.

  • For desktop developer, MSFT also support full Windows Runtime about Gesture support –> Great!

    • WM_Point –> the same as usual

    • InteractionContexts –> mirror GestureRecognizer. Don’t forget WM_TOUCH and WM_GESTURE still support here.

    • Pointer device –> identify source device (touch panel, mouse or other.)

Web browser for Windows 8

It need note that Windows 8 has two version of IE (it should say, one application but two entry for different mode)

  • Desktop IE

  • Metro IE

But it is very tricky, if you type “open http://Web” on desktop explorer will open “Metro IE

When you try to use this command to open web side, please note metro browser will be default option, not desktop browser.

ShellExecute(NULL,TEXT(“open”), TEXT(“http://msdn.microsoft.com”), TEXT(“”),NULL,SW_SHOWNORMAL);

To specific using desktop browser, it should specific command on [HKEY_CLASSES_ROOThttpshellopencommand]

MICROSOFT WINDOWS 8 BUILD STUDY NOTE (3) About ListVIEW

APP-209T Build polished collection and list apps in HTML5

refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-209T

  • Collection: A set of related user content.

  • This session talking about how to write customized list view by WinJS by uing

    • Data Source

    • Item Render (CSS)

    • Layout (WinJS.UI.GridLayout)

  • It could be easy to select image list view import your data source and put basicc control on your list view.

  • Multi-select already support just add one propoties on it. (selectionMode = ‘multi’)

  • ListView is easy to grouping if you could provide detail data of each item, group rule and group render (to descript how to group).

  • Symantic Zoom:

    • It is a way to zoom out/zoom in by semantic  (such of “category”, “date”). It look like “Group By”.

    • ListView also provide semantic zoom.

    • Easy to implement to change <div id> to “zoomOutView” and related data control.

  • If app is snapped (snapped on side).

MICROSOFT WINDOWS 8 BUILD STUDY NOTE (2)

APP-737T - Metro style apps using XAML - what you need to know

Refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-737T

This session talking about XAML for Metro style application implement. Focus on XAML for C/C++/C#/VB on Metro style application development.

  1. Consistent with WPF and silverlight

  2. New in Windows 8 Metro

1. New look and support for touch


2. Deployment by Windows Store


3. Tile –> splash screen to application
  1. New XAML UI Control
1. Build in “Grouping”


2. Windows 8 look and feel and its “selection model”


3. Media player on Metro Style


4. Grid view and Flip view


5. Application Bar: Swipe from bottom/top to display


6. Manipulation and gestures: It could handle rotation on Button_Clicp event.
  1. Metro Style App Concept
1. Diversity of display and resolution


2. Layout changed


  1. Snapped(small one on split), Filled (big one on split) and Full Screen


  2. It could be tested on simulator on VS2011 CTP.
  1. Metro style app lifetime
1. Background apps are “Suspended”


  1. App notified.





2. App will terminated when memory is low


  1. App will not notified.





3. Event:


  1. Application.Current.Suspending –> Save state when suspend


  2. Application.Current.Resuming –> Restore state when resume

APP-116T - Prepare your apps for Windows 8 and beyond

Refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-116T

This is talking about application compatibility on Windows 8.

  1. Windows 8 is compatible with apps that run on Windows 7

  2. OS version increasement

1. Application should not set upper bound for version handle


2. Windows 8 version is 6.2
  1. DWM (Desktop Windows Manager) always ON
1. If application try to turn off it, it will failed silently.


2. Color depth must on 32-bit (for DWM limitation) but lower could be simulated
  1. Startuo application changed
1. Apps on “Start” should goes to “task scheduler” or “automatic maintance”
  1. .NET 3.5 demanded
1. Default is .NET 4.5 it could enable if user install .NET 3.5 application.
  1. Use Windows Resource Widely
1. Use RegExpandSZ for path query


2. New error code add one


  1. Some SUCCESSED might goes to FAILED.
  1. Manifest your executable
1. Need add DPIAWARE for your application.


2. Application compatibility <compatibility xmln..>


  1. Starting on Win7, if no this tag **treat it as Vista application**.





3. Metro Style Application should managed it manifest


  1. <OSMinVersion><OSMaxVersionTested> to manage your metro app.

Actually, Windows CTP Compatibility Cookbook provide more overview for this.

**APP-123T - Enabling trials and in-app offers in your Metro style app **refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-123T

  1. Trail is really matter
1. 70 times download, 10 times revenue and 10% conversion.
  1. In-App Offer
1. 72% revenue comes from app which present “In-App offers”


2. 48% comes from “In-App offers”
  1. Flxibility option for this.
1. Use your existing commerce


  1. maintain relationship, subscription and consumable phuchases.





2. Ad supporteds


  1. Choice of ad controls





3. One time purchase


  1. Time limited trail and features differentiated trails.





4. Purchase over time


  1. Persisent purchase and Expiring purchase.
  1. Implement basic
1. Check License


  1. It could use simulate since store still no open





2. Get latest listing data


3. Prompt for purchase

PLAT-775T/PLAT-776T** - Your Metro style app, video and audio, Part 1/Part 2**

refer:  http://channel9.msdn.com/Events/BUILD/BUILD2011/PLAT-775T refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/PLAT-776T

It discussion about media API and Media element:

  1. Using media API could easy to build up tailored user experience application with little domain knowledge.

  2. HTML 5 standard

1. DXVA full support


2. You can creat rich media by CSS, JS and DOM.
  1. Windows 8 enhancement
1. 3D video (Stereo 3D)


  1. _S3D still not work on CTP version_





2. Audio/Video effect and extensibility


3. Zoom/Mirror


4. Audio output selection


5. Background audio


6. DRM


7. Streaming media to TV and Audio systems
  1. System-wide support format
1. File name:


  1. MP4/ASF





2. Video:


  1. H264/VC1





3. Audio:


  1. AAC/MP3/WMA
  1. Simple HTML5 video player all related feature: Seeking, bookmark, play/pause, channel switching, capture feature already support on build-in API.

  2. Media Focus:

1. When app own media focus video could be see and heard


2. When suspends it will remove from active list, and app will mute


3. When select second media, it will leave original focus to new one.
  1. Media format extensibility
1. Custmize your app specific support format


2. Extension are  packaged and local on your app **(only for your app, no share)**


3. Extension could be naive (C++/COM) Media Fundation component.
  1. Extending your custom format
1. Register DLL with in App manifest on MF(Media Fundation)


  1. Such audio/video source filter or demux





2. In your app, register custom  streaming/data format with ExtensibilityManager


  1. Register your custom video/audio encoder/decoder





3. Custom effect could be insert effect pipeline