Your SlideShare is downloading. ×
API Design
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

API Design

3,993
views

Published on

Published in: Technology

0 Comments
20 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,993
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
20
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Design Better API, for You, for Your Friends, and for the World!
  • 2. http://www.eddie.com.twaquarianboy@ptteddie@digik.com.twaquarianboy@plurkeddiekao@facebook
  • 3. http://en.wikipedia.org/wiki/Application_programming_interface
  • 4. // Win32 APIConvertSecurityDescriptorToStringSecurityDescriptor // 51// Cocoa FrameworkNSAccessibilityLayoutPointForScreenPointParameterizedAttribute // 62// UIKitdelegateTitleForDeleteConfirmationButtonForRowAtIndexPath // 57
  • 5. //gotoAndStop(); ////gg(); // gg ?
  • 6. //gAS // gotoAndStop();gAP // gotoAndPlay();
  • 7. // MyClass.aspublic 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.aspublic 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.aspublic 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.aspackage tw.eddie.com { public class MyClass { ... private var _title:String; // public function get_price_code ():int { return _price_code; } .. }}
  • 12. // BookStore.aspublic 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.aspublic 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.aspublic class BookStore{ ... public function setBookInfo(book:Book):void { book.count += 1; // 1 ... } ..}
  • 18. I’m Looking forAS3/Ruby/Rails/iOS Developers
  • 19. WorkingWithEddie@gmail.com
  • 20. Thank You! 2011/6/21 Kaos’ Digital Network, Ltd. TEL +886-2-2682-4700No.26, Ln. 248, Junying St., Shulin Dist., New Taipei City 238, Taiwan (R.O.C.) Welcome to visit http://digik.tw for more information!