1 / 25

October 23, 2014

Computer Science at APU. CS 363 Web Programming. Sheldon X. Liang Ph. D. October 23, 2014. Azusa, CA. 1. October 23, 2014. Azusa Pacific University, Azusa, CA 91702, Tel: (800) 825-5278 Department of Computer Science, http://www.apu.edu/clas/computerscience/.

nova
Download Presentation

October 23, 2014

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Scienceat APU CS 363 Web Programming Sheldon X. Liang Ph. D. October 23, 2014 Azusa, CA 1 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  2. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming A silent night … … 2 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  3. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming A silent night … … 3 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  4. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming In the beginning, our project is formless … We’re planning GUI form first Then we deign interface form, plan properties and Basic code … 4 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  5. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming After we got GUI form, programming … We’re programming Project Now we define interface, set properties and write Basic code … 5 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  6. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming What’s needed to bridge the gap between… VISION is our Golden Gate Bridge Programming Planning 6 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  7. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming CS363 Web Programming Event-Driven VB Form Planning vs. Programming  Blank-filling under Framework  Declaration vs. Scope & Lifetime  Incremental Building Blocks  Menu and Dialog Boxes (sub-form)  Self-defined Procedures (Function) 7 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  8. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Project Planning vs. Programming Four kinds of controls Three kinds of data Two kinds of structures (seq / sel) One kernel in mind: you do less but re-use 8 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  9. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Project Planning vs. Programming Four kinds of controls appearing on Forms Mute controls They will do nothing dynamically, just display information. You do not need to consider them anymore in programming. Controller controls They not only do a lot of things, but also stimulate other controls to react. You need to give careful consideration in coding Controlled controls They are passively affected by other controls and provide main showcase for calculation. You need to put data for display Contributor controls They are happy to join others’ calculation by contributing their data. You need to pick data from them for calculation 9 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  10. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Project Planning vs. Programming Four kinds of controls appearing on Forms Mute Controller Controlled Contributor Group Box and Most Labels It only needs its “.Text” property, never needs a ”.Name” property, that is to say, you even do not need to give a name to it. In your code, you won’t do anything. 10 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  11. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Project Planning vs. Programming Four kinds of controls appearing on Forms Mute Controller Controlled Contributor   Most Buttons It needs not only its “.Text” property, but also a serious “.Name” property, this is because some auto-generated code is strongly tied up with it. Double-click will start your programming. 11 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  12. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Project Planning vs. Programming Four kinds of controls appearing on Forms  Double Click to start Your serious name should be: orderBtn  12 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  13. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Project Planning vs. Programming Four kinds of controls appearing on Forms Mute Controller Controlled Contributor Some Labels and TextBoxes It usually has an empty “.Text” property. It needs a serious “.Name” property, and a variable for storing datum. Finally it is required to put datum back. i.e., totalLabel (name), totalDecimal (variable) totalLable.Text = totalDecimal.toString() 13 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  14. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Project Planning vs. Programming Four kinds of controls appearing on Forms Mute Controller Controlled Contributor Text Box, Radio and Check Box It usually has an companied “.Text” property. It needs a serious “.Name” property, variable (or constant) related to it. Generally it just contribute something for calculation, i.e., quantityTextBox (name), quantityInteger (variable) quantityInteger = Integer.Parse (quantityTextBox.Text) 14 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  15. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Project Planning vs. Programming Three kinds of data Appearance  .Text property This property is for users to look at while using the form, so brief, exact, and precise TEXT will be good for them. i.e., Order Coffee, Clear, Exit Inner Identifier  .Name property This property is for designers to identify controls while design form and programming, so easy to remember will be great. i.e., quantityTextBox (or quantityTB), totalLabel (or totalLB) Variable/Const  store data at run time This is for data storage in calculation, pickup and conversion, so data type postfix to the variable will be good for programmers. i.e., quantityInteger, totalDecimal, taxDecimal, TAX_RATE_Decimal 15 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  16. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Project Planning vs. Programming Three kinds of data Appearance Inner Identifier Variable/Const All information appearing on the form Their purpose appearing on the form is to prompt users to know the meaning, so that they are guided to further operation. i.e., .Text properties Bill Form, Coffee Selection, Cappuccino, Espresso, Latte, Iced Latte, Iced Cappuccino, Your Order, Quantity, takeout, Discount15%, Oder, Total Tax, Discount, Total Due, Enjoy yourself (Clear) 16 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  17. quantityTextBox quantityTextBox quantityTextBox cappuccinoRadioButton espressoRadioButton orderButton Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Project Planning vs. Programming Three kinds of data Appearance Inner Identifier Variable/Const Every control has an inner identifier Their purpose is to let form designer and programmer use their various properties through the .Name, but for mute controls, just take the default one. 17 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  18. quantityInteger totalDecimal taxDecimal discountDecimal totalDueDecimal Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Project Planning vs. Programming Three kinds of data Appearance Inner Identifier Variable/Const Contributor & Controlled controls need variables to hold data Their purpose is to let programmer hold data for calculation, conversion, and other use 18 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  19. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming CS363 Web Programming Event-Driven VB  Form Planning vs. Programming  Blank-filling under Framework  Declaration vs. Scope & Lifetime  Incremental Building Blocks  Menu and Dialog Boxes (sub-form)  Self-defined Procedures (Function) 19 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  20. Math description Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Blank-filling under framework A Perfect VISION Form 20 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  21. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Blank-filling under framework A Perfect VISION Form

  22. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming CS363 Web Programming Event-Driven VB  Form Planning vs. Programming  Blank-filling under Framework  Incremental Building Blocks  Menu and Dialog Boxes (sub-form)  Self-defined Procedures (Function) Declaration vs. Scope & Lifetime 22 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  23. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Incremental Building Blocks Simple Form and Brief Operation Menu Window and Integrated Forms Father Window and Common Dialog Box Simple Form Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  24. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming  Declaration vs. Scope & Lifetime Variable Scope  accessible privilege Variable lifetime live an actual life Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

  25. Computer Science & Software Engineering CS363 Web Programming: Event-Driven Programming Thank you very much! That is all Questions? 25 October 23, 2014 Azusa Pacific University, Azusa, CA 91702,Tel: (800) 825-5278 Department of Computer Science,http://www.apu.edu/clas/computerscience/

More Related