Coping with the Command Line

Command-line startup options, environment variables, and configuration files are important to many applications, particularly when it comes to the implementation of servers. There are a number of ways of dealing with program startup and object creation. This chapter will focus on argument parsing, and the overall architecture of an application.

This chapter will extend the configuration file handling from Chapter 14, Configuration Files and Persistence, with yet more techniques for command-line programs and the top level of a server. The core design principles from Chapter 15, Design Principles and Patterns, are essential when designing an application of any size. This chapter will also extend some logging design features from Chapter 16, The Logging and Warning Modules.

In Chapter 19Module and Package Design, we'll extend these principles to look at a kind of architectural design that we'll call programming in the large. We'll use the Command design pattern to define software components that can be aggregated without resorting to shell scripts. This is particularly helpful when writing the background processing components used by application servers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset