Академический Документы
Профессиональный Документы
Культура Документы
1. Part A: ASP .Net User controls Requirements..............................................................................3 1.1 Functional Requirements.......................................................................................................3 1.2 Critical Quality Requirements.................................................................................................3 1.2.1 Maintainability (Criticality: High)....................................................................................3 1.2.2 Portability (Criticality: Low)...........................................................................................3 2. Part B: Navigation Control Process Steps....................................................................................4 2.1 ASP .Net Common Design and Development Details............................................................4 2.2 Process Steps for Development ............................................................................................4 2.3 Mapping of Other Quality Characteristics...............................................................................5 2.3.1 Maintainability (Criticality: High)........................................................................................5 2.3.2 Portability (Criticality: Low)...............................................................................................5 3. Part C: Acceptance Criteria.........................................................................................................6
Context Where does the requirement fit in the system? In a web application, we need to have some common functionality such as search, navigation menu etc, which need to be present in more than one page. These can be achieved in the form of user control. User controls can be kept centrally at one place can be inherited in multiple pages. Hence, when we need to modify the user control, changes need to be done only at one place
1.2
Critical Quality Requirements CTQ- Critical to Quality, Criticality: High/ Medium/ Low Maintainability (Criticality: High) Changeability Easily build a web application with certain user controls. Easily change the functionality of all pages just by modifying only one user control file Portability (Criticality: Low)
1.2.1
1.2.2
Insatiability
User and custom controls behave same for all the browsers. They should be supported across different platforms seamlessly. User controls can be installed in GAC and used across multiple applications.
Consuming user control in ASPX page 1. Drag and drop the user control to the ASPX pages (page1.apx), or add the code manually in
the ASPX page using @register . Ex: <% @Register Src= TagName= TagPrefix=>
The @Register directive associates aliases with namespaces and class names for notation in custom server control syntax. When you drag and drop a user control onto your .aspx pages, the Visual Studio automatically creates an @Register directive at the top of the page. This register the user control on the page so that the control can be accessed on the .aspx page by a specific name.
Src The location (relative or absolute) of the declarative ASP.NET User Controls file to associate with the tagprefix:tagname pair. TagName An arbitrary alias to associate with a class. This attribute is only used for user controls. TagPrefix An arbitrary alias that provides a shorthand reference to the namespace of the markup being used in the file that contains the directive. In our case Src = ~/WebUserControl1.ascx TagName = concatenate TagPrefix = Name
2. This piece of code references the user Control so we can use it in our page. Then use the user control where we want the Control to appear on aspx page. Code to use user control will be: <Name:concatenate runat = server />
2.3
2.3.1
Maintainability (Criticality: High) Requirement: Controls can be changed easily in one place without having to edit the individual pages in your site. Process Steps:
Place all the controls under one single folder. E.g. Controls folder.
2.3.2
Portability (Criticality: Low) Requirement: Custom controls can be installed in GAC and used across multiple applications. Process Steps:
Start-> Settings->control panel -> Administrative Tools -> .Net Framework configuration 2.0. A new .net configuration page will open. Open My Computer -> manage the assembly cache -> Add an assembly to the GAC -> Browse and open the DLL that needs to be installed -> click open -> Ok. DLL will be installed in GAC and all the other .Net application can use the custom control
c)