140 likes | 275 Views
Active Server Pages (ASP). Chris North cs3724: HCI. Presentations. adam hahn, hugh hockett Vote: UI Hall of Fame/Shame?. Next. Project 3: due Thurs Apr 25 Presentations: UI critique or HW2 results Thurs: matthew jaswa, jason bower Next Tues: lawrence lauderdale, greg walker
E N D
Active Server Pages(ASP) Chris North cs3724: HCI
Presentations • adam hahn, • hugh hockett • Vote: UI Hall of Fame/Shame?
Next • Project 3: due Thurs Apr 25 Presentations: UI critique or HW2 results • Thurs: matthew jaswa, jason bower • Next Tues: lawrence lauderdale, greg walker • Next Thurs: michael young, eric tester
Project 3: ASP • Due thurs april 25 • Individual (not groups) • Build a simple message board: • Log in (no passwords), Log out • View current message list (overview first!) • View a message (details on demand!) • Send a message • Will use common database to store messages • Required: • Prevent duplicate sends (via ‘back’, then ‘send’) • Prevent jump into app without login • Defeat browser cache • Extra credit: information visualization • Grade: UI and code
Review: Usability Testing • What is the process? • Users, tasks, data, analyze • Lab setup? • User room, observer room, recording • What data to collect? • Audio, video, clicks, mouse, keyboard, eyetracking, notes • How do you analyze the data? • Cost, importance, sort by ratio: high import/least cost • When are you done? • Meet Usability spec
Review: WUI • Why is WUI different than GUI programming? • don’t control client: client server out of sync • Multi-users • How to maintain state between scripts? • 2 types of WUI scripting: • Server side • Client side
ASP • Microsoft: • Internet Information Server (IIS) • Active Server Pages (ASP) • Server-side scripting • VBscript • Maintains user session state
Anatomy of an ASP page • Html + embedded scripts: New tags <% %> and <%= %> • Example myscript.asp: <html><body> The time is <%= time() %> <% if (time() < noon) then %> <p>Good morning <% else %> <p>Good afternoon <% end if %> </body></html> • Client receives: <html><body> The time is 2:00pm <p>Good afternoon </body></html> At page request: Server executes script <%= v %> Replaces script with value of v <% %> Replaces script with nothing
Processing form input • Page with form: <html><body> Please enter your username: <Form method=“post” action=“login.asp”> <input type=“text” name=“username”> <input type=“submit” value=“Send”> </body></html> Please enter your username: chris Send ASP Page to receive form input
Processing form input • Global ASP objects: session, request • login.asp: <% session(“username”) = request.form(“username”) %> <html><body> Welcome, <%= session(“username”) %>. </body></html> Welcome, chris.
VB Collections • Session and request.form are ‘collection’ objects • Dim c as new Collection • Can store any type • Store things by a string key value • Store: collection(“key”) = value • Retrieve: value = collection(“key”) • session(“username”)
ASP Objects • Session: specific to each user • .timeout • Application: global, all users • Request • .form • .queryString • Response • .write (alternate to <%= %>) • .redirect • .end • .isClientConnected • Server
InterDev • demo
Project 3 • Infovis.cs.vt.edu: < kirkpat • Meister.cs.vt.edu >= kirkpat • Login = pid • Pwd = • Lowercase Initials (2-3) last4SSN • abc1234 • ac1234