100 likes | 235 Views
Networked Software Systems Lab Department of Electrical Engineering, Technion. Labreg in WPF. By Lior Shetrit Semester: Spring 2009 Instructor: Viktor Kulikov March 25, 2009. Introduction.
E N D
Networked Software Systems LabDepartment of Electrical Engineering, Technion Labreg in WPF By Lior Shetrit Semester: Spring 2009 Instructor: Viktor Kulikov March 25, 2009
Introduction • Creating a Windows application that interacts with the Labreg database and allows the administrator to perform various operations. • The application is written using Microsoft’s WPF architecture (XAML) and C-Sharp (C#).
Implementations Ideas • Accessing the database can be done in various ways. • Connected Mode: using a DataReader object. • Disconnected Mode: using a DataSet object. • 3rd party tools: e.g. .netTiers. • Using strongly typed DataTables, DataRows and DataAdapters (generated by Visual Studio) –chosen implementation.
Implementation (1) • Visual Studio provides an interface that converts a table in a database (e.g. SQLDB) to a DataRow (single entity), DataTable (collection of entities) and TableAdapter (for read/write database operations). • All of the above are strongly typed, i.e. they are unique to the originating table and posses its characteristics (fields, fields’ types, etc.).
Implementation (2) • Application’s Paradigm Window1 Window2 App DataTables DataRows Controller Data Access Layer Labreg Database
Implementation (3) • Window – a XAML describing the User Interface (UI) and a C# code-behind implementing the Window’s logic (WPF schema). • Controller – a module that provides functions that return data the windows need (e.g., DataTables and DataRows). • DAL – generated strongly-typed TableAdapters classes that access the database. • All of the above use the strongly-typed DataTables and DataRows.
Application’s Capabilities (1) • Provides a list of Students/Experiments in the Next/Current Semester for all the Labs (1, 1h, 2 and 3) or for a specific Lab. • Shows a list of all meetings for a specific experiment. • Modify a semester’s registration times.
Application’s Capabilities (2) • Create and modify a student’s registration slot. • Check a student’s prerequisite (kdams) courses. • Smart filtering of students list (by student number and first/last name) and of prerequisite list (by course number and course name).
Goals Achieved • The application uses an informative yet simple and straightforward UI. • The application implements the Controller module as a static class that all windows interact with. • The application accesses the database only when necessary and uses DataViews to filter and sort the information.
Summary • WPF architecture provides a clear separation between the UI and the logic behind it. • The application can be further enhanced by improving its visual aspect and by adding new capabilities to its features set.