Introducing .NETObjectives    In this lesson, you will learn to:         • Identify the types of application architectures...
Introducing .NETTypes of Application Architectures    •    The functions performed by an application can be divided into t...
Introducing .NETSingle-Tier Architecture    •    In single-tier architecture, a single executable file handles all functio...
Introducing .NETTwo-Tier Architecture    •    The two-tier architecture divides an application into the following two     ...
Introducing .NETThree-Tier Architecture    •    In three-tier architecture, all the three service layers reside separately...
Introducing .NETN-Tier Architecture    •    An n-tier application architecture is not restricted to a specific number of  ...
Introducing .NET.Net Initiative    •    The .NET initiative offers a complete suite for developing and deploying         a...
Introducing .NETComponents of the .NET Framework    •    The .NET Framework consists three main components. They are:     ...
Introducing .NETCommon Language Runtime(CLR)    •    The Common Language Runtime (CLR) is the environment where all progra...
Introducing .NETCommon Language Runtime(CLR)(Contd.)    •    Compilation and Execution of a .NET Application ©NIIT        ...
Introducing .NETCommon Language Runtime(CLR)(Contd.)    •    Features Provided by the CLR:           • Automatic memory ma...
Introducing .NETThe .NET Framework Base Classes orthe .NET Class Framework    •    The .NET Class Framework Class Library ...
Introducing .NETThe .NET Framework Base Classes orthe .NET Class Framework (Contd.)    •    The .NET Class Framework Class...
Introducing .NETUser and Program Interfaces    •    .NET provides three types of user interfaces:           • Windows Form...
Introducing .NETAdvantages of the .NET Framework    •    Consistent programming model    •    Multi-platform applications ...
Introducing .NETVisual Studio .NET IntegratedDevelopment Environment    •    The Visual Studio .NET Integrated Development...
Introducing .NETProjects and Solutions    •    In Visual Studio .NET, an application can be made up of one or more items, ...
Introducing .NETProjects and Solutions (Contd.)                                             The following diagram depicts ...
Introducing .NETCreating a Project in Visual Studio.NET    •    You can create a new project in Visual Studio .NET by clic...
Introducing .NETCreating a Project in Visual Studio.NET (Contd.)    •    In the New Project dialog box, the Project Types ...
Introducing .NET                                                                                                User Inter...
Introducing .NETUser Interface Elements of VisualStudio .NET IDE (Contd.)    •    In addition to the standard interface el...
Introducing .NETThe Start Page    When you start Visual Studio .NET by selecting Start  Programs  Microsoft    Visual St...
Introducing .NETWindows Form Designer    •    allows you to design the user interface for an application.    •    allows y...
Introducing .NETSolution Explorer Window    •    lists the solution name, the project name, and all the forms and modules ...
Introducing .NETThe Properties Window    •    displays the properties that are associated with an object.    •    is sorte...
Introducing .NETToolbox    •    The Toolbox displays the tabs Data, Component, Windows Forms,         Clipboard Ring, and ...
Introducing .NETThe Output Window    •    displays messages for the status of various features provided in the Visual     ...
Introducing .NETThe Task List Window    •    displays a list of errors along with the source (the file and the line number...
Introducing .NETThe Server Explorer Window    •    is a handy tool for various administrative tasks such as monitoring the...
Introducing .NETThe Dynamic Help Window    •    provides you with context-sensitive help.    •    is constantly updated to...
Introducing .NETThe Class View Window    •    displays the classes, methods, and properties associated with a particular  ...
Introducing .NETThe Code and Text Editor Window    •    allows you to enter and edit code and text.    •    You may use th...
Introducing .NETNavigational Features in Visual Studio.NET IDE    •    The Visual Studio .NET IDE also provides three navi...
Introducing .NETDocking    •    This feature allows you to place a window against any of the edges of the         parent w...
Introducing .NETTabbed navigation    •   In order to effectively organize the limited space available on the screen,      ...
Introducing .NETAuto hide    •    This feature automatically hides a window when it is not in use, thereby         clearin...
Introducing .NETIntroducing Visual Basic .NET    •    Visual Basic .NET is one of the languages that are directed towards ...
Introducing .NETSummaryIn this lesson, you learned that:     • Applications may vary from single-tier desktop applications...
Introducing .NETSummary (Contd.)    •    Microsoft has introduced the .NET initiative with the intention of bridging the  ...
Introducing .NETSummary (Contd.)         •     Security management         •     Type safety    •    The .NET Class Framew...
Introducing .NETSummary (Contd.)    •    An assembly stores all the information about itself. This information is called  ...
Introducing .NETSummary (Contd.)    •    To organize various items of an application efficiently, Visual Studio .NET has  ...
Introducing .NETSummary (Contd.)         •    Code and Text Editor window    •    In addition to various windows, the Visu...
Upcoming SlideShare
Loading in …5
×

Vb.net session 01

1,607 views
1,410 views

Published on

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,607
On SlideShare
0
From Embeds
0
Number of Embeds
67
Actions
Shares
0
Downloads
0
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Vb.net session 01

  1. 1. Introducing .NETObjectives In this lesson, you will learn to: • Identify the types of application architectures • Identify the components of the .NET Framework • List the advantages of the .NET Framework • Identify the components of the Visual Studio .NET Integrated Development Environment (IDE) • List the features of Visual Basic .NET ©NIIT Introduction to VB .NET Lesson 1A / Slide 1 of 44
  2. 2. Introducing .NETTypes of Application Architectures • The functions performed by an application can be divided into three categories: • User services provides interactive user interface. Therefore, it is also called presentation layer. • Business services ensures that the back-end does not receive incorrect data. • Data services comprises data and the functions for manipulating the data. • Each category is implemented as a layer in an application. • These three layers form the base of the models or architectures used in application development. • Applications may vary from single-tier desktop applications to multi-tier applications. ©NIIT Introduction to VB .NET Lesson 1A / Slide 2 of 44
  3. 3. Introducing .NETSingle-Tier Architecture • In single-tier architecture, a single executable file handles all functions relating to the user, business, and data service layers. • Single-tier applications are also called monolithic applications. ©NIIT Introduction to VB .NET Lesson 1A / Slide 3 of 44
  4. 4. Introducing .NETTwo-Tier Architecture • The two-tier architecture divides an application into the following two components: • Client: Implements the user interface • Server: Stores data • In the two-tier architecture, the business services layer may be implemented in one of the following ways: • By using fat client • By using fat server • By dividing the business services between the user services and the data services ©NIIT Introduction to VB .NET Lesson 1A / Slide 4 of 44
  5. 5. Introducing .NETThree-Tier Architecture • In three-tier architecture, all the three service layers reside separately, either on the same machine or on different machines. • The user interface interacts with the business logic. • The business logic validates the data sent by the interfaces and forwards it to the database if it conforms to the requirements. • The front-end only interacts with business logic, which, in turn, interacts with the database. ©NIIT Introduction to VB .NET Lesson 1A / Slide 5 of 44
  6. 6. Introducing .NETN-Tier Architecture • An n-tier application architecture is not restricted to a specific number of layers. • It has multiple servers handling business services. • The advantages of n-tier architecture are: • Extensibility • Resilience to change • Maintainability • Scalability • These applications serve organization-specific requirements. Therefore, most modern enterprise applications are based on the n-tier application architecture. ©NIIT Introduction to VB .NET Lesson 1A / Slide 6 of 44
  7. 7. Introducing .NET.Net Initiative • The .NET initiative offers a complete suite for developing and deploying applications. This suite consists of • .NET products: • Microsoft has introduced Visual Studio .NET IDE, which is a tool for developing .NET applications. • NET programming languages: Visual Basic, Visual C#, and Visual C++. • All .NET products use eXtensible Markup Language (XML) for describing and exchanging data between applications. • .NET services: • Web services: A Web service is an application or business logic that is accessible through standard Internet protocols such as HTTP and SOAP. • The .NET Framework: • It is a foundation for developing, designing and deploying applications. • It exists as a layer between .NET applications and the underlying operating system. ©NIIT Introduction to VB .NET Lesson 1A / Slide 7 of 44
  8. 8. Introducing .NETComponents of the .NET Framework • The .NET Framework consists three main components. They are: • Common Language Runtime (CLR) • The .NET Framework Base Classes • The user interface ©NIIT Introduction to VB .NET Lesson 1A / Slide 8 of 44
  9. 9. Introducing .NETCommon Language Runtime(CLR) • The Common Language Runtime (CLR) is the environment where all programs in .NET run. • The CLR can host a variety of languages and offer a common set of tools across languages, ensuring interoperability between the codes. • Presently, the premier languages for the CLR are Visual Basic, C# (C Sharp), and C++. • The applications created in the languages that target the CLR undergo Managed Code Execution Process. VB .NET Visual C# VB .NET Compiler VC# Compiler Microsoft Intermediate Language (MSIL) Common Language Runtime (CLR) Just in Time (JIT) Compilers Native Code ©NIIT Introduction to VB .NET Lesson 1A / Slide 9 of 44
  10. 10. Introducing .NETCommon Language Runtime(CLR)(Contd.) • Compilation and Execution of a .NET Application ©NIIT Introduction to VB .NET Lesson 1A / Slide 10 of 44
  11. 11. Introducing .NETCommon Language Runtime(CLR)(Contd.) • Features Provided by the CLR: • Automatic memory management • Standard type system • Language interoperability • Platform independence • Security management • Type safety ©NIIT Introduction to VB .NET Lesson 1A / Slide 11 of 44
  12. 12. Introducing .NETThe .NET Framework Base Classes orthe .NET Class Framework • The .NET Class Framework Class Library • is built on the object-oriented nature of the runtime. • provides classes that can be used in the code to accomplish a range of common programming tasks, such as string management, data collection, database connectivity, and file access. • can be used in a consistent manner across multiple languages. • comprises namespaces, which are contained within assemblies. ©NIIT Introduction to VB .NET Lesson 1A / Slide 12 of 44
  13. 13. Introducing .NETThe .NET Framework Base Classes orthe .NET Class Framework (Contd.) • The .NET Class Framework Class Library includes • Namespaces help you to • create logical groups of related classes and interfaces that can be used by any language targeting the .NET Framework. • avoid any naming conflicts between classes that have the same names. • Assembly • is a single deployable unit that contains all the information about the implementation of classes, structures, and interfaces. • stores all the information about itself. This information is called metadata. • provides the CLR with the information required for executing an application. • plays an important role in deployment and versioning. ©NIIT Introduction to VB .NET Lesson 1A / Slide 13 of 44
  14. 14. Introducing .NETUser and Program Interfaces • .NET provides three types of user interfaces: • Windows Forms: They are used in Windows-based applications • Web Forms: They are used in Web-based applications • Console Applications: They are used to create character-based console applications that can be executed from the command line. • .NET provides one program interface: • Web Services: They are used to communicate with remote components ©NIIT Introduction to VB .NET Lesson 1A / Slide 14 of 44
  15. 15. Introducing .NETAdvantages of the .NET Framework • Consistent programming model • Multi-platform applications • Multi-language integration • Automatic resource management • Ease of deployment ©NIIT Introduction to VB .NET Lesson 1A / Slide 15 of 44
  16. 16. Introducing .NETVisual Studio .NET IntegratedDevelopment Environment • The Visual Studio .NET Integrated Development Environment (IDE) • provides you with a common interface for developing various kinds of projects for the .NET Framework . • provides you with a centralized location for designing the user interface for the application, writing code, and compiling and debugging the application. • is available to all the programmers who use the languages in the Visual Studio .NET suite. • The components of the Visual Studio .NET IDE are: • Projects and Solutions • User Interface Elements of Visual Studio .NET IDE • Navigational Features in Visual Studio .NET IDE ©NIIT Introduction to VB .NET Lesson 1A / Slide 16 of 44
  17. 17. Introducing .NETProjects and Solutions • In Visual Studio .NET, an application can be made up of one or more items, such as files and folders. • To organize these items efficiently, Visual Studio .NET has provided two types of containers: Projects and Solutions. • Project • allows you to manage, build, and debug the items that make up an application • When you build a project, it usually results in the creation of an executable file (.exe) or a dynamic link library (.dll) also called the project output. • Solution • acts as a container for one or more projects. • allows you to work on multiple projects within the same instance of the Visual Studio .NET IDE. • allows you to specify settings and options that apply to multiple projects. ©NIIT Introduction to VB .NET Lesson 1A / Slide 17 of 44
  18. 18. Introducing .NETProjects and Solutions (Contd.)       The following diagram depicts a solution containing multiple projects:         Solution Project 1     Items     Project 1           Project 2   Project 2 Items     Miscellaneous Files     ©NIIT Introduction to VB .NET Lesson 1A / Slide 18 of 44
  19. 19. Introducing .NETCreating a Project in Visual Studio.NET • You can create a new project in Visual Studio .NET by clicking the New Project button on the Visual Studio Start Page or by clicking the File  New  Project option. • Then, the New Project dialog box is displayed, as shown in the following figure : ©NIIT Introduction to VB .NET Lesson 1A / Slide 19 of 44
  20. 20. Introducing .NETCreating a Project in Visual Studio.NET (Contd.) • In the New Project dialog box, the Project Types pane displays various categories of projects that can be created. You can create a Visual Basic project, a Visual C# project, or a Visual C++ project. • After you select a project type, the templates available for the selected project type are displayed in the Templates pane. ©NIIT Introduction to VB .NET Lesson 1A / Slide 20 of 44
  21. 21. Introducing .NET      User Interface Elements of VisualStudio .NET IDE Toolbox Menu Bar Windows Forms Designer Solution Explorer     Output Window Windows Form Properties Window ©NIIT Introduction to VB .NET Lesson 1A / Slide 21 of 44
  22. 22. Introducing .NETUser Interface Elements of VisualStudio .NET IDE (Contd.) • In addition to the standard interface elements found in the Windows environment, such as the menu bar and the toolbar, the Visual Studio .NET IDE contains other elements. They are: • The Start Page • Windows Forms Designer • The Solution Explorer Window • The Properties Window • Toolbox • The Output Window • The Task List Window • The Server Explorer Window • The Dynamic Help Window • The Class View Window • The Code and Text Editor Window ©NIIT Introduction to VB .NET Lesson 1A / Slide 22 of 44
  23. 23. Introducing .NETThe Start Page When you start Visual Studio .NET by selecting Start  Programs  Microsoft Visual Studio .NET 7.0  Microsoft Visual Studio .NET 7.0, it displays the Visual Studio .NET Start Page, as shown in the following figure: ©NIIT Introduction to VB .NET Lesson 1A / Slide 23 of 44
  24. 24. Introducing .NETWindows Form Designer • allows you to design the user interface for an application. • allows you to add controls to a form, arrange them as per your requirements, and add code to perform some action. • provides you with a rapid development solution for your application. ©NIIT Introduction to VB .NET Lesson 1A / Slide 24 of 44
  25. 25. Introducing .NETSolution Explorer Window • lists the solution name, the project name, and all the forms and modules that are used in the project. • Enables you to open a particular file existing in a project by double-clicking the file in the Solution Explorer window. The following figure depicts the Solution Explorer window: ©NIIT Introduction to VB .NET Lesson 1A / Slide 25 of 44
  26. 26. Introducing .NETThe Properties Window • displays the properties that are associated with an object. • is sorted by category, by default. • The toolbar available for the Properties window allows you to switch between the sort orders, By category and By alphabets. The following figure shows the Properties window displaying the properties of a form: ©NIIT Introduction to VB .NET Lesson 1A / Slide 26 of 44
  27. 27. Introducing .NETToolbox • The Toolbox displays the tabs Data, Component, Windows Forms, Clipboard Ring, and General. • At a time, the items from only a single tab are visible. Tab Each tab contains several items, as Item shown in the figure: ©NIIT Introduction to VB .NET Lesson 1A / Slide 27 of 44
  28. 28. Introducing .NETThe Output Window • displays messages for the status of various features provided in the Visual Studio .NET IDE. • can be opened by selecting View  Other Windows  Output or by pressing the CTRL, ALT, and O keys simultaneously. The following figure shows the Output window: ©NIIT Introduction to VB .NET Lesson 1A / Slide 28 of 44
  29. 29. Introducing .NETThe Task List Window • displays a list of errors along with the source (the file and the line number) of the error. • helps you identify and locate problems that are detected automatically as you edit or compile code. • can be opened by clicking View  Other Windows  Task List or by pressing CTRL, ALT, and K keys simultaneously. The following figure shows the Task List window: ©NIIT Introduction to VB .NET Lesson 1A / Slide 29 of 44
  30. 30. Introducing .NETThe Server Explorer Window • is a handy tool for various administrative tasks such as monitoring the performance of other machines on a network, and locating and connecting to the various servers on the network. • enables you to view the resources of the servers, such as services, processes, and the event log. • can be opened by selecting View  Server Explorer. ©NIIT Introduction to VB .NET Lesson 1A / Slide 30 of 44
  31. 31. Introducing .NETThe Dynamic Help Window • provides you with context-sensitive help. • is constantly updated to display the links to the help topics on the current control, component, or keyword. • can be opened by selecting Help  Dynamic Help from the menu bar or by pressing the CTRL and F1 keys simultaneously. The following figure depicts the Dynamic Help window: ©NIIT Introduction to VB .NET Lesson 1A / Slide 31 of 44
  32. 32. Introducing .NETThe Class View Window • displays the classes, methods, and properties associated with a particular file. • can be opened either by selecting View  Class View or by pressing the CTRL, SHIFT, and C keys simultaneously. When you double-click one of the items in the Class View window, it brings up the Code Editor window for that item, making it convenient to move through the code in the project. The following figure shows the Class View window: ©NIIT Introduction to VB .NET Lesson 1A / Slide 32 of 44
  33. 33. Introducing .NETThe Code and Text Editor Window • allows you to enter and edit code and text. • You may use this window to • add code for your form. • create different types of files, such as text files and XML documents. In such a case, this window is called the Text Editor window. The following figure shows the Code Editor window: ©NIIT Introduction to VB .NET Lesson 1A / Slide 33 of 44
  34. 34. Introducing .NETNavigational Features in Visual Studio.NET IDE • The Visual Studio .NET IDE also provides three navigational features. These are: • Docking • Tabbed navigation • Auto hide ©NIIT Introduction to VB .NET Lesson 1A / Slide 34 of 44
  35. 35. Introducing .NETDocking • This feature allows you to place a window against any of the edges of the parent window. • You can make a window dockable by right-clicking the title bar of the window and checking the Dockable option from the shortcut menu. The following figure depicts the Toolbox docked against the left edge of the main window: ©NIIT Introduction to VB .NET Lesson 1A / Slide 35 of 44
  36. 36. Introducing .NETTabbed navigation • In order to effectively organize the limited space available on the screen, Visual Studio .NET overlaps various open windows and provides tabs for navigating from one window to another. • This feature also provides ease in navigation. Consider the following figure: In the figure, the Properties window has overlapped the Dynamic Help window. ©NIIT Introduction to VB .NET Lesson 1A / Slide 36 of 44
  37. 37. Introducing .NETAuto hide • This feature automatically hides a window when it is not in use, thereby clearing the area occupied by the window. • To enable this feature, you need to right-click the title bar of the window and check the Auto Hide option in the shortcut menu. The following figure depicts the Toolbox window after the Auto Hide feature is enabled: When you want to use the Toolbox, you can view it by simply pointing to it. ©NIIT Introduction to VB .NET Lesson 1A / Slide 37 of 44
  38. 38. Introducing .NETIntroducing Visual Basic .NET • Visual Basic .NET is one of the languages that are directed towards meeting the objectives of the .NET initiative of creating distributed applications. • The key features introduced in Visual Basic .NET are as follows: • Inheritance • Constructors and destructors • Overloading • Overriding • Structured exception handling • Multithreading ©NIIT Introduction to VB .NET Lesson 1A / Slide 38 of 44
  39. 39. Introducing .NETSummaryIn this lesson, you learned that: • Applications may vary from single-tier desktop applications (applications that follow the single-tier architecture) to multi-tier applications (applications that follow the two-, three-, or n-tier architecture). • In the case of single-tier architecture, a single executable file handles all functions relating to the user, business, and data service layers. • In the case of two-tier architecture, the user and data services are located separately, either on the same machine or on separate machines. • In the case of three-tier architecture, all the three service layers reside separately, either on the same machine or on different machines. • An n-tier application uses business objects for handling business rules and data access. It has multiple servers handling business services. • Most modern enterprise applications are based on the n-tier application architecture. • In the current scenario, although applications serve organization-specific requirements, they are not interoperable. ©NIIT Introduction to VB .NET Lesson 1A / Slide 39 of 44
  40. 40. Introducing .NETSummary (Contd.) • Microsoft has introduced the .NET initiative with the intention of bridging the gap in interoperability between applications. • The .NET initiative aims at integrating various programming languages and services. • The .NET initiative offers a complete suite of products and services for developing and deploying applications. In addition, it also provides the .NET Framework, which encapsulates the basic functionality, such as garbage collection, debugging, and security services, that was earlier built into various programming languages. • The Common Language Runtime (CLR) or the runtime provides functionality such as exception handling, security, debugging and versioning support to any language that targets it. • Some of the features provided by the CLR are as follows: • Automatic memory management • Standard type system • Language Interoperability • Platform independence ©NIIT Introduction to VB .NET Lesson 1A / Slide 40 of 44
  41. 41. Introducing .NETSummary (Contd.) • Security management • Type safety • The .NET Class Framework consists of a class library that works with any .NET language, such as Visual Basic .NET and C#. • The .NET Framework class library is built on the object-oriented nature of the runtime. It provides classes that can be used in managed code to accomplish a range of common programming tasks, such as string management, data collection, database connectivity, and file access. • The .NET Framework class library can be used in a consistent manner across multiple languages and platforms. • The .NET Framework class library consists of namespaces that are contained within assemblies. • A namespace helps you to create logical groups of related classes and interfaces that can be used by any language targeting the .NET Framework. • An assembly is a single deployable unit that contains all the information about the implementation of classes, structures, and interfaces. ©NIIT Introduction to VB .NET Lesson 1A / Slide 41 of 44
  42. 42. Introducing .NETSummary (Contd.) • An assembly stores all the information about itself. This information is called metadata and includes the name and version number of the assembly, security information, information about the dependencies, and a list of the files that constitute an assembly. • The user interfaces in .NET Framework comprise Windows Forms, Web Forms and console applications. • Windows Forms, Web Forms and Console applications pertain to the presentation layer of an application. • Windows Forms are used in Windows-based applications for providing an interactive user interface. • Web Forms are used in Web applications for accepting user input and displaying data. • Console applications can be executed from the command line. • The Visual Studio .NET Integrated Development Environment (IDE) provides you with a common interface for developing Windows and Web applications. • The IDE provides you with a centralized location for designing the user interface for the application, writing code, and compiling and debugging the application. ©NIIT Introduction to VB .NET Lesson 1A / Slide 42 of 44
  43. 43. Introducing .NETSummary (Contd.) • To organize various items of an application efficiently, Visual Studio .NET has provided two types of containers: projects and solutions. • A project typically contains items that are interrelated. It allows you to manage, build, and debug the items that make up an application. • A solution usually acts as a container for one or more projects. It allows you to work on multiple projects within the same instance of Visual Studio .NET IDE. A solution also allows you to specify the settings and options that apply to multiple projects. • Some of the components of the Visual Studio .NET IDE are as follows: • The Windows Forms Designer • The Solution Explorer window • The Properties window • The Toolbox • The Server Explorer window • The Output window • The Dynamic Help window ©NIIT Introduction to VB .NET Lesson 1A / Slide 43 of 44
  44. 44. Introducing .NETSummary (Contd.) • Code and Text Editor window • In addition to various windows, the Visual Studio .NET IDE also provides three navigational features. These are: • Docking • Tabbed navigation • Auto hide • Visual Basic .NET is one of the languages that are directed towards meeting the objectives of the .NET initiative for creating distributed applications. • Some of the key features introduced in Visual Basic .NET are as follows: • Inheritance • Constructors and destructors • Overloading • Overriding • Structured exception handling • Multithreading ©NIIT Introduction to VB .NET Lesson 1A / Slide 44 of 44

×