SlideShare a Scribd company logo
1 of 88
Design Better API, for You, for Your Friends, and for the World!
http://www.eddie.com.tw
aquarianboy@ptt
eddie@digik.com.tw
aquarianboy@plurk
eddiekao@facebook
http://en.wikipedia.org/wiki/Application_programming_interface
// Win32 API
ConvertSecurityDescriptorToStringSecurityDescriptor              // 51

// Cocoa Framework
NSAccessibilityLayoutPointForScreenPointParameterizedAttribute   // 62

// UIKit
delegateTitleForDeleteConfirmationButtonForRowAtIndexPath        // 57
//
gotoAndStop(); //

//
gg();          //   gg   ?
//

gAS //   gotoAndStop();
gAP //   gotoAndPlay();
// 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;
    }
    ..
}
㊢寫
// 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;                            //
    }
}
// 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 { .... }
    ..
}
// MyClass.as
package tw.eddie.com {
  public class MyClass
  {
    ...
    private var _title:String;        //

        public function get_price_code ():int
        {
           return _price_code;
        }
        ..
    }
}
// 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
  {
      ...
  }
  ..
}
//
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”
// MyClass.as
public class MyClass
{
  ...
  public function set_user (username:String = “guest”):void
  {
      ...
  }
  ..
}
//                        ?

book = new Book(“hello AS3”, true, false);

//
book = new Book(“hello AS3”, Book.IS_AVAILABLE, Book.IN_STOCK);
// 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
// BookStore.as
public class BookStore
{
  ...
  public function setBookInfo(book:Book):void
  {
      book.count += 1; //         1
      ...
  }
  ..
}
I’m Looking for
AS3/Ruby/Rails/iOS
     Developers
WorkingWithEddie@gmail.com
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!

More Related Content

What's hot

Declarations sample
Declarations   sampleDeclarations   sample
Declarations sample
aslamsan
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
elliando dias
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
elliando dias
 
6 windows-phone8-introduction-m6-slides
6 windows-phone8-introduction-m6-slides6 windows-phone8-introduction-m6-slides
6 windows-phone8-introduction-m6-slides
MasterCode.vn
 
Building a Mobile App with Sencha Touch
Building a Mobile App with Sencha TouchBuilding a Mobile App with Sencha Touch
Building a Mobile App with Sencha Touch
James Pearce
 

What's hot (19)

Exemple de création de base
Exemple de création de baseExemple de création de base
Exemple de création de base
 
Javascript session june 2013 (iii) jquery json
Javascript session june 2013 (iii) jquery   jsonJavascript session june 2013 (iii) jquery   json
Javascript session june 2013 (iii) jquery json
 
HOW TO UPLOAD AND DISPLAY IMAGE PHP HTML SQL
HOW TO UPLOAD AND DISPLAY IMAGE PHP HTML SQLHOW TO UPLOAD AND DISPLAY IMAGE PHP HTML SQL
HOW TO UPLOAD AND DISPLAY IMAGE PHP HTML SQL
 
Declarations sample
Declarations   sampleDeclarations   sample
Declarations sample
 
How kris-writes-symfony-apps-london
How kris-writes-symfony-apps-londonHow kris-writes-symfony-apps-london
How kris-writes-symfony-apps-london
 
NodeJS The edge of Reason - Lille fp#6
NodeJS The edge of Reason - Lille fp#6NodeJS The edge of Reason - Lille fp#6
NodeJS The edge of Reason - Lille fp#6
 
Migrare da symfony 1 a Symfony2
 Migrare da symfony 1 a Symfony2  Migrare da symfony 1 a Symfony2
Migrare da symfony 1 a Symfony2
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
Latihan form login
Latihan form loginLatihan form login
Latihan form login
 
php Slideshare
php Slidesharephp Slideshare
php Slideshare
 
6 windows-phone8-introduction-m6-slides
6 windows-phone8-introduction-m6-slides6 windows-phone8-introduction-m6-slides
6 windows-phone8-introduction-m6-slides
 
Make it SOLID!
Make it SOLID!Make it SOLID!
Make it SOLID!
 
Security and Mobility - WordCamp Porto 2016
Security and Mobility - WordCamp Porto 2016Security and Mobility - WordCamp Porto 2016
Security and Mobility - WordCamp Porto 2016
 
Karan - form search
Karan - form searchKaran - form search
Karan - form search
 
Building a Mobile App with Sencha Touch
Building a Mobile App with Sencha TouchBuilding a Mobile App with Sencha Touch
Building a Mobile App with Sencha Touch
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
Rails GUI Development with Ext JS
Rails GUI Development with Ext JSRails GUI Development with Ext JS
Rails GUI Development with Ext JS
 
えっ、なにそれこわい
えっ、なにそれこわいえっ、なにそれこわい
えっ、なにそれこわい
 

Viewers also liked

Viewers also liked (8)

API 文件大亂鬥 @ MOPCON 2013
API 文件大亂鬥 @ MOPCON 2013API 文件大亂鬥 @ MOPCON 2013
API 文件大亂鬥 @ MOPCON 2013
 
PM大我們換個方式寫文件吧
PM大我們換個方式寫文件吧PM大我們換個方式寫文件吧
PM大我們換個方式寫文件吧
 
REST to RESTful Web Service
REST to RESTful Web ServiceREST to RESTful Web Service
REST to RESTful Web Service
 
API Token 入門
API Token 入門API Token 入門
API Token 入門
 
Agile x API x Documentation @ NGO [[MOPCON2015]]
Agile x API x Documentation @ NGO [[MOPCON2015]]Agile x API x Documentation @ NGO [[MOPCON2015]]
Agile x API x Documentation @ NGO [[MOPCON2015]]
 
淺談RESTful API認證 Token機制使用經驗分享
淺談RESTful API認證 Token機制使用經驗分享淺談RESTful API認證 Token機制使用經驗分享
淺談RESTful API認證 Token機制使用經驗分享
 
RESTful API Design
RESTful API DesignRESTful API Design
RESTful API Design
 
Scrum 路上的血與淚
Scrum 路上的血與淚Scrum 路上的血與淚
Scrum 路上的血與淚
 

Similar to API Design

First java-server-faces-tutorial-en
First java-server-faces-tutorial-enFirst java-server-faces-tutorial-en
First java-server-faces-tutorial-en
techbed
 
Terrastore - A document database for developers
Terrastore - A document database for developersTerrastore - A document database for developers
Terrastore - A document database for developers
Sergio Bossa
 
CSharp presentation and software developement
CSharp presentation and software developementCSharp presentation and software developement
CSharp presentation and software developement
frwebhelp
 
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
Dmitry Soshnikov
 

Similar to API Design (20)

Bologna Developer Zone - About Kotlin
Bologna Developer Zone - About KotlinBologna Developer Zone - About Kotlin
Bologna Developer Zone - About Kotlin
 
Symfony War Stories
Symfony War StoriesSymfony War Stories
Symfony War Stories
 
Multilingualism makes better programmers
Multilingualism makes better programmersMultilingualism makes better programmers
Multilingualism makes better programmers
 
Arquitetando seu app Android com Jetpack
Arquitetando seu app Android com JetpackArquitetando seu app Android com Jetpack
Arquitetando seu app Android com Jetpack
 
First java-server-faces-tutorial-en
First java-server-faces-tutorial-enFirst java-server-faces-tutorial-en
First java-server-faces-tutorial-en
 
Kotlin, smarter development for the jvm
Kotlin, smarter development for the jvmKotlin, smarter development for the jvm
Kotlin, smarter development for the jvm
 
Terrastore - A document database for developers
Terrastore - A document database for developersTerrastore - A document database for developers
Terrastore - A document database for developers
 
Kotlin Austin Droids April 14 2016
Kotlin Austin Droids April 14 2016Kotlin Austin Droids April 14 2016
Kotlin Austin Droids April 14 2016
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 
CSharp presentation and software developement
CSharp presentation and software developementCSharp presentation and software developement
CSharp presentation and software developement
 
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
 
Electron: From Beginner to Pro
Electron: From Beginner to ProElectron: From Beginner to Pro
Electron: From Beginner to Pro
 
Academy PRO: Elasticsearch. Data management
Academy PRO: Elasticsearch. Data managementAcademy PRO: Elasticsearch. Data management
Academy PRO: Elasticsearch. Data management
 
Arquitetando seu app Android com Jetpack
Arquitetando seu app Android com JetpackArquitetando seu app Android com Jetpack
Arquitetando seu app Android com Jetpack
 
A single language for backend and frontend from AngularJS to cloud with Clau...
A single language for backend and frontend  from AngularJS to cloud with Clau...A single language for backend and frontend  from AngularJS to cloud with Clau...
A single language for backend and frontend from AngularJS to cloud with Clau...
 
A single language for backend and frontend from AngularJS to cloud with Clau...
A single language for backend and frontend  from AngularJS to cloud with Clau...A single language for backend and frontend  from AngularJS to cloud with Clau...
A single language for backend and frontend from AngularJS to cloud with Clau...
 
Minimizing Decision Fatigue to Improve Team Productivity
Minimizing Decision Fatigue to Improve Team ProductivityMinimizing Decision Fatigue to Improve Team Productivity
Minimizing Decision Fatigue to Improve Team Productivity
 
solving little problems
solving little problemssolving little problems
solving little problems
 
Writing Maintainable JavaScript
Writing Maintainable JavaScriptWriting Maintainable JavaScript
Writing Maintainable JavaScript
 

More from Eddie Kao

Let's Learn Ruby - Basic
Let's Learn Ruby - BasicLet's Learn Ruby - Basic
Let's Learn Ruby - Basic
Eddie Kao
 
iOS app development and Open Source
iOS app development and Open SourceiOS app development and Open Source
iOS app development and Open Source
Eddie Kao
 
CreateJS - from Flash to Javascript
CreateJS - from Flash to JavascriptCreateJS - from Flash to Javascript
CreateJS - from Flash to Javascript
Eddie Kao
 
May the source_be_with_you
May the source_be_with_youMay the source_be_with_you
May the source_be_with_you
Eddie Kao
 
Why I use Vim
Why I use VimWhy I use Vim
Why I use Vim
Eddie Kao
 
There is something about Event
There is something about EventThere is something about Event
There is something about Event
Eddie Kao
 
Flash Ecosystem and Open Source
Flash Ecosystem and Open SourceFlash Ecosystem and Open Source
Flash Ecosystem and Open Source
Eddie Kao
 
Happy Programming with CoffeeScript
Happy Programming with CoffeeScriptHappy Programming with CoffeeScript
Happy Programming with CoffeeScript
Eddie Kao
 
Ruby without rails
Ruby without railsRuby without rails
Ruby without rails
Eddie Kao
 
CoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-TuesdayCoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-Tuesday
Eddie Kao
 
CoffeeScript
CoffeeScriptCoffeeScript
CoffeeScript
Eddie Kao
 
3rd AS Study Group
3rd AS Study Group3rd AS Study Group
3rd AS Study Group
Eddie Kao
 
iOS Game Development with Cocos2d
iOS Game Development with Cocos2diOS Game Development with Cocos2d
iOS Game Development with Cocos2d
Eddie Kao
 
AS3讀書會(行前準備)
AS3讀書會(行前準備)AS3讀書會(行前準備)
AS3讀書會(行前準備)
Eddie Kao
 

More from Eddie Kao (20)

Rails girls in Taipei
Rails girls in TaipeiRails girls in Taipei
Rails girls in Taipei
 
Rails Girls in Taipei
Rails Girls in TaipeiRails Girls in Taipei
Rails Girls in Taipei
 
Let's Learn Ruby - Basic
Let's Learn Ruby - BasicLet's Learn Ruby - Basic
Let's Learn Ruby - Basic
 
iOS app development and Open Source
iOS app development and Open SourceiOS app development and Open Source
iOS app development and Open Source
 
Vim
VimVim
Vim
 
from Ruby to Objective-C
from Ruby to Objective-Cfrom Ruby to Objective-C
from Ruby to Objective-C
 
Code Reading
Code ReadingCode Reading
Code Reading
 
CreateJS - from Flash to Javascript
CreateJS - from Flash to JavascriptCreateJS - from Flash to Javascript
CreateJS - from Flash to Javascript
 
May the source_be_with_you
May the source_be_with_youMay the source_be_with_you
May the source_be_with_you
 
Why I use Vim
Why I use VimWhy I use Vim
Why I use Vim
 
There is something about Event
There is something about EventThere is something about Event
There is something about Event
 
Flash Ecosystem and Open Source
Flash Ecosystem and Open SourceFlash Ecosystem and Open Source
Flash Ecosystem and Open Source
 
Happy Programming with CoffeeScript
Happy Programming with CoffeeScriptHappy Programming with CoffeeScript
Happy Programming with CoffeeScript
 
Ruby without rails
Ruby without railsRuby without rails
Ruby without rails
 
CoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-TuesdayCoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-Tuesday
 
CoffeeScript
CoffeeScriptCoffeeScript
CoffeeScript
 
測試
測試測試
測試
 
3rd AS Study Group
3rd AS Study Group3rd AS Study Group
3rd AS Study Group
 
iOS Game Development with Cocos2d
iOS Game Development with Cocos2diOS Game Development with Cocos2d
iOS Game Development with Cocos2d
 
AS3讀書會(行前準備)
AS3讀書會(行前準備)AS3讀書會(行前準備)
AS3讀書會(行前準備)
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 

API Design

  • 1. Design Better API, for You, for Your Friends, and for the World!
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. // Win32 API ConvertSecurityDescriptorToStringSecurityDescriptor // 51 // Cocoa Framework NSAccessibilityLayoutPointForScreenPointParameterizedAttribute // 62 // UIKit delegateTitleForDeleteConfirmationButtonForRowAtIndexPath // 57
  • 27.
  • 28. // gAS // gotoAndStop(); gAP // gotoAndPlay();
  • 29.
  • 30. // 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; } .. }
  • 32. // 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; // } }
  • 33. // 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 { .... } .. }
  • 34.
  • 35.
  • 36. // MyClass.as package tw.eddie.com { public class MyClass { ... private var _title:String; // public function get_price_code ():int { return _price_code; } .. } }
  • 37.
  • 38. // 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 { ... } .. }
  • 39. // 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”
  • 40. // MyClass.as public class MyClass { ... public function set_user (username:String = “guest”):void { ... } .. }
  • 41. // ? book = new Book(“hello AS3”, true, false); // book = new Book(“hello AS3”, Book.IS_AVAILABLE, Book.IN_STOCK);
  • 42.
  • 43.
  • 44.
  • 45.
  • 46. // 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
  • 47. // BookStore.as public class BookStore { ... public function setBookInfo(book:Book):void { book.count += 1; // 1 ... } .. }
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 88. 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!