windows forms framework using c#kena/classes/6448/f08/... · 2008. 10. 31. · using c#.net csci...
TRANSCRIPT
![Page 1: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/1.jpg)
WINDOWS FORMS FRAMEWORK USING C#.NET
CSCI – 4448 / 6448
October 23, 2008
Neha Shanbhag
Ajinkya Kulkarni
Mark Lewis Prazen
Kaustubh Sahasrabudhe
![Page 2: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/2.jpg)
A bit of History & Background
v1.0 released in 2002, v2.0 in 2005, now on v3.5
A collection of technologies to:◦ Unite applications
◦ Simplify development and deployment
Three main elements:◦ Framework (CLR, FCL)
◦ Products (Windows, Visual Studio, Office)
◦ Services (WindowsForms, ADO.NET, ASP.NET)
CSCI 4448 / 6448
Object Oriented Analysis & Design
![Page 3: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/3.jpg)
.NET Architecture Overview
CSCI 4448 / 6448
Object Oriented Analysis & Design
![Page 4: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/4.jpg)
Introduction
What is it?◦ A GUI API included as a part of Microsoft’s .NET
framework
◦ Provides access to Microsoft windows interface elements
◦ Used for creating event-driven applications
Why?◦ An entrenched application in wide use with a
substantial development community
◦ Provides a graphical canvas for understanding how OO development works
CSCI 4448 / 6448
Object Oriented Analysis & Design
![Page 5: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/5.jpg)
The main services aka modules!
Standard GUI components
◦ System.Windows.Forms
Supportive components and services
◦ System.Drawing
◦ System.EventHandler
Other Application services like
ADO.NET
◦ System.Data.SqlClient
◦ System.Data
CSCI 4448 / 6448
Object Oriented Analysis & Design
![Page 6: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/6.jpg)
High Level Design
Collection of classes
for creating
Windows – based
applications
Collection of classes
used to access SQL
Server Databases
Delegate that provide directions
as to how specific events will be
handled
CSCI 4448 / 6448
Object Oriented Analysis & Design
![Page 7: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/7.jpg)
Class Diagram
System.Windows.Forms
ControlName
OnClick()
FormWindowState
Close()
Textbox
AppendText()
MaxLength
ButtonClickMode
OnKeyUp()
Point SizeCSCI 4448 / 6448
Object Oriented Analysis & Design
![Page 8: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/8.jpg)
Class Diagram
System.Data.SqlClient
FormWindowState
Close()
ControlName
OnClick()
Component
SqlCommandCommandText
ExecuteNonQuery()
SqlDataAdapterSelectCommand
Fill()
SqlConnectionServerVersion
Open()
CSCI 4448 / 6448
Object Oriented Analysis & Design
![Page 9: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/9.jpg)
System.EventHandler
Delegate: The basis for events
Similar to function pointers in C C++
Allows programmer to encapsulate a
reference to a method inside a
delegate object
Another way to achieve
“Polymorphism”
CSCI 4448 / 6448
Object Oriented Analysis & Design
![Page 10: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/10.jpg)
Sequence Diagram
EventHandler
CSCI 4448 / 6448
Object Oriented Analysis & Design
![Page 11: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/11.jpg)
Demo Application
Desktop Database for Dr. Anderson to
manage the grades of the students in
the OOAD class
◦ Demonstrates the use of Windows Forms
and Controls
◦ Utilizes event handlers to trigger actions
based on control events
◦ Interacts with database to store and
import data
CSCI 4448 / 6448
Object Oriented Analysis & Design
![Page 12: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/12.jpg)
OO Concepts & Principles
Polymorphism◦ Inheritance hierarchy
Code to an interface◦ OnClick
DRY◦ Delegation
SRP◦ TextBox vs. TextBlock
OCP◦ New service eg. Pie Menus
LSP◦ EventHandlers
CSCI 4448 / 6448
Object Oriented Analysis & Design
![Page 13: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/13.jpg)
Conclusion / Evaluation
Advantages◦ Comprehensive form creation application
◦ Easy to learn and use with IDE
◦ Linkages to a broad framework provides robust tools and
features
Disadvantages◦ Proprietary nature hinders portability. Applications not Mac
or Linux compatible.
◦ MS resources increasingly more focused on web
◦ Framework imposes constraints on the application that
might not be encountered in a more open and sparser
architecture
CSCI 4448 / 6448
Object Oriented Analysis & Design
![Page 14: WINDOWS FORMS FRAMEWORK USING C#kena/classes/6448/f08/... · 2008. 10. 31. · USING C#.NET CSCI –4448 / 6448 ... An entrenched application in wide use with a substantial development](https://reader036.vdocuments.net/reader036/viewer/2022062509/610d7a51fcbd703cf96b8658/html5/thumbnails/14.jpg)
Questions??
CSCI 4448 / 6448
Object Oriented Analysis & Design