Sei sulla pagina 1di 5

3/14/2012

F5227VISUALBASIC.NET PROGRAMMING

CourseLearningOutcome(CLO)
Upon completion of this course, students should be able to : 1. Create a simpe VB.NET based application based on the Windows Application template. 2. Describe on essential terminology including memory, data types and graphical user interface interface. 3. Apply object oriented programming techniques to create classes, add methods and add properties. 4. create a simple VB.NET based Web forms application that uses an XML Web Service and manipulate data in database by using Microsoft ADO.NET.

Topic1.0 Introductionto.NETTechnology 1.1.1 Explainthe.NETFramework

CourseLearningOutcome:
Topic1.0 Describeonessentialterminologyincluding memory,datatypesandgraphicaluser interface.

.NETFramework
The.NETFrameworkistheinfrastructurefor thenewMicrosoft.NETPlatform. The.NETFrameworkisacommon environment for building deploying and forbuilding,deploying,and runningWebServicesandWebApplications.

The.NETFrameworkcontainscommonclass libraries likeADO.NET,ASP.NETandWindows Forms toprovideadvancedstandardservices thatcanbeintegratedintoavarietyof that can be integrated into a variety of computersystems.

The.NETFrameworkislanguageneutral. CurrentlyitsupportsC++,C#,VisualBasic, JScript(TheMicrosoftversionofJavaScript) andCOBOL. and COBOL Thirdpartylanguages likeEiffel,Perl,Python, Smalltalk,andothers willalsobeavailable forbuildingfuture.NETFramework applications.

3/14/2012

.NETFramework
ThenewVisualStudio.NETisacommon developmentenvironmentforthenew.NET Framework. It provides a feature rich application execution Itprovidesafeaturerichapplicationexecution environment,simplifieddevelopmentand easyintegrationbetweenanumberof differentdevelopmentlanguages.

LanguagesSupportedBy.NET

CommonTypeSystemandCLS
CLS(CommonLanguageSpecification) CompliantAttribute AsubsetofCommonTypeSystem

ASP.NETandWebForms
Assemblycanbetaggedwith[assembly: System.CLSCompliant(true)]Compilerissuesa warningifnoncomplianttypesareused. Solves the cross language access problem in Solvesthecrosslanguageaccessproblemin COM(e.gC++hastypesthatisnotsupported byVB) (Private)types,methodsmaystillbemarked with[CLSCompliant(false)]

3/14/2012

WindowsForms
Componentsneededtocreatewindowsapplications WIN32atlasthiddenwithrealOOP! VisualInheritance Samecontrolsusedfromalllanguages Consistentnamingofproperties,methodsandbehaviour!!!! Forms+Listboxes,Buttonsetc WIN32specific
BuildsprettymuchonintrinsicWIN32functionality Makesitdifficulttosupport.

DatabaseSupportin.NET
CreateyourdatabaseUseVisualStudioto createDatalinkandtypeddatasetoutofyour database. open OleDbConnection openOleDbConnection OleDbDataAdapterforSQLcommand Usetheadapter tofilloutyourcustom datasetwiththerequestedinformation Modifyyourdataset

DatabaseSupportin.NET
Createupdatecommandwiththe OleDbCommandBuilder Updatethedatabasewiththeadapter(given yourdataset) your dataset)

XMLSupport
XMLIsusedeverywhere Store/RetrieveDatasetsinXML XMLTextReader,XMLTextWriter XMLDataDocument
W3CDocumentObjectModel(DOM)

XMLNode XPath,XslTransform XMLSerialization

BaseClassLibrary
TheBaseClassLibraries(BCL)providesthe fundamentalbuildingblocksforany applicationyoudevelop,beitanASP.Net application,aWindowsFormsapplication,or application a Windows Forms application or aWebService. TheBCLgenerallyservesasyourmainpointof interactionwiththeruntime. BCLclassesinclude:

3/14/2012

Namespace
Namespace Description

CommonLanguageRuntime(CLR)
TheCommonLanguageRuntime(CLR) providesasolidfoundationfordevelopersto buildvarioustypesofapplications.

System System.CodeDom System.Collections System.Diagnostics System.Globalization System.IO System.Resources System.Text System.Text.RegularExpress ions

This namespace includes all the essential support you need for your programming, including base types (String, Int32, DateTime, Boolean, etc.), essential environmental support, and math functions, to name a few all the support necessary to be able to create code, and run it, on the fly The System.Collections namespace contains interfaces and classes that define various containers, such as lists, queues, bit arrays, hashtables and dictionaries. All the classes you need to diagnose your application, including event logging, performance counters, tracing, and process management APIs. This namespace includes fundamental support for Globalization, used throughout the rest of the Framework Includes fundamental Stream support which can be used by anyone, and then specifically targets the FileSystem (via File and Directory manipulation classes), SerialPorts, and Decompression Used to allow an application to be translated into multiple languages, and then display the appropriate text based upon the current users language selection This namespace includes support for encodings, and Stringbuilder This namespace includes regular expression support, for robust parsing and matching of string data

CLR
Whetheryou'rewritinganASP.Netapplication ,aWindowsFormsapplication,aWebService, amobilecodeapplication,adistributed application,oranapplicationthatcombines application or an application that combines severaloftheseapplicationmodels,heCLR providesthefollowingbenefitsforapplication developers:
Vastlysimplifieddevelopment Seamlessintegrationofcodewritteninvarious languages Evidence basedsecuritywithcodeidentity Evidencebased security with code identity AssemblybaseddeploymentthateliminatesDLLHell Sidebysideversioningofreusablecomponents Codereusethroughimplementationinheritance Automaticobjectlifetimemanagement Selfdescribingobjects

CLR
TheCLRistheexecutionenvironment providedbytheMicrosoft.NETFramework.It providesmanyservicessuchas:
Automaticgarbagecollection g g Codeaccesssecurity Simplifiedversioning Simpleandreliabledeployment Deepcrosslanguageinteroperability Debuggingacrossdifferentlanguages Performance Scalability

3/14/2012

CLR ManagedCode
BecausetheCLRmanagesthecodeexecution,allthe codethatistargetedfortheCLRisknownas managedcode. Managedcodeemitsmetadataalongwiththe executable. executable Thismetadataisusedtodescribethetypes(classes) andmembersusedinthecode,alongwithallthe externalreferencesusedinexecutingthecode. TheCLRusesthismetadatatoloadtheclassesduring executionandresolvemethodinvocationsduring runtime.

CLR GarbageCollector
TheCLRprovidesautomaticgarbagecollectionofthe objectsthathavebeenloadedintomemory. Allobjectsthatarecreatedviathenewoperatorare allocatedmemoryontheheap. Aprogramcanallocateasmanyobjectsasare requiredbytheprogramlogic. However,whenanobjectisnolongerrequired, theremustbesomemechanismtofreeupthe memorythatwasoccupiedbytheobject.

CLR GarbageCollector
TheGarbageCollectorcollectsallobjectsinmemorythat havenoreferences.Thisprogramrunsasalowprioritythread inthebackgroundprocessandcollectsallunreferenced objects. Becausememorymanagementisautomatic,thechancesfor Because memory management is automatic the chances for memoryleaksintheprogramareminimized. However,thetimewhengarbagecollectorwouldactually releasetheobjectsfromthememoryisnotknown. Thisconceptisknownasnondeterministicgarbagecollection becauseitcannotbedeterminedinadvancewhentheobjects wouldbereleasedfrommemory.

CLR Simplifieddeployment
Simplifieddeployment isoneofthefeaturesprovidedinthe .NETFramework. Themostimportantpointtomentionisthat.NETcomponents donotneedtoberegisteredintheWindows registry. All code generated in the NET Framework is self describing Allcodegeneratedinthe.NETFrameworkisselfdescribing becauseassembliescontainthemanifestandmetadata information. Thisinformationcontainsallthedataaboutthedependencies oftheassemblyandthespecificversionsofthecomponents thattheseassemblieswoulduseatexecutiontime;therefore, multipleversionsofthesamecomponentscancoexist.

CLR CrossLanguage
.NETFrameworkisdesignedforcross languagecompatibility. Crosslanguagecompatibilitymeans.NET componentscaninteractwitheachother components can interact with each other irrespectiveofthelanguagestheyarewritten in. ThisfeatureispossiblebecauseoftheCTSand CLS.

COM+Services

Potrebbero piacerti anche