Infolink

 

Search This Blog

Oct 30, 2012

Server Explorer

The Server Explorer in VS .NET may look very familiar to users of Visual InterDev. Visual InterDev shipped with a feature allowing developers to access and manipulate remote data sources, all in an integrated part of the IDE. The Server Explorer in VS .NET provides this functionality and adds a whole lot of its own. A full list of resources that you can access with the Server Explorer follows.

  • Data connections
  • Crystal Services
  • Event logs
  • Message Queues
  • Performance counters
  • Services
  • SQL Server databases

As you can quite clearly see, considerably more than just data access functionality is provided. The Server Explorer virtually eliminates the requirement for multiple copies of Microsoft Management Console (MMC) to be open, monitoring things such as server performance. Most information that developers require about the computing environment is available at, literally, the click of a button.



Data Connections

Connections to OLE DB data sources, as well connections directly through the SQL managed provider, are shown in the Data Connections treeview of the Server Explorer . From here, you can edit and create tables, manipulate stored procedures, and perform many other common database tasks. Naturally, this facility does not provide all features for all databases, but it does provide a broad variety of functionality that will help you avoid loading separate management applications for most routine development tasks.

Crystal Services

Several editions of VS .NET feature the Crystal Reports software, for building both complex Windows Forms and Web-based, data-driven reports. Crystal is an entirely separate product in its own right, and it beyond the scope of this book to cover it, but this integration with VS .NET helps Crystal developers access and administer the reporting software more easily.

Event Logs

Developers who have only been developing applications for and using the Windows 9x platform will probably not be familiar with the concept of Event logs. Event logs are essentially a feature of Windows NT/2000 that allows applications to write critical moments in their execution to a central repository of application events, from which administrators can assess the situation of a machine. Events are usually written when something critical happens that may be of use to the systems administrator or developer in troubleshooting. Events such as the start and termination of a critical service are a common example.

The Event Logs tree of the Server Explorer allows developers to view a particular machine’s logs, helping with both application debugging and troubleshooting, as well as ensuring that the application is posting the correct events at the correct time itself. Again, all this functionality, which is roughly equal to that exposed by the MMC event log viewer, is integrated right into Visual Studio.

Message Queues

Message Queues are often an essential part of many enterprise applications and deal with providing guaranteed message delivery (messages normally contain instructions, such as operations to be performed on a database, like adding a row).

Message
queuing basically involves a series of machines running Microsoft Message Queue, which allows messages to be sent and received. The topic of message queuing to build ultrareliable applications is beyond the scope of this book, but suffice it to say that the Message Queues tree allows developers to easily control and monitor the messages being sent to and received by various machines.

Performance Counters

Windows NT and 2000 sport a very comprehensive array of performance monitoring facilities. By default, graphs that can be plotted include areas such as CPU time, disk access time, and so forth. However, the system is very extensible, and a whole selection of .NET-related counters are installed with the .NET Framework. These include counters in the following categories:
  • .NET CLR Exceptions
  • .NET CLR Interop
  • .NET CLR Jit
  • .NET CLR Loading
  • .NET CLR Locks
  • .NET CLR Memory
  • .NET CLR Remoting
  • .NET CLR Security
  • ASP.NET
  • ASP.NET Applications
These monitors are particularly important when testing application scalability, with the counters in the ASP.NET and ASP.NET Applications categories being particularly pertinent. Additionally, it is possible to add your own counters to the Windows system in Web applications. These could be used to monitor a multitude of items—for example, currently logged-in users. The Performance Counters section of
the Server Explorer allows for monitoring of these counters from within VS .NET, as opposed to having to load the appropriate MMC snap-in in a separate window.

Services

This node lists all the services available on the machine, along with their respective status (started/stopped). Checking running services is often a common place to start non–programmatic-related troubleshooting. Items such as the SMTP service are often critical to an application, and the ability to quickly and easily check on and modify the status of all the services is another useful feature exhibited by the Server Explorer.

SQL Servers

If SQL Server is installed on the target machine, all the databases available on it are accessible through this node. You can use the Visual Studio data tools, which are integrated database development tools inside Visual Studio, to modify most aspects of the databases, including tables and stored procedures.   

This functionality is very useful when developing database applications, as it alleviates the requirement to use the SQL Server Enterprise Manger or Query Analyzer (or some such generic SQL query application), as most of the required common functionality is integrated directly into VS .NET.

Properties Window

Visual Basic developers will be immediately familiar with the Properties window. It is used to modify properties of visual components on forms and, more pertinent to Web Forms, modify properties of HTML Controls and Web Controls that are placed on Web Forms. However, its functionality is not limited to the Design view of Web Forms, and the Properties window is still fully functionality when in HTML
view. However, it cannot be used in code view, when VB .NET code is being edited.



The Properties window changes dynamically according to the selected control, as different types of controls have different properties. Naturally, the state of the properties is maintained. The following exercise demonstrates the ease of use and power of the Properties window:
  1. Either start a new Web application or use the one already created at the start of the chapter if it is still open.
  2. Drag a Button control from the Web Forms section of the Toolbox onto the Web Form in Design view.
  3. Make sure that the button is selected (if it is, six black handles will appear around it). If it is not, click it once.
  4. Scroll down to the Text property in the Properties window, and modify the property by clicking in the cell adjacent to the property name that says “Button” and editing that text to read “Helloworld!”. Notice that when that edit field loses focus (when you click out of it or press Enter), the Design view immediately shows the modification.
  5. Scroll down to the BackColor property and choose a color from the drop-down list that appears for that property.This quick introduction to the Properties window demonstrates two of the three types of properties that have slightly different representations in the Properties window. The first is the basic property where a value is entered, with the second being one where a choice is given (with color values and Booleans being the most common property values where this happens).

The third is the set, or collection of properties within one central property. The most common example of this is the Font property, which does not have any value itself, but contains other properties to describe the font, such as size, name, and stylistic functionality (bold, underline, italic, and strikeout). You can easily recognize properties that are sets in the Properties window, as they will have a small plus sign (+) next to them, denoting that you can expand them to expose subproperties.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...