Chapter 8: Windows Forms UI

Overview

Up to this point, we've been focused on the server side of our application, because we've designed and created objects and business logic. Now let's shift gears and look at how we can create a user interface based on our business objects. In this chapter, we'll build a Windows Forms interface.

Windows Forms is a flexible technology that can be used to create a great many types of user interfaces, as testified by the fact that there are entire books on Windows Forms UI development. We won't rehash that sort of material in this book; what we want to focus on here is how to make effective use of our business objects and collections as we create Windows Forms displays and entry forms.

As we created the CSLA .NET Framework, we put in quite a bit of effort to allow our business objects to support Windows Forms development. Though our business objects themselves are focused around modeling the business process described in the use cases from Chapter 6, our objects gained quite a few important features that we'll use as we create the UI in this chapter. Most importantly, we added support for data binding to Windows Forms controls. Although we could certainly write our own code to move the data between our object properties and the controls on our forms, it's far easier to use data binding where possible.

As for a UI style, we'll create a multiple document interface (MDI) application perhaps the most commonly used style when building business applications. It provides the user with a single, unified view of the application, while allowing the application to interact with the user in a complex and powerful manner. Since our business objects already implement all business logic, including validation, manipulation, and data access, the code in our UI will be very focused on user interaction.



Expert C# Business Objects
Expert C# 2008 Business Objects
ISBN: 1430210192
EAN: 2147483647
Year: 2006
Pages: 111

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