ASP Databases and how to stomp project 3

ASP, Databases, and how to stomp project 3 Chris North cs 3724: HCI


Presentations • matthew jaswa, • jason bower • Vote: UI Hall of Fame/Shame?

Next • Project 3: due Thurs Apr 25 Presentations: • Next Tues: UI critique or HW 2 results • lawrence lauderdale, greg walker • chris shirk, rick harris • Next Thurs: • michael young, eric tester • craig sinning, darrin schmidt

Review • WUI vs. GUI? • * multiple users • Out of sync between client & server • * maintain state • How does ASP help? • * tracks users • * Tracks state - session

Review • examples of “client-server out of sync” problem? • re-post problem • Jump-in problem • Browser cache • Server crashes • Lost messages, network problems, corrupted files • Same user, multiple browser windows

Project 3 tools • Developing: ftp: //pid@infovis. cs. vt. edu • Visual Inter. Dev • Front. Page • Viewing: http: //infovis. cs. vt. edu/pid

Client-Server Sync Problems • Re-post problem • • Form instance has unique id Store it in db Expires, get new fresh form Increment counter, per user

Client-Server Sync Problems • Jump in too deep problem • On a deep page, check for username? redirect • Relaxed vs. gestapo • Gestapo: test if source, dest page is possible connection

Client-Server Sync Problems • Browser cache problem <% Response. Expires = -1 Response. Expiresabsolute = Now() - 2 Response. Add. Header "pragma", "no-cache" Response. Add. Header "cache-control", "private" Response. Cache. Control = "no-cache" %> • Random query. String: <a href=“myscript. asp? Nocache=<%=rnd()%>” > <a href=“myscript. asp? Nocache=4857493>”

Consistent look-and-feel • Banner • Navigation bar • Overview+detail • Software maintenance nightmare? • Server-side ‘include’ files: • Put banner, nav bar in separate ‘include’ file: • Can be used in. html files too <!-- #include file = "myfile. asp" -->

Data-Driven Websites • Websites that provide access to: • • Lots o data Dynamic data Customized views of data E. g. ebay. com • Scripts map data to html • UI design, infovis principles Database html

Infovis and web pages • Scrolling? • Don’t have much better options • Simple graphics Item 1 Item 2 Item 3 Item 4 Item 5 … Trick: red. gif = 1 x 1 pixel gif <img href=“red. gif” width=75 height=10>

Databases • Project 3 database • ODBC • Active. X Database Objects (ADO) • • Records Open database connection Query (SQL) Receive Record. Set Fields, values movenext Fields

Typical SQL Queries • Get all records: SELECT field 1, field 2 FROM table SELECT * FROM table • Sorting: SELECT * FROM table ORDER BY field 1 • Get certain records: SELECT * FROM table WHERE field 1=value • Adding a record INSERT INTO table(field 1, field 2) VALUES (value 1, value 2) Don’t muck with ID field

Project 3? • Tools • Client-server sync problems/solutions • Databases
- Slides: 16