Você está na página 1de 4

[WEB PROGRAMMING ASSESSMENT FORMAT] January 20, 2012

Colorful Objects
This web application is used to add the colours and objects to the web page. There are two roles user and admin. User role adds the color and objects and submits all its entries to the admin. An admin role will show all the entries submitted by a user from various browser instances.

This screen depicts a scenario when you opened the Add screen from one browser instance and added 5 entries.

This screen depicts a scenario when you opened the Add screen from another browser instance at the same time and added 7 entries.

Fig. 1 Add Screen opened from two different browser instances

Fig. 2 Admin Screen displaying color & objects corresponding to the two browser instances (Fig 1)
Talent Transformation Group 1 MindTree Ltd

[WEB PROGRAMMING ASSESSMENT FORMAT] January 20, 2012

1. Add & Display User uses this feature to add the colors and objects to the web page.

Marks - 15

a. Description I. Accessing the URL http://localhost:8085/<AppName>/index.html?role=user, displays the Add web page (Refer fig 1). II. Add action The application should read the Color and Objects and display it in the same page in the Entries table (Refer fig 1). III. When Add action gets invoked more than once, each time the Color and Objects gets added as a new row in the Entries table. IV. When the Add web page gets accessed from another browser instance, it shows the entries added from that particular browser instance. For instance, the screen (Fig 1) shows the web-page when opened from two browser instances. Each browser instance shows the specific entries added in that screen. b. Assumptions / Hint I. User gets authenticated and authorized and the user role is sent as part of the query string. E.g. in the URL http://localhost:8085/<AppName>/index.html?role=user, the role is sent as user II. Assume that there is only one user which accesses the above URL from two different browser instances. III. Hint: The collection is maintained on the server side, so if there are multiple users, they will manipulate their own collection.

2. Submit to admin

Marks - 15

User uses this action to submit all colors and objects from his browser to the admin a. Description I. Submit to admin action gets invoked when user clicks on the Submit to admin button on the Add page II. It sends the records present in the Entries table so that it can be collectively shown on the Admin page. III. IV. It submits the Add page and clears all the entries in the Entries table. It prints back the message The final colors count in the admin page is <No.>

Talent Transformation Group

MindTree Ltd

[WEB PROGRAMMING ASSESSMENT FORMAT] January 20, 2012


b. Assumptions / Hint I. Hint: The records in the table should be maintained on the server side in one common collection. II. Hint: Refer in the Show All section, all colourful objects table in fig 2 to understand what data structure to use to store the data as shown in fig 2. Show All should be using the same data structure to display the records.

3. Show All

Marks - 10

Admin role uses this action to show all the entries submitted by a user from various browser instances. a. Description I. Accessing the URL http://localhost:8085/<AppName>/index.html?role=admin, displays the Admin web page (Refer fig 2). II. Clicking on the Show all button initiates the Show All action which shows all the entries submitted by a user from various browser instances. Refer All colourful objects table in fig 2. b. Assumptions / Hint I. Hint: It is related to task Submit to admin. Please refer that as well. II. Hint: If there are many objects for a given color, it will be arranged as shown in fig 2. Note that the color will be added only once and the objects corresponding to that gets listed as comma separated.
4.

DB Design Come up with a DB design for the colorful object application a. Description I. II.

Marks - 5

Create the DDL and submit the DDL deliverables The DDL should be submitted in a form that can be run without any changes.

b. Assumptions / Hint I. For the DB Design purpose, please ignore the user and roles.

Talent Transformation Group

MindTree Ltd

[WEB PROGRAMMING ASSESSMENT FORMAT] January 20, 2012

5. Commit All Admin user uses this to commit all the records to the database table. a. Description I.

Marks - 15

II.

Accessing the URL http://localhost:8085/<AppName>/index.html?role=admin, displays the Admin web page (Refer fig 2). Clicking on the Commit all button initiates the Commit All action which persists all the entries shown in the All colourful objects table in fig 2 to the database table.

b. Assumptions / Hint I. II. Refer the DB Design task to create the tables Each time when commit all is clicked, delete all the existing records and insert the new records.

***

Talent Transformation Group

MindTree Ltd

Você também pode gostar