To Know .Net is to know the .NET Framework
1. To Know .Net is to know the .NET Framework
Class Libraries = Objects called in all languages
A. Think of boxes with functions in them
B. {} = a namespace, just a box.
2. What is a class?
A. Think of a small box with a name
1. You create a instance of that name and you get all the cool stuff in the box
B. There are thousands of classes.
3. What is a Namespace: A box with other namespaces &/or classes in it.
A. Easy concept. Big box with smaller boxes with smaller boxes.
B. Each bigger box is a namespace.
4. Namespace rules
A. To use a namespace it must be referenced
1. In Solution Explorer note the Reference heading
B. Next you must refer to the specific object by it’s full name
1. Dim dr as new System.Data.SqlClient.SqlDataReader
2. That’s the System namespace with the Data namespace etc etc
C. But you can use the imports statement at the top of page as a short cut
1. Imports System.Data.SqlClient
2. ….
3. Dim dr as new SqlDataReader
D. VB .NET projects has some implicit imports (built in imports)
1. Right click on a project . properties . imports.
5. Memory Management
A. In .NET =nothing means you don’t need it but it will not kill it until the Garbage collector comes along
1. Non Deterministic finalization
2. Marks for Garbage of collection
B. Bottom line. .NET will clean up your objects…BUT
1. ds.dispose (dispose method) is a nice touch.
6. System.Data Namespace work with data
A. Data access is built into the .NET framework (referred to ADO.Net)
B. System.Data.SQLClient = manage connections to SQL server 7+
1. or System.Data.SQLClient = manage connections to other OLE DB providers (old way outside the CLR managed environment)
2. .DataAdapter= “plug into the database”
C. System.Data = manage data in memory (ie disconnected)
1. .DataSet = in memory database (XML) with one or more datatables
2. (DataReader…one time firehose)
a) .DataView = sort and filter a datatable
b) .DataTable = collection of DataRows
D. Passing thought…DataSet is also our XML parsing tool.
E. See Data Example
7. System.Web.Services: B to B (application to application)
A. Old Days…to execute calls in other apps = ActiveX & DCOM
1. But DCOM is binary. Doesn’t make it through firewalls
a) Supported only on Windows platform
B. New Days … Expose “service” as XML Web Service
1. Call & Response in XML text…all platforms
C. Web Services can be consumed (cool term) by
1. Windows app, Web app, cell phone,
D. File . New . Web Service
E. The key to a Web Service is Public Function …
F. This function can be called from any “consumer”.
1. And will return the results in XML format that any consumer can understand
G. Build . Build solution creates the .DLL
Class Libraries = Objects called in all languages
A. Think of boxes with functions in them
B. {} = a namespace, just a box.
2. What is a class?
A. Think of a small box with a name
1. You create a instance of that name and you get all the cool stuff in the box
B. There are thousands of classes.
3. What is a Namespace: A box with other namespaces &/or classes in it.
A. Easy concept. Big box with smaller boxes with smaller boxes.
B. Each bigger box is a namespace.
4. Namespace rules
A. To use a namespace it must be referenced
1. In Solution Explorer note the Reference heading
B. Next you must refer to the specific object by it’s full name
1. Dim dr as new System.Data.SqlClient.SqlDataReader
2. That’s the System namespace with the Data namespace etc etc
C. But you can use the imports statement at the top of page as a short cut
1. Imports System.Data.SqlClient
2. ….
3. Dim dr as new SqlDataReader
D. VB .NET projects has some implicit imports (built in imports)
1. Right click on a project . properties . imports.
5. Memory Management
A. In .NET =nothing means you don’t need it but it will not kill it until the Garbage collector comes along
1. Non Deterministic finalization
2. Marks for Garbage of collection
B. Bottom line. .NET will clean up your objects…BUT
1. ds.dispose (dispose method) is a nice touch.
6. System.Data Namespace work with data
A. Data access is built into the .NET framework (referred to ADO.Net)
B. System.Data.SQLClient = manage connections to SQL server 7+
1. or System.Data.SQLClient = manage connections to other OLE DB providers (old way outside the CLR managed environment)
2. .DataAdapter= “plug into the database”
C. System.Data = manage data in memory (ie disconnected)
1. .DataSet = in memory database (XML) with one or more datatables
2. (DataReader…one time firehose)
a) .DataView = sort and filter a datatable
b) .DataTable = collection of DataRows
D. Passing thought…DataSet is also our XML parsing tool.
E. See Data Example
7. System.Web.Services: B to B (application to application)
A. Old Days…to execute calls in other apps = ActiveX & DCOM
1. But DCOM is binary. Doesn’t make it through firewalls
a) Supported only on Windows platform
B. New Days … Expose “service” as XML Web Service
1. Call & Response in XML text…all platforms
C. Web Services can be consumed (cool term) by
1. Windows app, Web app, cell phone,
D. File . New . Web Service
E. The key to a Web Service is
F. This function can be called from any “consumer”.
1. And will return the results in XML format that any consumer can understand
G. Build . Build solution creates the .DLL
<< Home