the connections from the pool and uses it until page service iscomplete. The connection is then returned to the pool. This schemeis called connection pooling.Often a good way to get the database username and password out ofpage scripts is to use the Web server's database connection poolingsystem.4.11 Time and MotionTeams should spend at least an hour together drawing a pen andpaper sketch that identifies and locates the basic in<strong>for</strong>mation that thesystem will process. Detailed data modeling is not necessary, as itwill be covered in the next two chapters.The work of figuring out bind variables, hiding the databasepassword, and generalizing the view source code may be splitamong the team members. This ought to be doable within 6 to 8programmer-hours.potential actions rather than pure bureaucracy and navigation.Second, and more seriously, this approach doesn't scale very well.When an administrator says "I need to see users who've registeredwithin the last 30 days, who've contributed more than 4 productreviews, and who've bought at least $100 of stuff so that I can spamthem with a coupon" another option must be added to the list.Eventually the navigation page groans with choices.Imagine instead that the very first mouse click takes the administratorto a page that shows all the users who've registered in the last 30days, in one big long list. At the top are sliders. Each slider controls adimension, each of which can restrict or expand the number of itemsin the list. Here are some example dimensions <strong>for</strong> a communityecommerce site such as amazon.com:• recency of registration, from 1 day ago (restrictive) to thebeginning of time (loose)• geographical proximity, from same postal code (restrictive)to same city to same state to anywhere in the world (loose)• total purchases, from at least $10,000 (restrictive) to at least$500 to $0 or more (loose)• review activity, from Top 100 Reviewer (restrictive) to Top1000 Reviewer to 0 or more reviews (loose)• content quality, from average review rated 4.5 stars or better(restrictive) to any averageIf the default page shows too many names, the administrator willadjust a slider or two to be more restrictive. If the administrator wantsto see more names, he or she will adjust a slider towards the looseend of that dimension.How to implement dimensional controls? Sadly there is no HTML tagthat will generate a little continuous slider. You can simulate a sliderby offering, <strong>for</strong> each dimension, a set of discrete points along thedimension, each of which is a simple text hyperlink anchor. Forexample, <strong>for</strong> content quality you might offer "4 or better", "3 or better","2 or better", "all".15.8 Exercise 5: Build the Knowledge Capture PagesHere is a list of URLs that we think you'll want to create, named witha "noun-verb" convention:• index72277
The trees chapter of SQL <strong>for</strong> Web Nerds, athttp://philip.greenspun.com/sql/trees, gives some examples ofconcatenated indices. If you're using Oracle you may want to read thecomposite indices section of the Per<strong>for</strong>mance Guide and Referencemanual (online and in the product documentation) and the SQLReference manual's section on "Create Index".15.6 Exercise 4: Write a Program to Generate a"Drop All Tables" ScriptWrite a script in the same admin directory as ddl-generate, calleddrop-tables-generate. This should generate DROP TABLEstatements from the metadata tables. You probably won't get yourdata model right the first time so you might as well be ready to clearout the RDBMS and start over.Feed the database management system the results of your datamodel creation and clean-up scripts until you stop getting errormessages.15.7 Dimensional ControlsWhen displaying a long list in<strong>for</strong>mation on a page consider addingdimensional controls to the top. Suppose <strong>for</strong> example that you wishto help an administrator browse among the registered users of a site.You have a feeling that the user community will grow too large <strong>for</strong> thecomplete list to be useful. You there<strong>for</strong>e add an intermediate pagewith the following options:276• show users who've registered in the last 30 days• show users from the same geographical area as me (siteadministration tends to be divided up by region)• show users who have contributed more than 5 items• show users whose content has been rated below "C"(looking <strong>for</strong> people who add a lot of crud to the database)A well-designed page of this <strong>for</strong>m will have a discreet number next toeach option, showing the number of users who will be displayed ifthat option is selected. A poorly designed page will simply leave theadministrator guessing as to how much in<strong>for</strong>mation will be shownafter an option is selected.This traditional approach has some drawbacks. First, it adds a mouseclick be<strong>for</strong>e the administrator can see any user names. Ideally youwant every page of an application to be displaying in<strong>for</strong>mation and/orChapter 5User Registration and ManagementAs noted in the <strong>Software</strong> Structure chapter, the more identified,authenticated, and accountable people are, the better the opportunity<strong>for</strong> building a community out of an aggregate. Thus the userdatabase should record as much in<strong>for</strong>mation as possible that mighthelp Person A assess Person B's credibility.As you will see in the chapter on scaling, it may become important tofacilitate occasional face-to-face meetings among subgroups ofusers. Thus it will be helpful to record their country of residence andpostal code (what Americans call "Zoning Improvement Plan code" or"ZIP code").5.1 Fat versus Skinny: the IdeasSuppose that the system specifications start off with very simplerequirements <strong>for</strong> the user database, one that can be handled by thefollowing single table:create table users (user_id integer primary key,first_names varchar(50),last_name varchar(50) not null,emailvarchar(100) not null unique,-- we encrypt passwords using-- operating system crypt functionpassword varchar(30) not null,registration_date timestamp(0));Notice that the comment about password encryption is placedabove, rather than below, the column name and that the primarykey constraint is clearly visible to other programmers. It is good toget into the habit of writing data model files in a text editor andincluding comments and examples of the queries that you expectto support. If you use a desktop application with a graphical userinterface to create tables you're losing a lot of important designin<strong>for</strong>mation. Remember that the data model is the most criticalpart of your application. You need to think about how you're goingto communicate your design decisions to other programmers.73
- Page 1 and 2:
SoftwareEngineering forInternetAppl
- Page 3 and 4:
Signature: ________________________
- Page 5 and 6:
end-users. We use every opportunity
- Page 7 and 8:
• availability of magnet content
- Page 9 and 10:
• we want to see if a student is
- Page 11 and 12:
you supply English-language queries
- Page 13 and 14:
What to do during lecturesWe try to
- Page 15 and 16:
The one-term cram courseWhen teachi
- Page 17 and 18:
332• spend a term learning how to
- Page 19 and 20:
Once we've taught students how to b
- Page 21 and 22: has permission to perform each task
- Page 23 and 24: UDDIUnixcustomer's credit card. If
- Page 25 and 26: thousands of concurrent users. This
- Page 27 and 28: OraclePerlnamed XYZ" without the pr
- Page 29 and 30: LDAPLinuxbits per color, a vastly s
- Page 31 and 32: FilterFirewallFlat-fileGIF318functi
- Page 33 and 34: when there is an educational dimens
- Page 35 and 36: system. The authors of the core pro
- Page 37 and 38: Sign-OffsTry to schedule comprehens
- Page 39 and 40: scheduling goals that both you and
- Page 41 and 42: Client Tenure In Job (new, mid-term
- Page 43 and 44: ReferencesEngagement ManagementSQL*
- Page 45 and 46: Decision-makers often bring senior
- Page 47 and 48: presentation to a panel of outsider
- Page 49 and 50: 300always been written by programme
- Page 51 and 52: 17.3 Professionalism in the Softwar
- Page 53 and 54: Try to make sure that your audience
- Page 55 and 56: Chapter 17WriteupIf I am not for my
- Page 57 and 58: Suppose that an RDBMS failure were
- Page 59 and 60: analysis programs analyzing standar
- Page 61 and 62: at 9 hours 11 minutes 59 seconds pa
- Page 63 and 64: found" will result in an access log
- Page 65 and 66: 15.18 Time and MotionThe team shoul
- Page 67 and 68: select 227, 891, 'algorithm', curre
- Page 69 and 70: create table km_object_views (objec
- Page 71: • object-create• object-display
- Page 75 and 76: );274-- ordering within a form, low
- Page 77 and 78: and start the high-level document f
- Page 79 and 80: Example Ontology 2: FlyingWe want a
- Page 81 and 82: systems. What would a knowledge man
- Page 83 and 84: spreadsheet". Other users can comme
- Page 85 and 86: Chapter 15Metadata (and Automatic C
- Page 87 and 88: {site url}{site description}en-usCo
- Page 89 and 90: drawing on the intermodule API that
- Page 91 and 92: At this point you have something of
- Page 93 and 94: • description• URL for a photo
- Page 95 and 96: Here's a raw SOAP request/response
- Page 97 and 98: Chapter 14Distributed Computing wit
- Page 99 and 100: conduct programmer job interviews h
- Page 101 and 102: Most admin pages can be excluded fr
- Page 103 and 104: content that should distinguish one
- Page 105 and 106: Chapter 13Planning ReduxA lot has c
- Page 107 and 108: the Internet-specific problem of no
- Page 109 and 110: wouldn't see these dirty tricks unl
- Page 111 and 112: 12.8 Exercise 4: Big BrotherGeneral
- Page 113 and 114: than one call to contains in the sa
- Page 115 and 116: A third argument against the split
- Page 117 and 118: way 1 1/16One might argue that this
- Page 119 and 120: absquatulate 612bedizen 36, 9211cry
- Page 121 and 122: What if the user typed multiple wor
- Page 123 and 124:
Chapter 12S E A R C HRecall from th
- Page 125 and 126:
long as it is much easier to remove
- Page 127 and 128:
features that are helpful? What fea
- Page 129 and 130:
made it in 1938)? Upon reflection,
- Page 131 and 132:
environment, we identify users by t
- Page 133 and 134:
those updates by no more than 1 min
- Page 135 and 136:
Balancer and mod_backhand, a load b
- Page 137 and 138:
translation had elapsed--the site w
- Page 139 and 140:
It seems reasonable to expect that
- Page 141 and 142:
11.1.5 Transport-Layer EncryptionWh
- Page 143 and 144:
such as ticket bookings would colla
- Page 145 and 146:
give their site a unique look and f
- Page 147 and 148:
It isn't challenging to throw hardw
- Page 149 and 150:
Chapter 11Scaling GracefullyLet's l
- Page 151 and 152:
10.15 Beyond VoiceXML: Conversation
- Page 153 and 154:
Consider that if you're authenticat
- Page 155 and 156:
In this example, we:194• ask the
- Page 157 and 158:
As in any XML document, every openi
- Page 159 and 160:
(http://www.voicegenie.com). These
- Page 161 and 162:
Chapter 10Voice (VoiceXML)questions
- Page 163 and 164:
9.15 MoreStandards information:•
- Page 165 and 166:
9.14 The FutureIn most countries th
- Page 167 and 168:
9.10 Exercise 7: Build a Pulse Page
- Page 169 and 170:
9.6 Keypad HyperlinksLet's look at
- Page 171 and 172:
text/xml,application/xml,applicatio
- Page 173 and 174:
Protocol (IP) routing, a standard H