- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
Assigning a Resource to a Project in Visual C#.NET
Assigning a Resource to a Project PDF 417 Generator In C#.NET Using Barcode creator for .NET Control to generate, create PDF 417 image in Visual Studio .NET applications. www.OnBarcode.comPDF417 Reader In Visual C#.NET Using Barcode reader for Visual Studio .NET Control to read, scan read, scan image in .NET framework applications. www.OnBarcode.comBased on the use cases, resources can be assigned to projects. This implies that the user has identified the project and wishes to assign a resource to it. It also implies that a project has a collection of assigned resources: hence the ProjectResources collection in the object model. But what behavior and information would a user expect from the items in the ProjectResources collection Certainly, one behavior is to return the list of resources assigned to the project. Another behavior is to allow a new resource to be assigned to the project, implying something like an Assign() method that accepts the Id property from a Resource. It is also worth considering what information should be provided to the user. When viewing or editing a Project, the list of assigned resources should probably show something like this: Resource ID Resource name Date assigned to the project Role of the resource on the project This means that ProjectResources, and the items returned by ProjectResources, might look something like Figure 6-3. EAN / UCC - 13 Maker In Visual C#.NET Using Barcode maker for Visual Studio .NET Control to generate, create EAN / UCC - 13 image in Visual Studio .NET applications. www.OnBarcode.comGS1-128 Maker In Visual C#.NET Using Barcode generation for VS .NET Control to generate, create UCC - 12 image in .NET applications. www.OnBarcode.comFigure 6-3. The ProjectResources collection and the ProjectResource child object
Code 128 Code Set C Creator In Visual C# Using Barcode generation for .NET framework Control to generate, create Code 128B image in .NET framework applications. www.OnBarcode.comQR Code ISO/IEC18004 Generation In C# Using Barcode maker for Visual Studio .NET Control to generate, create Denso QR Bar Code image in .NET applications. www.OnBarcode.comThough not visible in Figure 6-3, the Assign() method accepts a resourceId parameter to identify the resource being assigned to the project. Given this analysis, let s consider the behaviors and information required to assign a project to a resource basically the same process, but starting with a Resource instead of a Project. Encode ANSI/AIM Code 39 In C# Using Barcode encoder for Visual Studio .NET Control to generate, create Code-39 image in .NET framework applications. www.OnBarcode.comMSI Plessey Creator In Visual C#.NET Using Barcode generator for Visual Studio .NET Control to generate, create MSI Plessey image in .NET applications. www.OnBarcode.comCHAPTER 6 s OBJECT-ORIENTED APPLICATION DESIGN
PDF-417 2d Barcode Scanner In C#.NET Using Barcode reader for .NET framework Control to read, scan read, scan image in Visual Studio .NET applications. www.OnBarcode.comEncoding PDF417 In Visual Studio .NET Using Barcode generator for Reporting Service Control to generate, create PDF-417 2d barcode image in Reporting Service applications. www.OnBarcode.comAssigning a Project to a Resource
QR Creator In None Using Barcode printer for Software Control to generate, create QR Code image in Software applications. www.OnBarcode.comPDF 417 Drawer In None Using Barcode creator for Microsoft Excel Control to generate, create PDF 417 image in Office Excel applications. www.OnBarcode.comThe use cases provide for the idea that a user could start by identifying a resource rather than a project. In this case, the user can still associate a project with the resource by selecting a project. This implies that the Resource object has a collection of projects to which the resource is assigned. The object model thus far represents this collection as ResourceAssignments. Let s consider the behaviors and information for the ResourceAssignments collection and the items it would contain. In this case, the user starts with a Resource and wishes to assign the resource to a project. So the ResourceAssignments object will have a couple of behaviors: listing the projects to which the resource is assigned, and assigning the resource to a new project. This can probably be handled by an AssignTo() method that accepts the Id property of a Project. The items in ResourceAssignments have the behavior of returning information about the project assigned to the resource. The information of value to a user is likely the following: Project ID Project name Date assigned to the project Role of the resource on the project Figure 6-4 shows the potential ResourceAssignments object and what its items might look like. GTIN - 12 Drawer In Objective-C Using Barcode printer for iPad Control to generate, create Universal Product Code version A image in iPad applications. www.OnBarcode.comBarcode Creator In VB.NET Using Barcode maker for Visual Studio .NET Control to generate, create Barcode image in Visual Studio .NET applications. www.OnBarcode.comFigure 6-4. The ResourceAssignments collection and the ResourceAssignment child object
Read Code 39 Extended In C#.NET Using Barcode reader for Visual Studio .NET Control to read, scan read, scan image in .NET applications. www.OnBarcode.comUniversal Product Code Version A Recognizer In Java Using Barcode recognizer for Java Control to read, scan read, scan image in Java applications. www.OnBarcode.comThe AssignTo() method accepts a projectId parameter to identify the project to which the resource should be assigned. Generate Code 39 Full ASCII In Java Using Barcode printer for Android Control to generate, create Code 3 of 9 image in Android applications. www.OnBarcode.comDenso QR Bar Code Encoder In Java Using Barcode generation for Java Control to generate, create QR Code JIS X 0510 image in Java applications. www.OnBarcode.comCan the Classes be Merged
Creating Code 128 Code Set C In Objective-C Using Barcode generation for iPhone Control to generate, create Code 128 Code Set C image in iPhone applications. www.OnBarcode.comPrinting UPC Symbol In .NET Framework Using Barcode encoder for ASP.NET Control to generate, create UCC - 12 image in ASP.NET applications. www.OnBarcode.comIt is important to notice that the objects described by Figure 6-3 and Figure 6-4 are similar, but they are not the same. Yet they do share at least some common information, if not behavior. Both child classes contain Assigned and Role properties, implying that there s commonality between them. Such commonality is not justification for combining the two classes into one, because their behaviors are distinctly different. The items in ProjectResources have one responsibility: managing information about a resource assigned to a project. The items in ResourceAssignments have a different responsibility: managing information about a project to which a resource is assigned. While this difference may seem subtle, it is a difference nonetheless. It is tempting to consider that the two classes could be merged into one, as shown in Figure 6-5. Of course, ProjectName isn t valid if the user got to this object from a Project object, but it is valid if she got here through a Resource object. The same is true for several other properties.
|
|