Microsoft Visual C++ .NET Professional Projects - Premier Press
.pdf
932Part XII APPENDIXES
Testing network load balancing
Testing change control procedures
Testing cluster configuration
Testing application synchronization
It is best to implement methods within the application to check the application.
Performance
It is vital to check the performance of an application to see how an application works with an increased workload. However, for a user, the performance of an application is measured by the response time of the application. You can measure the performance of an application by using metrics such as transaction throughput and resource utilization. The performance of an application can be affected by factors such as network throughput and disk access.
Performance-related problems become evident only during the testing phase when an application is tested under an increased workload. During the testing phase, an application undergoes extensive performance checks at run time to identify performance bottlenecks, such as contention for resources or slow-run- ning code.
It is essential to maintain optimal performance of an application during run time as well design time. To ensure optimal performance, certain precautions can be taken at design time. For instance, code that could possibly affect the performance of an application should be avoided. Practicing programming standards and using the performance-enhancing capabilities inherent to the programming language are some more methods that developers can use to ensure optimal performance. You can identify the code that might affect the performance of an application by conducting routine code reviews and audits.
Designing for Performance
You should define all the performance-related requirements before the actual development and debugging process for an application begins. Therefore, before you begin developing your application, you should follow these steps:
Identify all the constraints that might affect the project, such as schedules or the tools and technologies that can be used.
THE .NET VISION AND GOALS Appendix A 933
Determine the services that the application will perform, including performance scenarios, database access, and other services.
Identify the load under which the application is expected to perform, such as the number of clients that will use the application and the time period between the response and request chain.
After collecting the required information, you can use the information to select appropriate metrics and determine specific performance goals.
Testing for Performance
You test the performance of an application to determine whether the application meets the requirements decided at the beginning of the application’s development. An important assumption while testing an application is that the application is stable and working as expected.
Monitoring the performance of an application primarily includes the following activities:
Measuring performance
Defining performance tests
Determining baseline performance
Stress testing
Solving performance problems
Reliability
With the continually increasing applicability of distributed Web-based applications, you need to ensure that an application functions in the expected manner. A reliable application is an application that operates without any failure. But what significance does reliability of an application hold? Reliability is important because of the following reasons:
The costs incurred due to an application failure are high
The cost of repairing corrupted data is high
Users avoid visiting unreliable Web sites, resulting in lost revenue and reduced future sales
Unreliable systems are difficult to maintain or improve because it is difficult to predict the cause of system failure
934 |
|
Part XII |
APPENDIXES |
|
|||
|
|
|
|
Keeping in mind the significance of reliability, it becomes essential to know how to include characteristics in the application design that can enhance the reliability of your application.
Designing for Reliability
When you design an application with reliability in mind, you need to estimate the usage pattern of an application, specify the required reliability profile, and build the software architecture to meet the required profile.
To design a high-reliability application, you need to consider the entire software development life cycle from the early design specification, through building and testing, to deployment and ongoing operational maintenance.
Designs that ensure high reliability typically:
Put reliability requirements in the design specification
Use good architectural infrastructure
Build management information into the application
Use redundancy for reliability
Use quality development tools
Build performance checks into the application
Use consistent error handling
Testing for Reliability
You test an application for reliability to identify and remove the defects in the application before it is deployed. Although it is an arduous task to identify all the defects in an application, you should try to identify as many as possible.
Some important strategies for testing include the following:
Component stress testing
Integration stress testing
Real-world testing
Random destruction testing
THE .NET VISION AND GOALS Appendix A 935
Best Practices for Reliability
Some of the best practices to develop highly reliable applications include:
Investing in people
Using a robust operating system
Removing failure points from your application design
Providing ongoing reliability monitoring
Investing in quality software engineering processes
Using smart testing
Deploying changes very carefully
Scalability
With an increasing demand, an application might need to add resources. Scalability defines the ability to increase the service capacity of an application by adding resources to the application. Therefore, scalability involves adding resources to an application rather than extensively modifying the application. You should incorporate scalability feature in the application design process.
Designing for Scalability
Scalability of an application is most dependent upon the design of an application. Some other factors that can influence the scalability factor of an application include hardware, software, and code. While designing a scalable application, you should emphasize efficient resource management.
In addition, while designing a scalable application, you should keep the following design aspects in mind:
The application must not wait longer than required to use vital resources.
The application must not compete with other applications for resources, such as memory, processor, and bandwidth.
The application must be designed for commutability — operations should be able to be applied in any order to achieve the same results.
The application must be designed for interchangeability by using resource pooling with technologies such as COM+ and ODBC connections.
936Part XII APPENDIXES
The relationship between resources and activities must be minimized to avoid bottlenecks.
Testing for Scalability
To ensure that an application has high scalability, you need to rigorously test the application for scalability problems. While testing, you identify the workloads and the bottlenecks to the scalability of an application.
You can analyze the test results to identify the bottlenecks in the system and the cause for a reduced performance. You can use tools such as Windows Task Manager, Windows Performance Monitor, and the Component Services administrative tool to identify the bottlenecks.
Security
Security measures the ability of the application to secure or control access to its resources and data. This ability can be affected by factors such as the communication protocols and the method of user authentication.
Designing for Security
Applications are vulnerable to malicious code, unauthorized users, and other such security threats. Therefore, it is of prime importance to monitor the security of your application.
Some guidelines that should be considered while designing secure applications include:
Analyze the impending threats, such as identity spoofing, data tampering, repudiation, information disclosure, denial of service, and elevation of privilege.
Prioritize the threats based on the criticality, the effort involved in eliminating the threat, and the potential damage to your application.
Apply available security policies to your application.
Select appropriate and applicable security technologies based on the type of threats.
Design security services that your application must support.
THE .NET VISION AND GOALS Appendix A 937
Testing for Security
Security testing is about validating your application’s security services and identifying potential security flaws. However, there are no standard methods of conducting security testing since attackers have no standard method of breaking into things. Some methods that you can use to test the security of your applications include:
Testing for buffer overflows
Conducting source-code security reviews
Validating contingency plans
Best Practices for Security
Some best practices that can be followed to develop secure applications are:
Exercise constant vigilance
Conduct periodic reviews
Establish and follow security policies
Secure data
Layer your application
Use the least-access approach
Enable strong authentication
Encourage the use of strong passwords
Monitor not-found errors
Avoid buffer overflows
Require minimal privileges
Use access control mechanisms
Validate user input
Develop contingency plans
Conduct scheduled backups
Use system-integrated authorization
Use a perimeter network to protect your internal network
Develop applications using the .NET Framework
This page intentionally left blank
