Server-oriented Rapid Application Development (RAD)

Source: Internet
Author: User
Tags dedicated server file transfer protocol msmq

Server-oriented Rapid Application Development (RAD)

Visual Studio. NET greatly reduces the complexity of creating network applications. The key to successfully creating a network application is to focus on the middle layer. Most of the business logic and applications appear on the intermediate layer server. Visual Studio. net open system uses Rapid Application Development (RAD) in the early years, Visual Basic developers are used to quickly assemble Windows-based user interfaces and apply them to build intermediate layer objects. Key fields include:

  • Server Explorer)
  • Server resources)
  • Easily set and deploy server-based applications
  • After the application is deployed, debug it using the run-time trace.

Visual Studio. NET has all the tools required by developers to successfully create powerful mid-tier applications. Developers can:

  • Microsoft Message Queuing (MSMQ) is used to ensure message transmission and cross-platform communication.
  • Write application errors to the shared event log, or schedule a component to activate at a scheduled time using scheduled tasks.
  • Read performance indexes from any computer on the network.
  • Compile the components that are activated and executed when the file system changes.
  • Drag and Drop this functionality directly into their applications so that developers can focus on business issues rather than component assembly and coordination.

Server Explorer)

One of the biggest challenges for compiling intermediate layer components is to find out which application services are available on the enterprise network. And once discovered, they will be difficult to integrate into your application.

In Visual Studio 6.0, Microsoft SQL Server and Oracle Database discovery are enabled. In addition, Visual Studio can process all the modes and data in these databases. Using the data View window, developers can point to a database and then drill down the nodes to study the database structure. Visual Studio also provides a method to modify the database structure. For example, developers can connect to SQL Server to view and modify tables, views, and stored procedures.

In the next version of Visual Studio, Server Explorer takes another big step from today's data view to display the entire computer, includes database, message queue, and all other server elements installed on the computer.


Figure 1. Server Explorer)

You can add some resources in Server Explorer to the Visual Studio designer. When you add a project in these projects to your designer, Visual Studio automatically creates a component that references the selected resource. For example, you can select a specific message queue and add it to the component designer. Visual Studio automatically creates a Message Queue component that references this queue.

You can use Server Explorer to perform management tasks on your Microsoft Windows service. This includes starting, stopping, suspending, and resuming services. The icon next to the server changes according to the current status of the service.

By default, Server Explorer saves the last configuration as part of your session and) open it again. You can also save special configurations by name and switch between them. For example, you can set a dedicated server explorer configuration for each stage of the software development cycle.

Component designer allows drag-and-drop Programming

The same way as the Form Designer allows you to quickly create client applications, Server Explorer provides a way to quickly and graphically create server-side components. The component designer applies the form-based programming concept of rad to the creation of intermediate layer objects-a visualization method for creating non-visualized objects. Now developers do not need to write a lot of server-side code. They can drag and drop the server components running on the server to the design surface, connect them using the property browser, and double-click, the code of the object is opened.


Figure 2. Component designer)

Server resources)

Guaranteed message transmission and cross-platform Communication

Microsoft Message Queuing allows developers to quickly, reliably, and synchronously communicate with applications by sending and receiving messages.

MSMQ provides:

  • The ability to create applications with disconnected users, such as when sales staff are working far away.
  • Guaranteed transfer-for example, for stock brokers, if their order input application loses an order, it may lose millions of dollars.
  • Concurrent execution to process multiple work requests.
  • Automatically logging your activities, which is helpful for retaining audit leads and restoring data.
  • Connections to IBM MQSeries can actually run on every platform from the mainframe to AS/400.

Developers need to be able to send and receive messages, create message queues, and manage these message queues. In the next version of Visual Studio, the Server Explorer and MSMQ components can simplify task execution.

By dragging a message queue from Server Explorer to a component, the default value of this message queue and message allows developers to send simple messages using the following code line.

mq.Send "Hi Mom"

Receiving a message is as simple as the following.

message = mq.Receive 

When developers program MSMQ in Visual Studio. NET, there are two options:

  1. To send a message, you need to associate the message with a message queue. This object allows developers to directly communicate with the queue and send messages as efficiently as possible.
  2. Drag and Drop an existing queue to a component to program the component directly. Alternatively, you can directly create, delete, and rename a queue in Visual Studio.

The next step is to provide the data to be sent. You can call the sending Method on this message queue and then send data to the specified queue.

Dim mq as new MessageQueue ("//MyMachine/Queue1")mq.Send "This is the message"mq.Send 7 mq.Send myOrder

The Message Queue Component obtains data from the independent variable, adds the data to the message, and sends the message to the specified queue.

Write application errors to a shared Event Log

Applications for Microsoft Windows NT and Windows 2000 regularly write warnings and errors to Event Logs. Event logging provides a standard and centralized way for Windows and applications to record important software and hardware events. Event Log provides a standard user interface for viewing log records, and provides a programming interface for checking log records.

In Visual Studio.. net, developers can drag and drop event logs from Server Explorer to components, then write the application-specific code to read and write Event Logs ).

You can also create and compile custom event log records. To do this, you only need to drag an event log component from the toolbox, specify a queue name for the log, and then the log records will be automatically created.

Finally, you can run the code when a record is written to a log record. For example, when an error log is written to an application log, the Administrator is notified.

Use scheduled tasks to schedule activation of a component at a specified time

Running components at a scheduled time is an important requirement for enterprise customers. The enterprise operates as planned. The bookstore should be closed at the end of each business day. The audit is performed every month. You need to provide detailed reports for analysis every morning. These are examples of scheduled tasks. These are all scenarios where automatic processing occurs.

Over the years, Visual Studio has made it easy to create executable files and components that run inside the Windows operating system. Visual Studio allows you to create applications and components that can run at scheduled times and intervals.

For example, a retail chain store may use plan components. When the store is closed, the store database content must be transmitted to the company headquarters. Each store runs a scheduled component at a specified time. The planning component checks new sales on the day, packs them, and sends them back to the headquarters. In addition, each store performs inventory analysis at two o'clock in the morning. Goods that fall below a specified threshold will be ordered from the dealer.

To use the Scheduler Component, you can drag the scheduled event component from the toolbox to the component designer. Once scheduledevent becomes a part of this component, you can set properties in the Properties window to customize it. Double-click the component to fill in the Code executed when the component is activated:

Public Sub SchdEvent1_OnScheduledEventReceive (EventSource as Object, e as ScheduledEvent)'User code goes here…End Sub

Use performance counters to read performance indexes from any network computer

Performance monitoring refers to the process of obtaining and analyzing the performance data provided by applications, services and drivers to identify system bottlenecks and adjust the performance of systems and applications. Windows 2000 and Windows NT provide a way to monitor system performance through performance counters and Performance Monitor applications. In addition, the performance monitor can respond to counter values when the threshold is reached. For example, you can write an event to an event log or shut down a computer.

Visual Studio. NET provides a component that can easily create new counters and read and write the values of any performance calculator. One purpose of this component is to report the number of orders processed per second. A business object has a property that can be modified after deployment to enable or disable the timing for processing each order. When the load is heavy and the throughput is reduced, the administrator can enable this tool to determine how the application runs using performance monitor. If the Administrator finds that the system is under heavy load and the application cannot process the order quickly enough, the resource can be reassigned to improve performance.

To use the performance counter component, drag it from Server Explorer to a component, and double-click it to write application-specific code.

Directory Monitor (directory watcher) activated when the file system changes

A common commercial practice used today is to write long-running applications and monitor file changes to cancel the business process. Using the Visual Studio. NET directory Monitor (directory watcher) component to create a more effective way to do this is very easy. This component listens to the System Directory change notification, and changes to a file in the directory or directory are a trigger event.

An example of using this component is FTP (file transfer protocol ). Imagine that an FTP server is set up for a web-based news website. Journalists from all over the world can upload their subjects to this FTP server, and the Directory Monitor (directory watcher) component will use email notification editing.

Simply drag a directory Monitor (directory watcher) component out of the Toolbox and set the attributes that determine when the component will be activated. The component can be activated when the directory is changed, created, or deleted, and a file is added, renamed, or deleted, and then run the code. Double-click the component to write the code executed when a file or directory event occurs.

Easily set and deploy server-based applications

Enterprise administrators are faced with the challenge of deploying distributed application components and managing them within their life cycle. Component developers and solution integrators are responsible for providing sufficient information to administrators and developers to facilitate application deployment. In distributed application models, the goal is to enable component developers and integrators to easily provide deployment information without sacrificing the effectiveness of the Administrator model.

The goal of deployment is to easily deliver solutions from multiple platforms or projects or structures of any scale to multiple other platforms. Visual Studio. NET is deployed across multiple platforms and computers to solve this problem. It allows N-layer deployment (that is, deploying to multiple target computers in a single operation ). It also makes it easy to deploy on the Network (Web) server and the COM + server.

Create install applications that span all layers of Windows DNA applications

Developers often need to deploy all three layers of a distributed application, which are usually written in multiple languages. Using the new deployment tool in the next Visual Studio version, it is very easy to create a multi-layer installation program.

Use a custom installer to set server resources during deployment

When the application server function is applied to the middle layer component, the dependency on the server is generated. Developers can create a component and drag and drop a message queue from the toolbox to a class. This message queue will exist on the developer's computer. However, when deploying this application, if the queue does not exist, you need to re-create it. Visual Studio. NET includes a custom installer that ensures that server-based resources can be created during deployment.


Figure 3. add installer)

In the Properties window, there is a link to add installer. When you click this link, it will install the program (Message Queue installer) to a message queue) add a new class to the project of the component. The message queue installer component knows how to create details of a message queue.

After the application is deployed, debug it using the run-time trace.

Tracking is a feature that allows developers to test applications. Such a test allows developers and administrators to monitor the health status of the deployed application, rather than running the debugger. (Sometimes using the debugger hides errors, making performance and thread problems less obvious ). For distributed multi-layer applications, tracing is an important monitoring and debugging tool. Such applications may be observed only when heavy loads and randomness inherent in the actual environment are detected.

Ideally, developers can include trace tools with minimal overhead (up to 10-15% impact on performance and size) in their production code. When the system cannot be executed as expected, they can enable the tracing function for Production Code while the system is running, and then determine the problem. The tracking feature allows developers to isolate and correct problems without disrupting the operating system.

Use dynamic attributes to change the functionality of the application after deployment

One of the most common problems with production network (Web) applications is that developers need to change the behavior of applications while the website is running. Visual Studio. NET provides the ability to create dynamic attributes, which can be modified after the application is deployed. In fact, these attributes can be retrieved from the XML file when the application is running. Developers can easily modify this file to change the behavior of the application without writing, compiling, and deploying new code.

The dynamic attribute value can be modified when the application is deployed and the application is running. You can use a tool to enter notepad or the XML editor built in Visual Studio. NET to edit attributes and change attribute values. An example of dynamic attributes is the connection string to the database. If the application hardcoded the connection string to the application, the developer needs to re-compile the application when converting the application from development to test and then to production. By setting this attribute to "dynamic", the connection string value can be modified after the application is deployed. When an application is running, a new value is used to direct the application to a different database without modifying the source code. Dynamic Property settings can be shared by multiple properties in the project. Therefore, you only need to update the shared connection string in one location.

Conclusion

Visual Studio. NET provides a discovery mechanism to search for all XML Network Services (Web Services), databases, message queues, event logging, performance counters, and other server resources on the enterprise network. In addition, it allows developers to drag and drop these server resources to a "visual class" To Start Program Design in a graphical manner. This means that Visual Studio. NET allows Rapid Application Development for servers.

It is difficult to configure and deploy distributed network applications. However, using the new tool in Visual Studio, Microsoft provides an installation tool to distribute all layers of a distributed application. With the new features in Visual Studio. NET, developers can build release-deployment debugging and feature changes into their applications.

Extracted from: http://www.microsoft.com/china/msdn/archives/others/vstudio/radserver.asp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.