Computer Knowledge
GUI and Web Frameworks
1,915 Questions
Graphical user interface and web frameworks involve layout management, directives, and application design across platforms like Android and Angular. These concepts are tested in computer science and IT officer competitive exams. Review these questions to understand UI components and coding standards.
Android layout attributesAngular structural directivesVB.Net web methodsJava Swing componentsSiebel application framework
GUI and Web Frameworks Questions
-
ViewData
-
ViewState
-
Session
-
All of the above
A
Correct answer
Explanation
ViewData is a specific dictionary object used to pass data from Controller to View in MVC. While Session can also pass data, ViewData is the designated mechanism for this controller-to-view communication pattern. ViewState is a WebForms feature.
-
.aspx
-
.ascx
-
.html
-
All of the above
A,B
Correct answer
Explanation
In ASP.NET MVC, views use the .aspx extension for standard views and .ascx extension for partial views or user controls. The .html extension is not a standard ASP.NET MVC view extension - HTML would be the output format, not the file extension.
-
IAuthorizationFilter
-
IActionFilter
-
IResultFilter
-
IExceptionFilter
-
All of the above
E
Correct answer
Explanation
ASP.NET MVC 2.0 provides four main action filter interfaces: IAuthorizationFilter (for authorization), IActionFilter (for pre/post action execution), IResultFilter (for pre/post result execution), and IExceptionFilter (for exception handling). All of these interfaces are part of the action filtering framework.
-
Visual Studio 2008
-
Visual Studio 2008 SP1
-
Visual Studio 2010
-
All of the above
B,C
Correct answer
Explanation
ASP.NET MVC 2.0 works with Visual Studio 2008 SP1 (Service Pack 1 is required for MVC support) and Visual Studio 2010 (which includes MVC 2 out of the box). Standard Visual Studio 2008 without SP1 does not support ASP.NET MVC 2.0.
A,C
Correct answer
Explanation
ASP.NET MVC uses clean URLs without file extensions. Option A shows the standard controller/action pattern. Option C shows the pattern with an input parameter as part of the URL path. Options B and D incorrectly add .aspx extension or use querystring syntax for parameters, which are not standard MVC routing patterns.
-
Defined as public method
-
Should not be static method
-
Can have ref and out parameters
-
Can have generic types
A,B,C
Correct answer
Explanation
Controller action methods must be public (to be accessible via HTTP), should not be static (instance methods are required for context and dependency injection), and can have ref and out parameters. They cannot use generic type parameters directly as part of the method signature in the action invocation context.
-
Model Browser
-
Model Designer
-
Solution Designer
-
Solution Browser
A
Correct answer
Explanation
The Model Browser is the Visual Studio tool window integrated with the ADO.NET Entity Data Model Designer. It provides a hierarchical view of the entity types, associations, and properties defined in the .edmx file. The Model Browser allows developers to navigate and inspect the conceptual model structure, while the Model Designer surface provides the visual layout.
-
using variable assigned to the OutArgument
-
Using InArgument assigned to the OutArgument
-
It is not possible
-
None of the above
A
Correct answer
Explanation
In the WF4.0 designer, OutArguments are typically accessed by assigning them to variables. The designer binds these arguments to variables that can then be used elsewhere in the workflow. This is the standard pattern for extracting output from activities and workflows. InArguments are for input, not output access.
-
workflowApplication.ResumeBookmark(bookmarkName, null)
-
workflowApplication.ResumeBookmark(bookmarkName)
-
workflowInvoker.ResumeBookmark(bookmarkName, null)
-
workflowInvoker.ResumeBookmark(bookmarkName)
A
Correct answer
Explanation
The ResumeBookmark method requires two parameters: the bookmark name and the value to pass to the resumption point. WorkflowApplication (not WorkflowInvoker) is the correct host type for operations involving bookmarks. The method signature is ResumeBookmark(bookmarkName, value), where value can be null if no data needs passing.
-
WPF
-
Windows
-
Silverlight
-
workflow
A
Correct answer
Explanation
Activity designers in WF4.0 are built using Windows Presentation Foundation (WPF). WPF provides the visual designer surface, the property grid, and all the UI components that make up the workflow designer experience. Silverlight and Windows are not used for WF activity designers.
-
Add the Designer attribute to the Activity class
-
Assign ActivityDesigner name in the Activity Constructor
-
By overriding cacheMetadata
-
None of the above
A
Correct answer
Explanation
To associate a custom designer with an activity in WF4.0, you apply the Designer attribute to the activity class. This attribute specifies which designer class should be used to visually represent the activity. The attribute typically points to a class derived from ActivityDesigner. The other options are not valid mechanisms for designer association.
B
Correct answer
Explanation
In Windows Workflow Foundation, an Activity Designer is a customized WPF control. It consists of both a XAML file defining the user interface layout and a corresponding code-behind file (like C# or VB.NET) to implement the runtime interaction logic, making the statement false.
-
Terminate the activity
-
An event in WF4.0
-
A mechanism that allows activities in the bookmark's position hangs, waiting for restoration
-
Terminate the workflow
C
Correct answer
Explanation
Bookmarks in WF4.0 are a mechanism that allows an activity to pause its execution at a specific point and wait for an external event to resume it. The activity 'hangs' (waits) at the bookmark position until ResumeBookmark is called with matching bookmark name. Bookmarks enable long-running workflows that can wait for user input or external events without blocking threads.
-
StateInitialization
-
WriteLine
-
Assign
-
Flowchart
A
Correct answer
Explanation
StateInitialization is a WF3.0 activity that was NOT carried forward to WF4.0. In WF4.0, state machine workflows were completely absent initially and when reintroduced in WF4.5, they use different activity types (State, Assign, etc.). The other options (WriteLine, Assign, Flowchart) are all valid built-in WF4.0 activities.
-
StateMachine
-
Sequential
-
Flowchart
-
Statemachine and sequential
-
Sequential and Flowchart
E
Correct answer
Explanation
In WF 4.0, the available control flow constructs are FlowChart and Sequence activities. StateMachine was not part of the initial WF 4.0 release - it was reintroduced later in WF 4.5. The other options incorrectly include StateMachine or don't list both available types.