Focusing on Design

Imagination is more important than knowledge.

Albert Einstein

When challenged, most Visual Basic developers would claim they design their applications. Unfortunately, we see little evidence of this. Technical specifications are becoming historical curiosities. It seems that most Visual Basic programmers cannot resist the temptation to start coding on Day 1 and then code, code, and code some more. What's wrong with using pencil and paper and applying a little thought up front to get a handle on a problem? As a contrasting example, tackling a large C++-based development is not easy at the best of times, and developers quickly learn that unless they invest some time in designing carefully, they will waste a lot of time and their development will almost certainly fail. How does this attitude compare with that of Visual Basic developers? We feel that Visual Basic is often abused. It's so easy to build an application that, rather than choose to design, developers build instead; that is, they take the "try it and see" approach to software development. In the Visual Basic 6 enterprise environment, this kind of approach spells disaster.

We recommend that not only must you create a design, you must make sure it fits in with an overall corporate architecture. The application design should be objectized, by building common objects and designing them for reuse. Error handling and debugging aids must be designed in from the start. When it comes to external components and objects, be careful not to include them in your design without properly assessing their quality and their potential impact on your application and on Windows. For example, at TMS, we run all candidate ActiveX controls under the Windows debugging kernel—it's often very revealing! Measure the effect on Windows resources of using a particular control, especially if your design means the control has to be multiply instantiated. More broadly, we recommend that external components and objects be assessed, procured, and controlled centrally—and with much care and thought.

What Is Design?

Design is the process of taking a business requirement and applying the constraints of technology, finance, and time. It is a compromise between the needs of a business and the limitations of the computer. It is a mixture of art and science; it is engineering. Design requires its participants to be masters of business and technology in order to draw the appropriate compromise. Designers need to be communicators and influencers. They need to be leaders.

Designers must possess current business and technical knowledge. The introduction of Visual Basic 6 demands that designers work to understand the new technical environment. A design is a specification for building an application. It applies architectural principle to a specific system. The strategy for implementation must be determined as part of the design. The system must function within the technical infrastructure of a business.

A logical model specifies what is required. For the model to be implemented, it must be tempered with reality. The design model has to be accurate to be implemented. The design model might be very different from the logical model. Rarely can the logical model be implemented directly; unfortunately, many try to do just that. For example, it is well known that a third normal form database design often performs poorly, but it's often tried because a logical database design doesn't take performance into account. A design model has to include all the data, not just the data that was thought of. It has to include all the processing, including the housekeeping and the audit trails. It has to account for peculiarities in database query optimization. It should consider the skills of the team, the build strategy, configuration management, and a host of other things that the analyst who creates the logical model can safely ignore.

Logical modeling should occur at the start of the design—and a long way from the end. Design requires detailed technical knowledge of the implementation environment. That environment includes not just technology but people too. The conversion of a logical data model to a robust and efficient physical design is a complex process that must be performed by the system designer in conjunction with the technical specialists. Only together can they make the appropriate compromises between business needs and technical constraints. The system designer from the application development team is unlikely to have the technical knowledge to make best use of the technology. The technical specialist is unlikely to understand where the business can compromise and where it cannot (or will not).

The process of design starts during the feasibility stage and continues throughout the life of a Visual Basic 6 distributed development project. Design does not follow analysis; it is more likely to precede it. Design is then a process of gradual refinement from high-level strategies to detailed specification that is continually influenced by and influences analysis. Requirements are generally unstable. They might be specified differently by different people. The software crisis is not in requirements gathering and specification, but in design. Designs must be able to cope with change and uncertainty. A successful system will change, but only a well-architected system will cope effectively with this change and at low cost. The focus of a project must be on design.

What Is Not Design?

Never play leapfrog with a unicorn.

Confucius on gamesmanship

Certain common techniques can create the illusion of design. Each technique has its proper place in development but does not constitute design in its own right. The importance of design must be considered and acknowledged in project planning. There are no alternatives to design if robust and maintainable systems are to be delivered. In some situations, you can use valid shortcuts, but they must be considered carefully and planned. Design is a compromise between business needs and technological capabilities. This means that design decisions are management decisions and that designers need to be aware of business requirements.

A thin GUI produced from evolutionary prototyping might be placed in front of a set of cooperating business objects derived from a business-object model. But prototyping alone is unlikely to produce a coherent design for business objects. These must be designed separately. Prototyping is not design.

A logical model is not design. It is abstract. A design needs to take into account the implementation environment. In Visual Basic 6 distributed development, the environment and potential impacts on other systems are complex. You need to adopt a benchmarking strategy to test and refine a design.

Data modeling is not design. Data modeling approaches to development assume that processing consists of simple inquiries and updates. GUI interfaces enable highly complex transactions to be built (for example, hierarchies and networks built as a single unit of work). The physical design to achieve performance and data integrity can be complex and can require separate modeling.

CASE tools do not guarantee good design. A mass of diagrams and dictionary prints can give the impression of detailed consideration. CASE tools improve productivity regardless of quality and talent, but they should be given only to those capable of doing the job without the tools. Few CASE tools provide adequate support for physical design. To do so, they would have to incorporate a model of the physical infrastructure and its performance characteristics.

Developing Design Patterns

It might not be possible to capture a generic solution in code effectively, but it might be possible to describe an approach or some techniques that will address the problem. Patterns document design experience. They distill design knowledge and allow it to be reused. Visual Basic 6 distributed systems require that considerable thought be given to software and data architecture. You can understand the nature of some of the problems by using simulation and benchmarking, which can help you evaluate potential solutions. Design guidance can be documented. Solution frameworks can be built to encapsulate partial solutions.

Patterns for the solution and demonstration of layering, partitioning, deployment, locking, database access, error handling, application structure, and so on should be developed using Visual Basic 6. Such patterns will then form the foundation for successful future development. If a preexisting design fits the architecture of the solution, the move from requirement to implementation can happen very quickly, making it seem as if there is no design phase.

When software developers come up with seemingly unrealistic estimates for delivering systems and subsequently achieve them, they are often using preexisting designs. They judge carefully whether their client's requirement fits the architecture of their solution. They work with a limited range of applications. They move from requirement to implementation quickly, beginning with a rapid design assessment to ensure that preexisting designs fit the requirements. Design patterns and application frameworks provide architectures for building applications. Much of the thinking has been done. Provided the new application is a close fit to the pattern or framework, rapid conversion of the requirements to code can be achieved with relatively little effort spent on design.

The application must be judged to fit the design. Careful thought must go into those parts of the application that fall outside the scope of the pattern or framework. But with a close fit, the design process can be shortened.

Examples of design patterns

Consider these four uses of design patterns:

  • Front end to back end bulk data movements

  • Error handling schemes

  • Name and address deduplication

  • Executive information systems

These are examples in which design patterns have been derived and used to reduce development costs and project schedules. The first two examples are generic technical problems, and the second two are business problems. In each, a completely coded generic solution cannot be produced, but a large amount of the design work can be reused in a subsequent application. Much of this design work can be captured in templates or libraries of classes.

Visual Basic 6 provides facilities for capturing patterns through two mechanisms: a form of inheritance through the use of the Implements keyword; and templates, which provide a starting point for custom code. This starting point can capture the key design ideas without the rigidity of finished and working code.

Benchmark-Driven Design

When choosing between two evils, I always like to try the one I've never tried before.

Mae West

Benchmarking is critical to successful physical design. You should carry it out early using representative models of the system to determine what strategies you should employ for different classes of problems (for example, moving large amounts of data from the front end to the back end or locking). Testing with models should include stress testing in such areas as high transaction rates, multiuser testing, and impacts on other systems. Designing the system incorrectly for these types of problems is expensive once the system has been written. With representative benchmarking carried out early, you should be able to upgrade servers and networks if required. Benchmarking will also give you an early indication of whether the application should be distributed over multiple servers or whether the design can remain simple. Where benchmarks show potential problems, you should evaluate alternative solutions. A set of solutions with varying performance characteristics, costs, and complexities will emerge. This process will enable the designer to select the most appropriate solution from a menu of solutions. These solutions are design patterns.

Benchmark-driven design is essential in Visual Basic 6 distributed applications in which there is a mix of technologies and a large potential for bottlenecks. The aim is to ensure that the technical infrastructure and the approach to using the infrastructure in the application will meet business needs for performance and reliability. To do this, you'll need to develop a model of the system. The performance characteristics and options for Visual Basic 6 (and Visual Basic 5) are very different from Visual Basic 3 or Visual Basic 4. On the whole, versions 5 and 6 have great improvements—improvements that provide opportunities.



Ltd Mandelbrot Set International Advanced Microsoft Visual Basics 6. 0
Advanced Microsoft Visual Basic (Mps)
ISBN: 1572318937
EAN: 2147483647
Year: 1997
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net