Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fundamentals of.NET NYU-SCPS. Session 7 MS Certification Exams in brief MS Certification Exams in brief Custom Attributes Custom Attributes More on Collections.

Similar presentations


Presentation on theme: "Fundamentals of.NET NYU-SCPS. Session 7 MS Certification Exams in brief MS Certification Exams in brief Custom Attributes Custom Attributes More on Collections."— Presentation transcript:

1 Fundamentals of.NET NYU-SCPS

2 Session 7 MS Certification Exams in brief MS Certification Exams in brief Custom Attributes Custom Attributes More on Collections More on Collections Additional Types with Examples Additional Types with Examples Generics with Examples Generics with Examples More on Streams More on Streams Detailed Socket example Detailed Socket example More on protocol clients and listeners with examples More on protocol clients and listeners with examples Building Windows Applications Building Windows Applications Creating a Simple Windows Form Creating a Simple Windows Form Using the Visual Studio.NET Designer Using the Visual Studio.NET Designer Creating a Windows Forms Application Creating a Windows Forms Application Populating the TreeView Controls Populating the TreeView Controls Handling TreeView events Handling TreeView events Deployment Projects Deployment Projects Setup Project Setup Project

3 Microsoft Certifications Technology Specialist 70-536.NET Framework 2.0 Application Development Foundation 70-526.NET Framework 2.0 Windows Based Applications 70-528.NET Framework 2.0 Web Based Applications 70-529.NET Framework 2.0 Web Based Applications

4 70-536 – App Development Foundation Developing applications that use system types and collections (15%) Developing applications that use system types and collections (15%) Implementing service processes, threading, and application domains in a.NET Framework application (11%) Implementing service processes, threading, and application domains in a.NET Framework application (11%) Embedding configuration, diagnostic, management, and installation features into a.NET Framework application (14%) Embedding configuration, diagnostic, management, and installation features into a.NET Framework application (14%) Implementing serialization and input/output functionality in a.NET Framework application (18%) Implementing serialization and input/output functionality in a.NET Framework application (18%) Improving the security of the.NET Framework applications by using the.NET Framework 2.0 security features (20%) Improving the security of the.NET Framework applications by using the.NET Framework 2.0 security features (20%) Implementing interoperability, reflection, and mailing functionality in a.NET Framework application (11%) Implementing interoperability, reflection, and mailing functionality in a.NET Framework application (11%) Implementing globalization, drawing, and text manipulation functionality in a.NET Framework application (11%) Implementing globalization, drawing, and text manipulation functionality in a.NET Framework application (11%)

5 70-526 – Windows Based Applications Creating a UI for a Windows Forms Application by Using Standard Controls Creating a UI for a Windows Forms Application by Using Standard Controls Integrating Data in a Windows Forms Application Integrating Data in a Windows Forms Application Implementing Printing and Reporting Functionality in a Windows Forms Application Implementing Printing and Reporting Functionality in a Windows Forms Application Enhancing Usability Enhancing Usability Implementing Asynchronous Programming Techniques to Improve the User Experience Implementing Asynchronous Programming Techniques to Improve the User Experience Developing Windows Forms Controls Developing Windows Forms Controls Configuring and Deploying Applications Configuring and Deploying Applications

6 70-528 – Web Based Applications Creating and Programming a Web Application Creating and Programming a Web Application Integrating Data in a Web Application by Using ADO.NET, XML, and Data-Bound Controls Integrating Data in a Web Application by Using ADO.NET, XML, and Data-Bound Controls Creating Custom Web Controls Creating Custom Web Controls Tracing, Configuring, and Deploying Applications Tracing, Configuring, and Deploying Applications Customizing and Personalizing a Web Application Customizing and Personalizing a Web Application Implementing Authentication and Authorization Implementing Authentication and Authorization Creating ASP.NET Mobile Web Applications Creating ASP.NET Mobile Web Applications

7 70-529 – Distributed Applications Creating and Accessing XML Web Services Creating and Accessing XML Web Services Configuring and Customizing a Web Service Application Configuring and Customizing a Web Service Application Creating, Configuring, and Deploying Remoting Applications Creating, Configuring, and Deploying Remoting Applications Implementing Asynchronous Calls and Remoting Events Implementing Asynchronous Calls and Remoting Events Implementing Web Services Enhancements (WSE) 3.0 Implementing Web Services Enhancements (WSE) 3.0 Creating and Accessing a Serviced Component and Using Message Queuing Creating and Accessing a Serviced Component and Using Message Queuing

8 Custom Attributes Programmers can define custom attributes for their “targets” and use them in their programs Programmers can define custom attributes for their “targets” and use them in their programs These attributes may be discovered at run time by class methods These attributes may be discovered at run time by class methods Attribute target is defined with the Attribute class definition – which may be one of – All, Assebly, Class, Constructor, Delegate, Enum, Event, Field, Interface, Method, Module, Parameter, Property, ReturnValue, or Struct Attribute target is defined with the Attribute class definition – which may be one of – All, Assebly, Class, Constructor, Delegate, Enum, Event, Field, Interface, Method, Module, Parameter, Property, ReturnValue, or Struct Attributes are not inherited Attributes are not inherited Attributes do not occupy any storage space in the heap with class data members – instead they are stored in the “metadata” section of the Assembly and are retrieved using Reflection API Attributes do not occupy any storage space in the heap with class data members – instead they are stored in the “metadata” section of the Assembly and are retrieved using Reflection API

9 197 198 199 200 201 202 Arrays Fast random access Insertions will require moving memory Deletions will require moving memory Size is predetermined Extending will require moving memory Data is arranged using simple indexing algorithm Characteristics Scheme

10 Lists Slow random access Insertions are quick Deletions are quick Size is unlimited Can extend endlessly 197198199200201202 headtail SchemeCharacteristics Data is arranged using pointers. Head points to the first element and Tail points to last Next in each node points to the next element

11 100 200 Hash Set Quite fast random access Insertions are quick Deletions are quick Size is Unlimited Extending will not require moving memory 197198199 200201202203 Characteristics Scheme Data is arranged using buckets. HashCode determines bucket Equals determines “match” Cannot have duplicate values in this “set” hash codes

12 100 200 Hash Table Quite fast random access Insertions are quick Deletions are quick Size is Unlimited Extending will not require moving memory key197key198key199 key200key201key202key203 Characteristics Scheme Data is arranged using buckets. HashCode of key determines bucket Equals of key determines “match” Cannot have duplicate “keys” Value hangs off of keys and can be duplicated key hash codes value197value198value199 value200value201value202value203

13 More Collection Classes Concrete Collection classes Concrete Collection classes ArrayList, Hashtable, Queue, SortedList, Stack ArrayList, Hashtable, Queue, SortedList, Stack Specialized Collections Specialized Collections ListDictionary – implements Dictionary using a singly linked list ListDictionary – implements Dictionary using a singly linked list HybridDictionary – uses ListDictionary for small collections (of up to 10 items) and switches to a Hashtable for a large collection HybridDictionary – uses ListDictionary for small collections (of up to 10 items) and switches to a Hashtable for a large collection StringDictionary – implements Dictionary where both key and value are strings instead of Objects StringDictionary – implements Dictionary where both key and value are strings instead of Objects NameValueCollection – represents a collection of “case insensitive” String keys and String values that may be accessed by key or by index NameValueCollection – represents a collection of “case insensitive” String keys and String values that may be accessed by key or by index Concrete Generics Concrete Generics Collection, Comparer, Dictionary, List, Queue, SortedDictionary, Stack, LinkedList, ReadOnlyCollection Collection, Comparer, Dictionary, List, Queue, SortedDictionary, Stack, LinkedList, ReadOnlyCollection

14 Network Examples Socket Server Socket Server Socket Client Socket Client HttpListener HttpListener MailClient MailClient

15 System.Windows.Forms Core infrastructure: Types that represent the core operations of a.NET Forms program ( Form, Application, etc.) Core infrastructure: Types that represent the core operations of a.NET Forms program ( Form, Application, etc.) Controls: Types used to create rich UIs ( Button, ProgressBar, DataGridView etc.) Controls: Types used to create rich UIs ( Button, ProgressBar, DataGridView etc.) Components: Types that do not directly derive from “Control” but provide visual features ( ToolTip, Timer, etc.) Components: Types that do not directly derive from “Control” but provide visual features ( ToolTip, Timer, etc.) Common dialog boxes: Number of canned dialog boxes for common operations ( OpenFileDialog, PrintDialog, etc.) Common dialog boxes: Number of canned dialog boxes for common operations ( OpenFileDialog, PrintDialog, etc.)

16 Classes/Types Application, Form Application, Form Button, CheckBox, ComboBox, DateTimePicker, ListBox, LinkLabel, MaskedTextBox, MonthCalendar, PictureBox, TreeView Button, CheckBox, ComboBox, DateTimePicker, ListBox, LinkLabel, MaskedTextBox, MonthCalendar, PictureBox, TreeView FlowLayoutPanel, TableLayoutPanel FlowLayoutPanel, TableLayoutPanel ColorDialog, OpenFileDialog, SaveFileDialog, FontDialog, PrintPreviewDialog, FolderBrowserDialog ColorDialog, OpenFileDialog, SaveFileDialog, FontDialog, PrintPreviewDialog, FolderBrowserDialog Menu, MainMenu, MenuItem, ContextMenu, MenuStrip, ContextMenuStrip Menu, MainMenu, MenuItem, ContextMenu, MenuStrip, ContextMenuStrip StatusBar, Splitter, ToolBar, ScrollBar, StatusStrip, ToolStrip StatusBar, Splitter, ToolBar, ScrollBar, StatusStrip, ToolStrip

17 Building Windows Apps Derive a new class from System.Windows.Forms.Form Derive a new class from System.Windows.Forms.Form Call Application.Run with an instance of this Form Call Application.Run with an instance of this Form namespace FormExample { public class MainWindow : Form { } public class Program { static void Main() { Application.Run(new MainWindow()); }

18 Application class Defines static members that allow you to control various behaviors of a Windows Forms application. Defines static members that allow you to control various behaviors of a Windows Forms application. Defines a number of properties Defines a number of properties Defines various events and their handlers such as ApplicationExit, Idle etc. Defines various events and their handlers such as ApplicationExit, Idle etc.

19 Form class Defines static members that allow you to control various behaviors of a Windows Forms application. Defines static members that allow you to control various behaviors of a Windows Forms application. Defines a number of properties Defines a number of properties Defines various events and their handlers such as ApplicationExit, Idle etc. Defines various events and their handlers such as ApplicationExit, Idle etc. Can be used to create standard, tool, borderless, and floating windows. Can be used to create standard, tool, borderless, and floating windows. The multiple-document interface (MDI) form can contain other forms called MDI child forms The multiple-document interface (MDI) form can contain other forms called MDI child forms Contains properties to determine the appearance, size, color and other window management features of the window or dialog box. Contains properties to determine the appearance, size, color and other window management features of the window or dialog box.

20 Control Class Base class of controls such as Button, CheckBox etc Base class of controls such as Button, CheckBox etc Implements basic functionality required to display information to the user. Implements basic functionality required to display information to the user. Handles user input through keyboard and and mouse. Handles user input through keyboard and and mouse.

21 Events in Form class Several events are fired in the process of loading and creating a form Several events are fired in the process of loading and creating a form Load event is fired after the Form is created Load event is fired after the Form is created Activated and Deactivated events are fired when the form goes in (and out of) focus Activated and Deactivated events are fired when the form goes in (and out of) focus Closing event is fired when the user tries to close the form Closing event is fired when the user tries to close the form

22 Menus MenuStrip is the main control for building menus which may be fixed or floating MenuStrip is the main control for building menus which may be fixed or floating ToolStripMenuItem represents a menu item contained in MenuStrip ToolStripMenuItem represents a menu item contained in MenuStrip ToolStripComboBox is combo box embedded in the menu ToolStripComboBox is combo box embedded in the menu ToolStripSeparator is a simple line separator ToolStripSeparator is a simple line separator ToolStripTextBox is a text box embedded in a menu item ToolStripTextBox is a text box embedded in a menu item

23 Build GridExample Application


Download ppt "Fundamentals of.NET NYU-SCPS. Session 7 MS Certification Exams in brief MS Certification Exams in brief Custom Attributes Custom Attributes More on Collections."

Similar presentations


Ads by Google