13.07.2015 Views

Software Engineering for Internet Applications - Student Community

Software Engineering for Internet Applications - Student Community

Software Engineering for Internet Applications - Student Community

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

create view tanganyikan_group_membersasselect * from userswhere exists (select 1from user_group_map, user_groupswhere user_group_map.user_id =users.user_idand user_group_map.user_group_id =user_groups.user_group_idand group_name = 'Tanganyikans');or, supposing that you know that you're going to need this in<strong>for</strong>mationalmost every time that you query the USERS table?create view users_augmentedasselectusers.*,(select count(*)from user_group_map ugm, user_groups ugwhere users.user_id = ugm.user_idand ugm.user_group_id = ug.user_group_idand ug.group_name = 'Tanganyikans') astanganyikan_group_membershipfrom userswhere exists (select 1from user_group_map, user_groupswhere user_group_map.user_id =users.user_idand user_group_map.user_group_id =user_groups.user_group_idand group_name = 'Tanganyikans');This results in a virtual table containing all the columns of users plusan additional column called tanganyikan_group_membership that is 1<strong>for</strong> users who are members of the group in question and 0 <strong>for</strong> userswho aren't. In Oracle, if you want the column instead to bear thestandard ANSI boolean data type values, you can wrap the DECODEfunction around the query in the select list:decode(select count(*) ..., 1, 't', 0, 'f') astanganyikan_group_membership_pNotice that we've added an "_p" suffix to the column name, harkingback to the Lisp programming language in which functions that couldreturn only boolean values conventionally had names ending in "p".If you're programmingone Web page at a time,you can switch to theLanguage du Jour insearch of higherproductivity. But youwon't achieve significantgains unless you quitwriting code <strong>for</strong> onepage at a time. Thinkabout ways to writedown a machinereadabledescription ofthe application and userexperience, then let thecomputer generate theapplicationautomatically.One thing that we hopeyou've learned duringthis course is the valueof testing with users anditerative improvement ofan application. If anapplication is machinegeneratedyou can test itwith users, edit thewould require 4 programmers working fulltime<strong>for</strong> 6 weeks. What's worse, in looking atthe specs we decided that the realizedsystem would be unusably complex,especially <strong>for</strong> busy salespeople.Instead of blindly cranking out the code, weassigned only one programmer to theproject, our friend Tracy Adams. She turnedthe human-readable design notebooks intomachine-readable database metadata tables.Tracy proceeded to build a program-to-writethe-programwith no visible results. Siemensand BCG were nervous until Week 4 whenthe completed system was available <strong>for</strong>testing."How do you like it?" we asked. "This is theworst in<strong>for</strong>mation system that we've everused," they replied. "How do you compare itto your specs?" we asked. "Hmmm... maybewe should simplify the specification," theyreplied.After two more iterations the system, dubbed"ICN Sharenet" was launched on time andwas adopted quickly, credited by Siemenswith $122 million in additional sales duringits first year of operation.specification based on their feedback, and regenerate the applicationin a matter of minutes, ready <strong>for</strong> a new test.We're going to explore metadata, data about the data model, andautomatic code generation in the problem domain of knowledgemanagement.15.1 What is "Knowledge Management"?A knowledge management or knowledge sharing system is a multiuserin<strong>for</strong>mation system enabling users to share knowledge about ashared domain of expertise or inquiry. What is "knowledge"? Oneway to answer this question is to spend 10 years in a universityphilosophy department's epistemology group. From the perspectiveof a relational database management system, however, it may beeasier to define knowledge as "text, authored by a user of thecommunity, to which the user may attach a document, photograph, or84265

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!