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.

Chapter 15Metadata (and Automatic CodeGeneration)In this section you'll build a machine-readable representation of therequirements of an application and then build a computer program togenerate the computer programs that implement that application.We'll treat this material in the context of building a knowledgemanagement system, one of the most common types of onlinecommunities, and try to introduce you to terminology used bybusiness people in this area.Organizations have complex requirements <strong>for</strong> their in<strong>for</strong>mationsystems. A period of rapid economic growth can result in insaneschedules and demands that a new in<strong>for</strong>mation system be readywithin weeks. Finally, organizations are fickle and have nocompunction about changing the requirements mid-stream.Technical people have traditionally met these challenges ... byarguing over programming tools. The data model can't represent thein<strong>for</strong>mation that the users need, the application doesn't do what whatthe users need it to do, and instead of writing code, the "engineers"are arguing about Java versus Lisp versus ML versus C# versus Perlversus VB. If you wantto know why computerprogrammers get paidless than medicaldoctors, consider thesituation of two traumasurgeons arriving at anaccident scene. Thepatient is bleedingprofusely. If surgeonswere like programmers,they'd leave the patientto bleed out in order tohave a really satisfyingargument over themerits of two differentkinds of tourniquet.264War StoryThe authors were asked to help Siemens andBoston Consulting Group (BCG) realize aknowledge sharing system <strong>for</strong> 17,000telephone switch salespeople spread among84 countries. This was back in the 1990swhen (a) telephone companies wereexpanding capacity, and (b) corporationsinvested in in<strong>for</strong>mation systems as a way ofbeating competitors.Siemens had spent 6 months working with aWeb development contractor that was expertin building HTML pages but had troubleprogramming SQL. They'd promised tolaunch the elaborately specified system 6weeks from our first meeting. We concludedthat many of the features that they wantedcould be adapted from the source codebehind the photo.net online community butthat adding the "knowledge repository"Keep in mind that data model complexity can always be tamed withviews. Note, however, that views are purely syntactic. If a query isrunning slowly when fed directly to the RDBMS it won't run any fastersimply by having been renamed into a view. Were you to have10,000 members of a group, each of whom was requesting one pageper second from the group's private area on your Web site, doing 3-way JOINs on every page load would become a substantial burdenon your RDBMS server. Should you fix this by denormalizing, thusspeeding up queries by perhaps 5X over a join of indexed tables?No. Speed it up by 1000X by caching the results of authorizationqueries in the virtual memory of the HTTP server process.Clean up ugly queries with views. Clean up ugly per<strong>for</strong>manceproblems with indices. If you're facing Yahoo! or Amazon levels ofusage, look into unloading the RDBMS altogether with applicationlevelcaching.5.6 Access Control and ApprovalSuppose that you are building a corporate knowledge sharing site.You might decide to place the server on the public <strong>Internet</strong> tofacilitate employee access while at home or traveling. Perhaps someclose collaborators within other organizations will be allowed access.However, you won't want random people registering at the site andgetting immediate access. Each new user should probably have to beapproved by an administrator.Or perhaps you're building a public online learning community. Youwant users to be identified and accountable at the very least to their<strong>Internet</strong> Service Provider. So you'll want to limit access to only thoseregistrants who've verified receipt of an email message at theaddress that they supplied upon registering. You may also want toreject registration from users whose only email address is athotmail.com or a similar anonymous provider.A community may need to change its policies as the membershipgrows.One powerful way to manage user access is by modeling userregistration as a finite-state machine:85

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

Saved successfully!

Ooh no, something went wrong!