Bryan Jenks Integrated Ideas 2005 Visual Basic NET
Bryan Jenks Integrated Ideas © 2005 Visual Basic. NET A look into the. NET Programming Model
VB. NET Programming and the. NET Architecture Planning and Designing for. NET Object Oriented Programming Concepts Advanced Programming Concepts More Advanced Programming Concepts Data Access Using ADO. NET Testing and Debugging in. NET The. NET Framework Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture Planning and Designing for. NET l Programming Language Hierarchy l The. NET Infrastructure l. NET Project Types l Designing for. NET l Application Design Issues Bryan Jenks - Integrated Ideas © 2005
Language Hierarchy Machine Code Assembly Compiler Un-managed Code Runtime Engine (JIT) Intermediate Language Compiler Managed Code Bryan Jenks - Integrated Ideas © 2005
. NET Infrastructure VB C# VJ# Portable Executable Application Manifest MSIL CLR. NET Framework Bryan Jenks - Integrated Ideas © 2005
ASP. NET Architecture Bryan Jenks - Integrated Ideas © 2005
. NET Projects Windows Application l Web Application l Class Library l Windows Service l Web Service l Control Libraries l Setup and Deployment l Bryan Jenks - Integrated Ideas © 2005
Designing for. NET l Standalone Architecture l l Single PE Three-Tier Architecture Presentation Tier l Business Logic Tier l Data Tier l l N-Tier Architecture Web services l Mobile Applications l Bryan Jenks - Integrated Ideas © 2005
Design Issues Code Reuse l Scalability l Maintainability l Performance l Security l Durability l Integration and Interoperability l Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture Planning and Designing for. NET Object Oriented Programming Concepts Advanced Programming Concepts More Advanced Programming Concepts Data Access Using ADO. NET Testing and Debugging in. NET The. NET Framework Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture Object Oriented Programming Concepts l Object Oriented Programming l Objects vs. Structures l Methods, Events, and Properties l Overloading l Interfaces and Inheritance Bryan Jenks - Integrated Ideas © 2005
Object Oriented Programming l Objects l Abstraction l Encapsulation l Polymorphism l Inheritance Bryan Jenks - Integrated Ideas © 2005
Object Components The Object l Data Members l Properties l l Behavior Methods l Events l Bryan Jenks - Integrated Ideas © 2005
Objects vs. Structures Objects l l l l Structures Members Properties Events Methods Instantiation Interfaces Inheritance l l l Members Properties Methods Bryan Jenks - Integrated Ideas © 2005
Objects vs. Structures Public Structure Person Public Appendages As Integer Public Male As Boolean Public Eye. Color As Color End Structure Public Class Person Public Appendages As Integer Public Male As Boolean Public Eye. Color As Color End Class Bryan Jenks - Integrated Ideas © 2005
Methods Public Class Person Private Sub set. Baby() ' Baby is born End Sub Private Function get. Baby() As Person ' Baby is returned Return New Person End Function End Class Bryan Jenks - Integrated Ideas © 2005
Events Public Class Person Public Event Birth(By. Val Birtday As Date) Private Sub get. Baby() ' Baby is born Raise. Event Birth(Now) End Sub End Class Bryan Jenks - Integrated Ideas © 2005
Properties Public Class Person Private my. Appendages As Integer Public Property Appendages() As Integer Get Return my. Appendages End Get Set(By. Val value As Integer) my. Appendages = value End Set End Property End Class Bryan Jenks - Integrated Ideas © 2005
Overloading Public Class Person Private Sub Feed(Food as Integer) ' Person is fed food End Sub Private Sub Feed(Crap as Double) ' Person is fed crap End Sub End Class Bryan Jenks - Integrated Ideas © 2005
Interfaces and Inheritance Interfaces Enforces Design l Ensures Compatibility l Inheritance Provides Coupling l Enables Code Reuse l [demonstration] Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture Planning and Designing for. NET Object Oriented Programming Concepts Advanced Programming Concepts More Advanced Programming Concepts Data Access Using ADO. NET Testing and Debugging in. NET The. NET Framework Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture Advanced Programming Concepts l Variables l Scope l Arrays l Collections Object Passing and Optional Parameters l Inheritance Control l l Overrides l Shadows Bryan Jenks - Integrated Ideas © 2005
Variable Scope Dim l Protected (Module Level Access) l Private (Base Class Level Access) l Public (Project Level) l Friend (Assembly Level) l Static l Shared l Bryan Jenks - Integrated Ideas © 2005
Arrays and Collections Array l Size l Item(Index) Collection l Size l Item(Index) l Item(Key) l Add(Item) l Remove(Item) l Contains(Item) [Array and collection demonstration] Bryan Jenks - Integrated Ideas © 2005
Object Passing and Parameters Object Passing l By. Ref l By. Val Optional Parameters l Keyword: Optional l = [Default Value] Bryan Jenks - Integrated Ideas © 2005
Inheritance Control Overrides l Replaces inherited member with permission Shadows l Masks inherited member [Inheritance Control demonstration] Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture Planning and Designing for. NET Object Oriented Programming Concepts Advanced Programming Concepts More Advanced Programming Concepts Data Access Using ADO. NET Testing and Debugging in. NET The. NET Framework Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture More Advanced Programming Concepts l Threading l Delegates l Exception Handling l Types of Errors l Unstructured Handling l Structured Handling l Raising and Throwing Exceptions Bryan Jenks - Integrated Ideas © 2005
Threading Application Threading Concepts l The application thread l System. Threading Namespace l Thread. Kill, Sleep, Suspend l Threading Issues Dangling Threads l Synchronization l Thread Safety l Bryan Jenks - Integrated Ideas © 2005
Delegates Process Flow Delegation l The Delegate Keyword l Delegate Declaration l The Address. Of keyword l Multicasting l System. Delegate. Combine Bryan Jenks - Integrated Ideas © 2005
Exception Handling Types of Errors l Syntax Errors l Logic Errors l Runtime Errors Bryan Jenks - Integrated Ideas © 2005
Unstructured Exception Handling l l On Error Goto [location] On Error Resume Next Benefits l Easy to read l Simple to implement Drawbacks l Difficult to troubleshoot l Poorly structured Bryan Jenks - Integrated Ideas © 2005
Structured Exception Handling l l The Err Object Try, End Try Catch Finally Benefits l Structured l Reliable Drawbacks l Complicated l Requires Planning Bryan Jenks - Integrated Ideas © 2005
Structured Exception Handling Throwing Exceptions l The Exception Class l Throw [Exception] Raising Errors l The error handling heirarchy l Err. Raise Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture Planning and Designing for. NET Object Oriented Programming Concepts Advanced Programming Concepts More Advanced Programming Concepts Data Access Using ADO. NET Testing and Debugging in. NET The. NET Framework Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture Data Access Using ADO. NET l Database Concepts l Data Connections l Data Adaptors l Datasets l Data Readers Bryan Jenks - Integrated Ideas © 2005
Database Concepts Flat Databases l Text Files l DBF, DB 4, DB 5 l COBOL Relational Databases l MS Access l SQL Server l Oracle Bryan Jenks - Integrated Ideas © 2005
Database Concepts Database Components l Tables l Relations l Constraints l Users l Stored Procedures l User Defined Types l Catalogs Bryan Jenks - Integrated Ideas © 2005
Data Access Components Data Adaptors l Data Connections l Datasets l Data Readers l Bryan Jenks - Integrated Ideas © 2005
Data Connections Data Connection Featues l Software Channel to Database l Propagates Authentication Criteria l Isolates Data Flow Data Connection Types l Ole. Db l ODBC l SQLClient Bryan Jenks - Integrated Ideas © 2005
Data Adaptors Functions of the Data Adaptor l Understanding the Database l Maintaining Query Objects l Maintaining Query Parameters l Retrieving and Updating Data Bryan Jenks - Integrated Ideas © 2005
Datasets Dataset Components l Data. Tables Data. Columns l Data. Rows l Relations l Constraints l XML Interpolation l Bryan Jenks - Integrated Ideas © 2005
Data. Readers Data. Reader Features l Operates in Connected Architecture l Live Data Stream l Low memory overhead Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture Planning and Designing for. NET Object Oriented Programming Concepts Advanced Programming Concepts More Advanced Programming Concepts Data Access Using ADO. NET Testing and Debugging in. NET The. NET Framework Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture Testing and Debugging in. NET l Breakpoints l Stepping Through Code l Step Into l Step Over l Step Out l Debugging Windows l Locals, Autos, and Watch l Call Stack and Threads l Immediate/Command Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture Planning and Designing for. NET Object Oriented Programming Concepts Advanced Programming Concepts More Advanced Programming Concepts Data Access Using ADO. NET Testing and Debugging in. NET The. NET Framework Bryan Jenks - Integrated Ideas © 2005
VB. NET Programming and the. NET Architecture The. NET Framework l Microsoft l System l IO l Text l Windows l Collections l Net l Security l Threading l Data l Web Bryan Jenks - Integrated Ideas © 2005
References l Designing VISUAL BASIC. NET Applications David Vitter – CORIOLIS l MSDN Online http: //msdn. microsoft. com l Wikipedia - Object-oriented programming http: //en. wikipedia. org/wiki/Object-oriented_programming
- Slides: 48