開發(fā)工具(第1、3兩項需要向微軟購買,如果僅僅是學習第4項你下個試用版就可以了。具體請看這里)
1.Platform Builder for Windows Mobile(注意和Windows CE版本的區(qū)別),在定制內(nèi)核、內(nèi)核調(diào)試(另外可以借助很多PB的插件)等操作中,它將是一個得力的助手。
2.Windows Mobile 6 Professional SDK(或者Standard版本的,這里僅僅提供Professional版本),在安裝完Visual Studio之后安裝Windows Mobile 6 Professional SDK Refresh.msi,然后安裝中文包:Windows Mobile 6 Professional Images (CHS).msi。提供了你開發(fā)所需要的基本接口,和調(diào)試用的模擬器等。另外其它的頭文件和Lib庫等文件你可能需要在AKU里面查找。
3.Adaptation Kit Update(AKU),微軟更新Windows Mobile的方式。來看看維基的解釋:
"It is a collection of updates, fixes and enhancements to the tools delivered to hardware device manufacturers to create or update devices based on a specific platform.”更多
4.Visual Studio 2005/2008(有很多提高開發(fā)效率的插件,比如Visual Assist X),VS自帶的工具,如下圖,都是很有用的。
5.ActiveSync,不管是真機還是模擬器,如果想與PC同步(比如手機通過PC來上網(wǎng)),需要使用這個工具。
6.SourceInsight(驅(qū)動開發(fā)常用的工具,管理、編輯代碼很方便。)
7.在如內(nèi)存泄漏等錯誤查找方面有很多專門的工具,比如Application Verify等。(請各位看官補充一下:))
整體開發(fā)流程
主要分為:硬件、Driver、RIL、應用程序。(在以后的文章中詳細總結(jié))
應用程序開發(fā)技術(shù)
語言:C/C++(Native Code) VS C#/VB/…(Managed Code)
選擇什么開發(fā)方式就選擇什么語言,選擇Managed Code,即在.Net CF下開發(fā),但是實現(xiàn)有些功能你需要P/Invoke Win32 DLL。比如在CodeProject上的一個使用C#編寫的,在Windows Mobile上運行的iPhone界面程序,就調(diào)用了GDI API函數(shù)AlphaBlend來實現(xiàn)半透明。請看
關(guān)于本地代碼開發(fā)和提高代碼開發(fā)的比較有很多資料,這里不詳細介紹了,它們的PK是開發(fā)效率和運行效率上面的PK。其實在一個項目中它們可能都是需要的。
.Net CF
是微軟.NET Framework 的子集合,專為Mobile Device上的Windows CE平臺系列提供應用程序開發(fā)的支持。目前.NET Compact Framework最新版本為3.5,可運行在Windows CE 6.0以及Windows Mobile 6.0系統(tǒng)中。更多
Win32
我們團隊用的最多的,開發(fā)效率低,直接使用系統(tǒng)的API,程序的運行效率比較高。因為Windows Mobile編程繼承了Windows桌面編程風格,所以學習這方面知識你可以閱讀《Windows 程序設(shè)計(第5版)》、《Windows核心編程(第5版)》等書籍。
MFC
采用的倒是不多,簡單的界面就直接編寫個Win32應用程序,復雜一點的界面可以使用WTL或者使用.Net CF(第三方OpenNETCF提供更多的擴展)進行托管開發(fā)。
MFC對Win32的封裝跟WTL很多地方是相似的,封裝的機制值得學習,關(guān)于這方面的基礎(chǔ)視頻推薦:《孫鑫C++視頻》。
COM
擴展微軟自帶的應用程序,比如IE、Windows Media Player等,需要使用COM技術(shù)。
不單單如此,微軟的技術(shù)很多都是構(gòu)建于組件技術(shù)的,所以值得深入學習,推薦《COM技術(shù)內(nèi)幕》(侯捷和潘愛民都有翻譯)。
ATL
Active Template Library(活動模板庫),是一個以C++模板技術(shù)的類的集合,幫助你更方便的使用COM,創(chuàng)建ActiveX等。推薦閱讀《深入解析ATL(第2版)》維基更多介紹
WTL
是一個用于研發(fā)的面向?qū)ο蟮腃++模板函數(shù)庫,它主要被開發(fā)作為MFC的輕量化替代品,以ATL函數(shù)庫為基礎(chǔ)。
一個使用WTL和使用MFC生產(chǎn)的應用程序的簡單比較:更多
Version | Size (in KB on disk) |
MFC Debug | 2030 |
MFC Release | 212 |
WTL Debug | 420 |
WTL Release | 56 |
我們再來看看Windows Mobile 6.5及以后帶給我們開發(fā)人員的好東西
用戶界面(靜態(tài)的、動態(tài)的和可交互的)一直是開發(fā)中的難點,怎樣提高用戶體驗一直是開發(fā)中不斷挖掘的東西。以下兩個技術(shù)就是為此而生的:
Q: What is Silverlight?
A: Microsoft Silverlight powers rich application experiences and delivers high quality, interactive video across the Web and mobile devices through the most comprehensive runtime available on the Web.
Built to integrate with Microsoft Servers, Developer and Designer Tools and supported by a thriving partner ecosystem, the Silverlight solution accelerates the results of compelling experiences through powerful technology.
Q: How does Silverlight for mobile integrate with the standards-based Web?
A: Silverlight for mobile fully integrates with the standards-based Web technologies. On the client side, there is seamless DOM integration and bi-directional integration between Silverlight and JavaScript. On the server side, Silverlight can communicate with any standards-based server side technology including REST, POX, SOAP, and more.
目前Silverlight for mobile還在開發(fā)中,讓我們期待一下吧。
Widgets
在Mobile上,它吸引我的地方在于它可以僅僅做成一個獨立的基于網(wǎng)絡(luò)交互的應用程序,它使用的技術(shù)就像我當初寫網(wǎng)頁用的技術(shù)一樣:XHTML、CSS、AJAX、JavaScript,這相當爽的啊。那是在Today界面上編寫一個天氣預報的插件那是多么的方便啊,想想現(xiàn)在得用C++寫,實屬沒辦法。請看
A good way to think of a Windows Mobile Widget is as a “Portable chunk of the web” or just basically a rich internet application. Widgets are written using all the web technologies we know and love (HTML, CSS, AJAX, JavaScript) and, since they are powered under the covers by our new internet browser, they have full access to flash and other ActiveX controls available on the device (Like MediaPlayer).
Widgets最初源于蘋果電腦的一個插件工具——Konfabulator,現(xiàn)在W3C發(fā)布了關(guān)于Widget的標準草案。請看
學習和參考資料
[1].Windows Mobile 6.0/6.5/7.0 Documentation(最主要的資料。)
在你安裝的Windows Mobile 6 Professional SDK目錄下,有很多不錯的Samples,初學者應該多閱讀這里的代碼:
里面的htm文件已經(jīng)幫你歸類了,比如:
你到論壇上面問的一些簡單問題在這里都能找到答案。
[2].Microsoft WebCast開發(fā)資料(包括視頻、PPT和示例代碼,這是個好東西,我喜歡。你可以使用ireaper小程序方便的下載和管理這些資料。):
[5].Windows Mobile中國官方網(wǎng)站
[6].CodeProject/http://sourceforge.net//http://www.codeplex.com/(好東西啊)
[8].其它資源請見施炯的博客:Windows Mobile Jump Start Guide