Monday, May 5, 2008

Microsoft Visual Studio

Microsoft Visual Studio is the main Integrated Development Environment (IDE) from Microsoft. It can be used to develop console and GUI applications along with Windows Forms applications, web sites, web applications, and web services in both native code as well as managed code for all platforms supported by Microsoft Windows, Windows Mobile, .NET Framework, .NET Compact Framework and Microsoft Silverlight.
Visual Studio includes a code editor supporting IntelliSense as well as code refactoring. The integrated debugger works both as a source-level debugger and a machine-level debugger. Other built-in tools include a forms designer for building GUI applications, web designer, class designer, and database schema designer. It allows plug-ins to be added that enhance the functionality at almost every level - including adding support for source control systems (like Subversion and Visual SourceSafe) to adding new toolsets like editors and visual designers for domain-specific languages or toolsets for other aspects of the software development lifecycle (like the Team Foundation Server client: Team Explorer).
Visual Studio supports languages by means of language services, which allow any programming language to be supported (to varying degrees) by the code editor and debugger, provided a language-specific service has been authored. Built-in languages include C/C++ (via Visual C++), VB.NET (via Visual Basic .NET), and C# (via Visual C#). Support for other languages such as F#, Python, and Ruby among others has been made available via language services which are to be installed separately. It also supports XML/XSLT, HTML/XHTML, JavaScript and CSS. Language-specific versions of Visual Studio also exist which provide more limited language services to the user. These individual packages are called Microsoft Visual Basic, Visual J#, Visual C#, and Visual C++.
Currently, Visual Studio 2008 and 2005 Professional Editions, along with language-specific versions (Visual Basic, C++, C#, J#) of Visual Studio 2005 are available to students as downloads free of charge via Microsoft's DreamSpark program.

Features
Code editor
Visual Studio, like any other IDE, includes a code editor that supports syntax highlighting and code completion using IntelliSense for not only variables, functions and methods but also language constructs like loops and queries. IntelliSense is supported for the included languages, as well as for XML and for Cascading Style Sheets and JavaScript when developing web sites and web applications. Autocomplete suggestions are popped up in a modeless list box, overlayed on top of the code editor. In Visual Studio 2008 onwards, it can be made temporarily semi-transparent to see the code obstructed by it. The code editor is used for all supported languages.
The Visual Studio code editor also supports setting bookmarks in code for quick navigation. Other navigational aids include collapsing code blocks and incremental search, in addition to normal text search and regex search. The code editor also includes a multi-item clipboard and a task list. The code editor supports code snippets, which are saved templates for repetitive code, that can be inserted into code and customized for the project being worked on. A management tool for code snippets is built in as well. These tools are surfaced as floating windows which can be set to automatically hide when unused or docked to the side of the screen. The Visual Studio code editor also supports code refactoring including parameter reordering, variable and method renaming, interface extraction and encapsulation of class members inside properties, among others.
Visual Studio features background compilation (also called incremental compilation). As code is being written, Visual Studio compiles it in the background with a view to pointing out compilation errors and warnings on-the-fly. Errors are flagged with a red wavy underline and warnings with a green underline. Background compilation does not generate executable code, and needs a different compiler than the one used to generate executable code. Background compilation was initially introduced with Microsoft Visual Basic but has now been expanded for all included languages.

Debugger
Visual Studio includes a debugger that works both as a source-level debugger as well as machine-level debugger. It works with both managed code as well as native code and can be used for debugging applications written in any language supported by Visual Studio. In addition, it can also attach to running processes and monitor and debug those processes. If source code for the running process is available, it displays the code as it is being run. If source code is not available, it can show the disassembly. The Visual Studio debugger can also create memory dumps as well as load them later for debugging. Multi-threaded programs are also supported. The debugger can be configured to be launched when an application running outside the Visual Studio environment, crashes.
The debugger allows setting breakpoints (which allow execution to be stopped temporarily at a certain position) and watches (which monitor the values of variables as the execution progresses). Breakpoints can be conditional, that is they get triggered when the condition is met. Code can be stepped over, i.e., run one line (of source code) at a time. It can either step into functions to debug inside it, or step over it, i.e., the execution of the function body isn't available for manual inspection. The debugger supports Edit and Continue, i.e., it allows code to be edited as it is being debugged. When debugging, if any variable is hovered over by the mouse pointer, its current value is displayed in a tooltip ("data tooltips"), where it can also be modified if desired. During coding, the Visual Studio debugger lets certain functions be invoked manually from the Immediate tool window. The parameters to the method are supplied at the Immediate window.

Designer
Visual Studio includes a host of visual designers to aid in the development of applications. These tools include:

WinForms Designer
The WinForms designer is used to build GUI applications using WinForms. It includes a palette of UI widgets and controls (including buttons, progress bars, labels, layout containers and other controls) that can be dragged and dropped on a form surface. Layout can be controlled by housing the controls inside other containers or locking them to the side of the form. Controls that display data (like textbox, list box, grid view, etc.) can be data bound to data sources like databases or queries. The UI is linked with code using an event-driven programming model. The designer generates either C# or VB.NET code for the application.

WPF Designer
The WPF designer, codenamed Cider, was introduced with Visual Studio 2008. Like the WinForms designer it supports uses the drag and drop metaphor. It is used to author user interfaces targeting Windows Presentation Foundation. It supports all WPF functionality including databinding and automatic layout management. It generates XAML code for the UI. The generated XAML file is compatible with Microsoft Expression Design, the designer-oriented product. The XAML code is linked with code using a code-behind model.

Web designer
Visual Studio also includes a web site editor and designer that allows web pages to be authored by dragging and dropping widgets. It is used for developing ASP.NET applications, and supports HTML, CSS and JavaScript. It uses a code-behind model to link with ASP.NET code. Visual Studio 2008 onwards, the layout engine used by the web designer is shared with Microsoft Expression Web.

Class designer
The Class Designer is used to author and edit the classes (including its members and their access) using UML modeling. The Class Designer can generate C# and VB.NET code outlines for the classes and methods. It can also generate class diagrams from hand-written classes.

Data designer
The data designer can be used to graphically edit database schemas, including typed tables, primary and foreign keys and constraints. It can also be used to design queries from the graphical view.

Mapping designer
Visual Studio 2008 onwards, the mapping designer is used by LINQ to SQL to design the mapping between database schemas and classes that encapsulate the data.

Visual Studio 2008
Visual Studio 2008, codenamed Orcas, is the successor to Visual Studio 2005. It was released to MSDN subscribers on 19 November 2007 alongside .NET Framework 3.5. The codename Orcas is, like Whidbey, a reference to an island in Puget Sound, Orcas Island. The source code for the Visual Studio 2008 IDE will be available under a shared source license to some of Microsoft's partners and ISVs.
Visual Studio 2008 is focused on development of Windows Vista, 2007 Office system, and Web applications. Among other things, it brings a new language feature, LINQ, new versions of C# and Visual Basic languages, a Windows Presentation Foundation visual designer, and improvements to the .NET Framework. It also features a new HTML/CSS editor influenced by Microsoft Expression Web. J# is not included. Visual Studio 2008 requires .NET Framework 3.5 and by default configures compiled assemblies to run on .NET Framework 3.5; but it also supports multi-targeting which lets the developers choose which version of the .NET Framework (out of 2.0, 3.0, 3.5, Silverlight CoreCLR or .NET Compact Framework) the assembly runs on. Visual Studio 2008 also includes new code analysis tools, including the new Code Metrics tool. For Visual C++, Visual Studio adds a new version of Microsoft Foundation Classes (MFC 9.0) that adds support for the visual styles and UI controls introduced with Windows Vista. For native and managed code interoperability, Visual C++ introduces the STL/CLR, which is a port of the C++ Standard Template Library (STL) containers and algorithms to managed code. STL/CLR defines STL-like containers, iterators and algorithms that work on C++/CLI managed objects.
Visual Studio 2008 features a XAML based designer (codenamed Cider), workflow designer, LINQ to SQL designer (for defining the type mappings and object encapsulation for SQL Server data), XSLT debugger, JavaScript Intellisense support, JavaScript Debugging support, support for UAC manifests, a concurrent build system, among others. It ships with an enhanced set of UI widgets, both for WinForms and WPF. It also includes a multithreaded build engine (MSBuild) to compile multiple source files (and build the executable file) in a project across multiple threads simultaneously. It also includes support for compiling PNG compressed icon resources introduced in Windows Vista. An updated XML Schema designer will ship separately some time after the release of Visual Studio 2008.
The Visual Studio debugger includes features targeting easier debugging of multi-threaded applications. In debugging mode, in the Threads window, which lists all the threads, hovering over a thread will display the stack trace of that thread in tooltips. The threads can directly be named and flagged for easier identification from that window itself. In addition, in the code window, along with indicating the location of the currently executing instruction in the current thread, the currently executing instructions in other threads are also pointed out. The Visual Studio debugger supports integrated debugging of the .NET Framework 3.5 BCL. It can dynamically download the BCL source code and debug symbols and allow stepping into the BCL source during debugging. Currently a limited subset of the BCL source is available, with more library support planned for later in the year.

No comments: