What Do You Want to Do with Visual Basic or Visual C#?
When designing your application, you may need help choosing between different technologies or approaches. This topic summarizes the choices and provides links to more information about rapid application development (RAD) with Visual Basic or C#. For more information about which language in Visual Studio to use, see Programming Languages.
What Do You Want to Do with Visual Basic or Visual C#?
Create a New Application
- Application - for help deciding between Windows Forms and Web Forms, see Windows Forms and Web Forms Recommendations
- Control - for more information, see Control Authoring for Windows Forms or Web User Controls and Web Custom Controls
- Command-line application - for details, see Console Application Template
- Windows service (formerly known as an "NT service") - a long-running Windows executable - for details, see Windows Service Applications
- XML Web service - XML Web services are applications that can exchange interoperable messages in a loosely coupled environment, using standard protocols such as HTTP, XML, XSD, SOAP and WSDL. XML Web services can be accessed from a Web application, a Windows desktop application, or another XML Web service - for details, see Programming the Web with XML Web Services
- .NET component - for details, see Component Authoring
For a step-by-step example, see Walkthrough: Creating a Distributed Application
For details, see Designing Distributed Applications
If you are targeting the browser on a cell phone, PDA (personal digital assistant), or pager, then use Mobile Web Forms - for details, see Creating ASP.NET Mobile Web Applications
Otherwise, use Web Forms - for details see Web Forms Pages
If you ...
- Are navigating between multiple, discrete tables of results ...
- Are manipulating data from multiple sources (for example, from different databases, from XML files, spreadsheets, and so on, all in the same dataset) ...
- Are exchanging data with other applications ...
- Are reusing the same set of rows and intend to cache them (for example, sorting, searching, and filtering cached results) ...
- Are doing a lot of processing per row ...
- Are manipulating the data using XML operations such as XML transforms or XPath ...
- Want ease of programming ...
Then use a dataset - for details, see ADO.NET Datasets
Otherwise, use direct access (data commands and data readers) - for details, see Performing Database Operations Directly.
For example, you would use data commands and data readers for:
- Performing DDL commands
- Performing updates or deletes based on a selection criteria
- Programmatically inserting records that are not based on user interaction
- Calling stored procedures to execute logic inside the server
- Retrieving scalar values from the database
- Processing a set of results in a forward only manner without updating and without caching the results
- Processing a set of results too large to fit in memory
For details, see Web Data Access Strategy Recommendations
For help deciding between the different types of server controls, see ASP.NET Server Controls Recommendations
- Web server controls - for details, see ASP.NET Server Controls by Function
- HTML server controls - for details, see ASP.NET Server Controls by Function (scroll down in the topic)
- Create your own server control - for details, see Web User Controls and Web Custom Controls
XML Web services are applications that can exchange interoperable messages in a loosely coupled environment, using standard protocols such as HTTP, XML, XSD, SOAP and WSDL. An XML Web service can be accessed from desktop applications (Windows Forms), Web applications, or other XML Web services. For details, see Programming the Web with XML Web Services
To send or receive a set of results to or from an XML Web service, use a dataset - for details, see ADO.NET Datasets
To access data within the logic of an XML Web service where that data is not being returned to the caller. . .
If you ...
- Are navigating between multiple, discrete tables of results...
- Are manipulating data from multiple sources (for example, from different databases, from XML files, spreadsheets, and so on, all in the same dataset) ...
- Are exchanging data with other applications ...
- Are reusing the same set of rows and intend to cache them (for example, sorting, searching, and filtering cached results) ...
- Are doing a lot of processing per row ...
- Are manipulating the data using XML operations such as XML transforms or XPath ...
- Want ease of programming ...
Then use a dataset - for details, see ADO.NET Datasets
Otherwise use direct access (data commands and data readers) - for details, see Performing Database Operations Directly.
For example, you would use data commands and data readers for:
- Performing DDL commands
- Performing updates or deletes based on a selection criteria
- Programmatically inserting records that are not based on user interaction
- Calling stored procedures to execute logic inside the server
- Retrieving scalar values from the database
- Processing a set of results in a forward only manner without updating and without caching the results
- Processing a set of results too large to fit in memory
Use Windows Forms - for details, see Creating Windows Applications
If you ...
- Are performing DDL commands ...
- Are calling stored procedures to execute logic inside the server ...
- Are retrieving scalar values from the database ...
- Are processing a set of results in a forward-only manner without displaying, updating, or caching the results ...
- Are processing a set of results too large to fit in memory ...
Then use direct access (data commands and data readers) - for details, see Performing Database Operations Directly
Otherwise, use a dataset - for details, see ADO.NET Datasets.
For example, you would use a dataset if you:
- Are binding results to a form to let the user view, insert, update, or delete records
- Are navigating between multiple tables of results
- Are manipulating data from multiple sources (for example, from different databases, from XML files, spreadsheets, and so on, all in the same dataset)
- Are exchanging data with other applications
- Are reusing the same set of rows (for example, sorting, searching, and filtering retrieved results)
- Are manipulating the data using XML operations such as XML transforms or XPath
- Want ease of programming
- Windows Forms controls - for help choosing between the different controls, see Windows Forms Controls by Function
- Inherit from an existing Windows Forms control (to expand its functionality), inherit directly from the control - for an example, see Walkthrough: Inheriting from a Windows Forms Control with Visual Basic .NET
- Custom controls - for details, see Control Authoring for Windows Forms
For details about working with Windows Forms controls (including securing applications, setting properties, handling events, anchoring controls, and so forth), see Windows Forms Controls
For help deciding which way to create a control, see Control Type Recommendations
For details, see Control Authoring for Windows Forms
- If you want to add to the functionality of an existing Windows Forms control, inherit directly from the Windows Forms control - for a step-by-step example, see Walkthrough: Inheriting from a Windows Forms Control with Visual Basic .NET or Walkthrough: Inheriting from a Windows Forms Control with Visual C#
- If you want to combine existing controls into a new control, inherit from the UserControl class - for details, see Inheriting from the UserControl Class
- If you want to create a control from scratch, inherit from the Control class - for details, see Inheriting from the Control Class
For details, see Web User Controls and Web Custom Controls
- XML Web service, which is technically not a component, but can be called from Windows applications, Web applications, or other XML Web services - for details, see Programming the Web with XML Web Services
- .NET component - for details, see Component Authoring
Create a console application - for details, see Console Application Template
Create a Windows service - for details, see Windows Service Applications
Access an Existing XML Web Service
For details, see Accessing XML Web Services in Managed Code
For a step-by-step example of accessing an XML Web service from a Windows application, see Walkthrough: Calling XML Web Services from Windows Forms
For a step-by-step example of accessing an XML Web service from a Windows application, see Walkthrough: Accessing an XML Web Service Using Visual Basic or Visual C#
Program with Objects and Components
For details, see .NET Framework Class Library in Visual Studio
Visual Basic - for details, see Object-Oriented Programming in Visual Basic
C# - for details, see new
Windows Forms Controls - for details, see Windows Forms Controls by Function
Web Forms server controls - for details, see ASP.NET Server Controls by Function
For help deciding between Web and HTML server controls, see ASP.NET Server Controls Recommendations
Web server controls - for details, see Controls You Can Use on Web Forms Pages
HTML server controls - for details, see HTML Server Controls
For help deciding between Web user controls and Web custom controls, see Recommendations for Web User Controls vs. Web Custom Controls
- Web user control - for details, see Introduction to Web User Controls
- Web custom control - for details, see Introduction to Web Custom Controls
- Windows services - for details, see Monitoring Windows Services
- Processes - use the Monitoring component - for details, see Monitoring and Managing Windows Processes
- PerformanceCounter component - for details, see Monitoring Performance Thresholds
- EventLog component - for details, see Logging Application, Server, and Security Events
- File system - for details, see Reacting to File System Events
- Active Directory - for details, see Creating Active Directory Components
Messaging component - for details, see Creating Messaging Components
- On the server - for details, see Creating Timer-Based Server Tasks
- On the client - for details, see Timer Component (Windows Forms)
For help deciding which way to create a control, see Control Type Recommendations
For details, see Control Authoring for Windows Forms
- If you want to add to the functionality of an existing Windows Forms control, inherit directly from the Windows Forms control - for an example, see Walkthrough: Inheriting from a Windows Forms Control with Visual Basic .NET
- If you want to combine existing controls into a new control, inherit from the UserControl class - for details, see Inheriting from the UserControl Class
- If you want to create a control from scratch, inherit from the Control class - for details, see Inheriting from the Control Class
For details, see Developing ASP.NET Server Controls
- XML Web service, which technically is not a component, but can be called from Windows applications, Web applications, or other XML Web services - for details, see Programming the Web with XML Web Services
- .NET component - for details, see Component Authoring
- Expose your .NET component to COM - for details, see Exposing .NET Framework Components to COM
- Expose your COM component to the .NET Framework - for details, see Exposing COM Components to the .NET Framework
Search the Web for controls and components created by third-party companies - try the Resource Center at the Got Dot Net Web site (http://www.gotdotnet.com)
Automate Tasks or Extend the Environment
For help deciding whether you need a macro, add-in, or wizard, see The Spectrum of Visual Studio .NET Automation
- Macro (Visual Basic only) - for details, see Automating Repetitive Actions by Using Macros
- Add-in - for details, see Creating an Add-in
- Wizard - for details, see Creating a Wizard
For details, see Introduction to Project Extensibility in Visual Basic and Visual C#
For advanced customization of the development environment, such as creating a new project type or a customized editor - see the " Visual Studio Integrator Program (VSIP)" section of The Spectrum of Visual Studio .NET Automation
Debug, Test, or Troubleshoot
For details, see Debugging Managed Code
For details, see Debugging XML Web Services in Managed Code
For details, see Introduction to Web Application Debugging
For details, see Debugging Preparation: Windows Applications
For details, see Debugging Preparation: Class Libraries
For details, see Debugging Windows Service Applications
For details, see Testing
Testing scalability - for details, see Testing for Scalability
For details, see Troubleshooting Problems Portal
Deploy
For help choosing which deployment project type to use, see Deployment Projects
For details, see Deployment of a Web Setup Project
For an example, see Walkthrough: Deploying a Web Solution
For details, see Deploying XML Web Services in Managed Code
For details, see Setup Projects
For an example, see Walkthrough: Deploying a Windows Application
If you are deploying a .NET component, create a merge module. For details, see Merge Module Projects. For a step-by-step example, see Walkthrough: Creating and Consuming a Merge Module.
If you are deploying an ActiveX control, create a CAB file. For details, see CAB File Projects. For a step-by-step example, see Walkthrough: Creating a CAB File.
Use dynamic properties - for details, see Introduction to Dynamic Properties
Upgrade from a Previous Version
For details, see Upgrading Applications Created in Previous Versions of Visual Basic
For details, see Upgrading Visual InterDev 6.0 Applications to Visual Studio .NET
Learn about New Features
What's New in Visual Basic and Visual C#
What's New in Visual Studio .NET
Introduction to Visual Basic .NET for Visual Basic Veterans
Walkthroughs in Visual Basic and Visual C#
Walkthrough: Creating a Distributed Application
XML Web Service Walkthroughs (XML Web services and Web applications)
Component Programming Walkthroughs
Wow..What a awesome article..
Suresh Behera