Chapter 7. Construction of the SESI Order Entry Application

only for RuBoard - do not distribute or recompile

Chapter 7. Construction of the SESI Order Entry Application

graphics/chic01.gif

This chapter covers the construction of the Specialty Electrical Supply, Inc. (SESI) Order Entry application as specified and designed in Chapter 6, Order Entry Abstract and Design. This chapter will move slower than is absolutely necessary and will cover some basic things in detail for readers who are new to this set of tools (MySQL, GTK+, and Glade); for example, certain things will be done step by step here that would be covered in a few sentences or paragraphs in the later sections of the book.

This chapter will proceed along the following lines. First, Glade will be used to construct the user interface. The user interface (UI) will be compiled to make sure that it operates correctly. Next will come the utility functions of the application. For example, the function that fills a drop-down combo box with values. These types of functions will be independent of the user interface to the greatest extent possible so that they can be used in other places easily. Another example would be a function that saves the values in the application s text or entry boxes to the database. At the initial project specification, there may be only one place where this function would be used, so it might seem more appropriate to put it in an event callback. However, it may come about at a later release that the save functionality is needed in several places. Making the save functionality modular from the beginning makes code maintenance that much easier down the road. In the third section, we will connect the two sections to make a functional application.

This chapter will proceed along the path of a discovery; that is, I am not going to present the finished final product with all the kinks and trip-ups solved . Instead, I will construct this project as you would. This means I might create or omit something in the UI that will not be discovered until I attempt to integrate the utility functions in the final section. In that case, I have not gone back to the UI built with Glade to correct the problem. I will handle it as discovered, where discovered to illustrate problems, bugs , and omissions in a realistic manner and hopefully emphasize them in a way that will enable you to learn more about the chosen tools (GTK+ and MySQL).

Finally, remember that the database was constructed in Chapter 6, including the initial fill of data from text files; recall that these text files were extracts from the previous system (whatever that may be) and that they have been already imported into the tables in the SESI database (which this application accesses ). Appendix A, Glade-Generated Files from the SESI Order Application, goes along with this chapter and Chapter 6. Appendix A contains the interface.c and sesi.glade files, as generated by Glade.

only for RuBoard - do not distribute or recompile


MySQL Building User Interfaces
MySQL: Building User Interfaces (Landmark)
ISBN: 073571049X
EAN: 2147483647
Year: 2001
Pages: 119

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