Advertisement
Advertisement

More Related Content

Advertisement
Advertisement

API Design

  1. Design Better API, for You, for Your Friends, and for the World!
  2. http://www.eddie.com.tw aquarianboy@ptt eddie@digik.com.tw aquarianboy@plurk eddiekao@facebook
  3. http://en.wikipedia.org/wiki/Application_programming_interface
  4. // Win32 API ConvertSecurityDescriptorToStringSecurityDescriptor // 51 // Cocoa Framework NSAccessibilityLayoutPointForScreenPointParameterizedAttribute // 62 // UIKit delegateTitleForDeleteConfirmationButtonForRowAtIndexPath // 57
  5. // gotoAndStop(); // // gg(); // gg ?
  6. // gAS // gotoAndStop(); gAP // gotoAndPlay();
  7. // MyClass.as public class MyClass { private var strTitle:String; private var _price_code:int; public function get_price_code ():int { return _price_code; } public function setPriceCode (arg:int):void { _price_code = arg; } .. }
  8. ㊢寫
  9. // MyClass.as public class MyClass // { public static const NAME:String // private var _price:int; // private public function get_price_code():int // function { return _price; } public function set_username(name:String):void // { var age:int = 30; // } }
  10. // Member.as public class Member { ... public function member_info():String { .... } public function get_member_info():String { .... } public function user_info():String { .... } public function get_user():String { .... } .. }
  11. // MyClass.as package tw.eddie.com { public class MyClass { ... private var _title:String; // public function get_price_code ():int { return _price_code; } .. } }
  12. // BookStore.as public class BookStore { ... public function setBookInfo (bookname:String, author:String, total_page:int, amount:int, price:int, publish_date:String, is_available:Boolean):void { ... } .. }
  13. // book = new Book("Hello AS3", 1, 320, 550, "2011/6/21"); // ? book = new Book(); book.name = “Hello AS3”; book.amount = 1; book.page = 320; book.price = 550; book.publish_date = “2011/6/21”
  14. // MyClass.as public class MyClass { ... public function set_user (username:String = “guest”):void { ... } .. }
  15. // ? book = new Book(“hello AS3”, true, false); // book = new Book(“hello AS3”, Book.IS_AVAILABLE, Book.IN_STOCK);
  16. // BookStore.as /** * BookStore ... * * */ public class BookStore { /** * ASDoc */ public function setBookInfo(book:Book):void { ... } .. } http://livedocs.adobe.com/flex/3/html/help.html?content=asdoc_9.html
  17. // BookStore.as public class BookStore { ... public function setBookInfo(book:Book):void { book.count += 1; // 1 ... } .. }
  18. I’m Looking for AS3/Ruby/Rails/iOS Developers
  19. WorkingWithEddie@gmail.com
  20. Thank You! 2011/6/21 Kaos’ Digital Network, Ltd. TEL +886-2-2682-4700 No.26, Ln. 248, Junying St., Shulin Dist., New Taipei City 238, Taiwan (R.O.C.) Welcome to visit http://digik.tw for more information!
Advertisement