這些年來,我們已經看到很多新的技術和語言使應用開發比以往更加令人興奮。比如Python和Ruby語言的出現,雖然不能提供突破性的功能,但是提供了一些支持的替代方式來生產軟件。Ruby on Rails,或者ROR,就是一個這樣的功能使開發者以更非凡的速度容易的進行基于web的應用開發,使得常見應用的功能開發不再那么令人痛苦。
This is a great move in the right direction, and many developers have since made the transition to such languages to further lessen the strain that was ever present with languages such as C++ or Java, but it doesn ’ t provide a be - all - and - end - all for applications development as it still means having to learn a new technology. What ’ s more, despite the surge of new technologies that have been appearing, you can see that they are only really of benefit to desktop or server - side web development, while the client side for web applications remain firm with Flash, HTML, JavaScript, and VBScript, for the simple reason that older browser technologies have a greater coverage on users ’ machines. This means that, while we now have a larger choice of tools for creating our applications, we are perhaps further segregating our development team members and forcing possible rifts into our software stability and production timescales.
So why are we suffering these issues and what can be done to dispose of these rifts we keep making for ourselves while continuing to embrace technology developments? The issues here are not about how such technologies interact, or about the functionality they provide, but about how we develop for them.
想一想這些。 If humans, like technology, needed to interact with one another, we would use an agreed form of communication; written English in the case of this book. If we were to seek employment in a country whose entire population didn ’ t speak our language, we are sure this would hinder our progress very much, as it would be hard enough to even convey that we were seeking employment, let alone be capable of performing many of the available work positions on offer. Yet, in respect of many programming languages and technologies available, they often communicate very well with each other using processes of their own, but the way in which we interact with them can be very diverse.
When new languages are created, the syntax they support is often chosen to reflect the flavor of programmer the language is likely to attract, the features the language provides, the structure of the compiler, and the general taste of the language ’ s author, to name a few. 然而,一個編譯工具通常只是一個巧妙地程序,分析你的代碼并轉換它為一個更加機器可讀的語法,所以它只是盡可能可信的創建一個編譯工具可以實現從一種語言到另一種。一個編譯器這正是Nicolas Cannasse思考的,并促使他創造Haxe編譯器的問題。
- 本書目錄
- 第一章:Haxe介紹
- 互聯網開發的一個問題
- Haxe是什么,為什么產生
- Haxe編譯工具
- Haxe語言
- Haxe如何工作
- 那么Neko是什么
- Haxe和Neko的必須條件
- 本章摘要
- 第二章:安裝、使用Haxe和Neko
- 安裝Haxe
- 使用Haxe安裝程序
- 在Windows上手動安裝Haxe
- Linux上手動安裝Haxe
- 安裝Neko
- Windows上手動安裝Neko
- 在Linux上安裝Neko
- Hello world! 一式三份
- 編譯你的第一個Haxe應用
- 你的程序如何編譯
- HXML編譯文件
- 編譯到Neko
- 編譯為JavaScript
- 程序結構
- 編譯工具開關
- 本章摘要
- 第三章:基礎知識學習
- Haxe層級結構
- 標準數據類型
- 變量
- 類型推斷
- 常數變量
- 簡單的值類型
- 浮點類型
- 整型
- 選擇數值類型
- 布爾類型
- 字符串類型
- 抽象類型
- Void 和 Null
- 動態類型
- unknown類型
- 使用untyped繞過靜態類型
- 注釋代碼
- 轉換數據類型
- Haxe數組
- Array
- List
- Map
- Haxe中使用日期時間
- 創建一個時間對象
- Date組件
- DateTools類
- 操作數據
- 操作符
- Math類
- 使用String函數
- 本章摘要
- 第四章:信息流控制
- 數據存放之外
- 條件語句
- if語句
- switch語句
- 從條件語句返回值
- 循環
- while循環
- for循環
- 循環集合
- Break和Continue
- 函數
- 類的函數
- 局部函數
- Lambda類
- 本章摘要
- 第五章:深入面向對象編程
- 類和對象
- 實例字段
- 靜態字段
- 理解繼承
- Super
- 函數重載
- 構造器重載
- toString()
- 抽象類和抽象方法
- 靜態字段,實例變量和繼承
- 繼承規則
- 使用接口
- 高級類和對象特性
- 類的實現
- 類型參數
- 匿名對象
- 實現動態
- Typedef
- 擴展
- 枚舉
- 構造器參數
- 本章摘要
- 第六章:組織你的代碼
- 編寫可重用代碼
- 使用包
- 聲明一個包
- 隱式導入
- 顯式導入
- 枚舉和包
- 類型查找順序
- 導入一個完整的包
- 導入庫
- Haxe標準庫
- Haxelib庫
- 其他項目中的庫
- 外部庫
- 使用資源
- 文檔化代碼
- 離線文檔
- 在線文檔
- 單元測試
- haxe.unit包
- 編寫測試
- 本章摘要
- 第七章:錯誤調試
- trace函數
- trace輸出
- haxe的trace和ActionScript的trace
- 異常
- 異常處理
- CallStack和ExceptionStack
- 異常管理類
- 創建完全的異常處理類
- 異常類代碼
- 本章摘要
- 第八章:跨平臺工具
- XML
- XML剖析
- Haxe XML API
- 正則表達式
- EReg類
- 模式
- 定時器
- 延遲動作
- 隊列動作
- MD5
- 本章摘要
- 第九章:使用Haxe構建網站
- Web開發介紹
- Web 服務器
- 使用Web服務器發布內容
- HTML速成課程
- Haxe和HTML的區別
- NekoTools Web Server
- Apache安裝mod_neko
- Windows安裝Apache和mod_neko
- Linux安裝Apache和Mod_Neko
- 第一個Haxe網站
- 使用Neko作為網頁Controller
- neko.Web類
- Neko作為前端控制器
- 本章摘要
- 第十章:使用模板進行分離式設計
- 什么是模板
- Template類
- Template語法
- 使用資產
- 何時在模板中使用代碼
- 服務器端模板的Templo
- 安裝Templo
- 使用Templo
- haxe.Template和mtwin.Templo表達式上的區別
- Attr表達式
- Raw表達式
- 邏輯表達式
- 循環表達式
- set, fill, 和 use表達式
- Templo中使用宏
- 手動編譯模版
- 第十一章:執行服務端技巧
- 第十二章:使用Flash構建交互內容
- 第十三章:使用IDE
- 第十四章:通過JavaScript制作更多交互內容
- 第十五章:通過Haxe遠程通信連接所學
- 第十六章:Haxe高級話題
- 第十七章:Neko開發桌面應用
- 第十八章:用SWHX開發桌面Flash
- 第十九章:多媒體和Neko
- 第二十章:使用C/C++擴展Haxe
- 附加部分