Monday, October 24, 2005

First I'll get to the point, then I'll elaborate.  When designing something for broad consumption, start with an example of a simple implementation and work backwards.  Imploy a test-driven-development approach to your interface and you might avoid several mistaken paths...

 

And to give credit to the source of the advice:

 

CHRIS ANDERSON Each developer has his or her own methodology,

and although there isn’t anything fundamentally wrong with using other

modeling approaches, the problem generally is the output. Starting by writing

the code you want a developer to write is almost always the best

approach—think of it as a form of test-driven development. You write the

perfect code, then work backwards to figure out the object model that you

would want.

 

 ...and now more fluff!  Mostly, this is stream of consciousness but perhaps someone will have something to say or may just find inspiration!

 

For those who aren't privy, I am now a fulltime employee of HPCi.  The reason for hanging up the independent hat and accepting the shackles of fulltime employment is that we mutually want to allow me to have more responsiblity and involvement in higher level deceisions and direction.  Basically, I am incresing my architecture role within the company. 

 

That being said, my involvement in code should migrate upwards such that many of my deliverables are used across the organization.  Sometimes my deliverables are nothing more than design and sometimes, merely suggestions. 

One complexity I am trying to resolve is a continous dependency built into our products on the underlying search technology used.  This goes beyond a traditional Oracle vs. SQL Server agility and the abstraction of data interaction from the business logic and presentation tier.  We use a web-based search product that handles all the details of denormalization in a consistent manner.  It is great at some things, really great.  At other things, like relational data, not so good.  The websites that use this product call directly to the tool's library API to execute searches.  The result of which is woven all the way up to the presentation code so that changing the search mechanism would require extensive modification across all tiers.  What tiers?  exactly!  More importantly, to accomplish otherwise simple things, we often have to write complex logic against the data to shoe-horn in functionality that isn't natively supported.  To further muddy the waters, controls that live on a page are loaded dynmically in an IBuySpy portal sort of way so they are not aware of each other and the page is completely divorced from any specific functionality such as searching.  There are many other reasons why I want to create a proxy class that can handle all this complexity and provide a simple, consistent interface for searches.  My goal is that the synchronization of multiple searches, plus the complexity of search manipulation, could be encapsulated in addition to allow the searching engine and its datastore to be swapped out where the class that consumes the search would not need to change (unless it relied on the internals of the search product, which I also want to expose).

 

My first iteration preceded reading the blog-post-subject-suggestion (write client pice first).  I started a two way eventing model that would broadcast a search intention, via an existing page event model, passing a delegate to a synchonization method, which would then wire the control to a search execution control.  The search execution control would send its search exectution intention through the same eventing system and the controls interested in .  The result is that all controls would then be wired to either execute a search or receive a search.  It worked but it was a mess.  It was immensely complicated and not easy to communicate or document.  scratch that one...

 

I went through several modifications before I finally realized that developers create objects and execute methods and asking them to do much else is instructing them, "please don't use this, its too complicated."  All this eventing and delegate nonesense needs to taken off the developers' plate.  I implemented a singleton search executor and a search manager class that orchestrates the execution and synchronization of the search.  When I was finished, it was much simpler but I was still passing back the very propriatary search results class to the client.  It was still impossible to get the search from another datastore and pass it back through this framework.  

 

That's when I read this short tip and the light bulb lit like the warm glow of a 12AX7 on an old Fendar Twin. 

 

I deleted all the code in the display control that passes the selected criteria to the search manager with the ideal world.  It immediately identified that I not only needed a search result object that was not directly tied to a search tool or data store but I needed a criteria object that could be sub classed for each implementation. 

 

Since the selection of criteria values and the search itself cannot easily be seperated, it is unrealistic to think I could create a completely generic search object hierarchy without completely rewriting the entire website.  However, it is realistic to think I might create a WebsiteCriteria class that internally creates a search specific criteria class and passes the details to the search tool.  Then the search result can be wrapped in a generic search result container.  At this time, the front end requires some of the details of the proprietary search as the listings that are returned are all dependent on the search tool that generate the results.  Therefore, I expose the underlying deatils for those that need them.  Eventually, I'd like to move more and more into the abstraction layer so tat a listing is a listing no matter where it came from.  I think I'm on the right track.  Regardless, the code to use this new structure is incredibly simple.  Create a search manager object.  If you care about synchronizing with other searches, pass a synchronization delegate to the constructor.  Call the execute method, passing a criteria object as your selections.  You will get a search result back.  Any onther class interested in synchronizing will be notified by the single search executor.  Its getting there.  Its much better then every control executing the same search and depending on page events and session for search details.  Baby steps.

 

 

 

 

10/24/2005 6:32:47 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  |  Trackback
Tracked by:
http://blastpr.com/wiki/js/pages/claritin/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/ultram/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/synthroid/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/nexium/index.html [Pingback]
http://blastpr.com/wiki/js/pages/coumadin/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/cialis/index.html [Pingback]
http://blastpr.com/wiki/js/pages/clomid/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/effexor/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/cymbalta/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/celebrex/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/prozac/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/lexapro/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/viagra/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/soma/index.html [Pingback]
http://blastpr.com/wiki/js/pages/zoloft/index.html [Pingback]
http://blastpr.com/wiki/js/pages/lipitor/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/tramadol/index.html [Pingback]
http://blastpr.com/wiki/js/pages/nexium/index.html [Pingback]
http://blastpr.com/wiki/js/pages/synthroid/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/paxil/index.html [Pingback]
http://blastpr.com/wiki/js/pages/cymbalta/index.html [Pingback]
http://blastpr.com/wiki/js/pages/melatonin/index.html [Pingback]
http://blastpr.com/wiki/js/pages/prilosec/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/hoodia/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/melatonin/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/clomid/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/wellbutrin/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/coumadin/index.html [Pingback]
http://blastpr.com/wiki/js/pages/soma/index.html [Pingback]
http://blastpr.com/wiki/js/pages/ultram/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/rainbow-brite/index.html [Pingback]
http://morningside.edu/mics/_notes/pages/lipitor/index.html [Pingback]
http://blastpr.com/wiki/js/pages/celebrex/index.html [Pingback]
http://blastpr.com/wiki/js/pages/effexor/index.html [Pingback]
http://split-dalmatia.com/split-dalmatia.com/images/docs/73811526/index.html [Pingback]
http://pddownloads.com/docs/21991908/index.html [Pingback]
http://vladan.strigo.net/wp-includes/js/docs/86309858/index.html [Pingback]
http://plantmol.com/docs/99021843/index.html [Pingback]
http://thejohnslater.com/pix/img/docs/56008043/index.html [Pingback]
http://ipsilon.hr/ipsilon.hr/cms/4/lib/docs/24066563/index.html [Pingback]
http://swellhead.netswellhead.net/docs/84545083/index.html [Pingback]
http://islands-croatia.comislands-croatia.com/includes/js/docs/60974094/index.ht... [Pingback]
http://pspdesktops.com/fileupload/store/docs/33460308/index.html [Pingback]
http://martinrozon.com/images/photos/docs/43274485/index.html [Pingback]
http://pddownloads.com/docs/66275653/index.html [Pingback]
http://thebix.com/includes/compat/docs/15870923/index.html [Pingback]
http://lecouac.org/ecrire/lang/docs/30125734/index.html [Pingback]
http://promocija.com.hr/promocija.com.hr/includes/js/docs/52060005/index.html [Pingback]
http://promocija.com.hr/promocija.com.hr/includes/js/docs/37348396/index.html [Pingback]
http://coolioness.com/attachments/docs/03698289/index.html [Pingback]
http://pspdesktops.com/fileupload/store/docs/04061117/index.html [Pingback]
http://pspdesktops.com/fileupload/store/docs/18769945/index.html [Pingback]
http://realestate.hr/templates/css/docs/36157459/index.html [Pingback]
http://slaterjohn.com/downloads/2col/28436634/index.html [Pingback]
http://vladan.strigo.net/wp-includes/js/docs/04726190/index.html [Pingback]
http://ncdtnanotechportal.info/generator/docs/13227634/index.html [Pingback]
http://lecouac.org/ecrire/lang/docs/20007231/index.html [Pingback]
http://coolioness.com/attachments/docs/76375390/index.html [Pingback]
http://allfreefilms.com/wp-includes/js/27702077/index.html [Pingback]
http://allfreefilms.com/wp-includes/js/46226552/index.html [Pingback]
http://vladan.strigo.net/wp-includes/js/docs/09763218/index.html [Pingback]
http://pddownloads.com/docs/94929363/index.html [Pingback]
http://pddownloads.com/docs/15972574/index.html [Pingback]
http://slaterjohn.com/downloads/2col/51579700/index.html [Pingback]
http://coolioness.com/attachments/docs/60340594/index.html [Pingback]
http://swellhead.netswellhead.net/docs/79619129/index.html [Pingback]
http://coolioness.com/attachments/docs/83777724/index.html [Pingback]
http://witze-humor.de/templates/images/docs/83157240/index.html [Pingback]
http://hrvatska.biz/wp-includes/js/docs/80692203/index.html [Pingback]
http://blog.netmedia.hr/wp-includes/js/docs/84238305/index.html [Pingback]
http://lecouac.org/ecrire/lang/docs/77066936/index.html [Pingback]
http://realestate.hr/templates/css/docs/71546796/index.html [Pingback]
http://swellhead.netswellhead.net/docs/92808772/index.html [Pingback]
http://plantmol.com/docs/24471383/index.html [Pingback]
http://martinrozon.com/images/photos/docs/75270452/index.html [Pingback]
http://entartistes.ca/images/images/docs/81367526/index.html [Pingback]
http://temerav.com/images/menu/20420171/index.html [Pingback]
http://temerav.com/images/menu/05559064/index.html [Pingback]
http://islands-croatia.comislands-croatia.com/includes/js/docs/54089144/index.ht... [Pingback]
http://legambitdufou.org/Library/docs/15090396/index.html [Pingback]
http://swellhead.netswellhead.net/docs/05235252/index.html [Pingback]
http://easytravelcanada.info/js/pages/11/tramadol/ [Pingback]
http://easytravelcanada.info/js/pages/9/prozac/ [Pingback]
http://easytravelcanada.info/js/pages/10/soma/ [Pingback]
http://ina-tv.sk/img/cialis/ [Pingback]
http://easytravelcanada.info/js/pages/7/nexium/ [Pingback]
http://easytravelcanada.info/js/pages/4/cymbalta/ [Pingback]
http://easytravelcanada.info/js/pages/8/paxil/ [Pingback]
http://simpletravelcanada.info/js/pages/27277365/ [Pingback]
http://sevainc.com/bad_denise/img/12/viagra/ [Pingback]
http://easytravelcanada.info/js/pages/1/accutane/ [Pingback]
http://easytravelcanada.info/js/pages/11/ultram/ [Pingback]
http://sevainc.com/bad_denise/img/1/celebrex/ [Pingback]
http://sevainc.com/bad_denise/img/12/zoloft/ [Pingback]
http://sevainc.com/bad_denise/img/9/prozac/ [Pingback]
http://sevainc.com/bad_denise/img/6/lipitor/ [Pingback]
http://jemnemelodierecords.sk/img/cialis/ [Pingback]
http://sevainc.com/bad_denise/img/1/accutane/ [Pingback]
http://sevainc.com/bad_denise/img/2/celexa/ [Pingback]
http://sevainc.com/bad_denise/img/11/ultram/ [Pingback]
http://easytravelcanada.info/js/pages/2/cialis/ [Pingback]
http://easytravelcanada.info/js/pages/12/zoloft/ [Pingback]
http://easytravelcanada.info/js/pages/4/coumadin/ [Pingback]
http://easytravelcanada.info/js/pages/5/effexor/ [Pingback]
http://sevainc.com/bad_denise/img/8/prilosec/ [Pingback]
http://easycanada.info/js/pages/viagra/ [Pingback]
http://sevainc.com/bad_denise/img/10/soma/ [Pingback]
http://easytravelcanada.info/js/pages/6/lipitor/ [Pingback]
http://jemnemelodierecords.sk/img/viagra/ [Pingback]
http://easytravelcanada.info/js/pages/5/hoodia/ [Pingback]
http://sevainc.com/bad_denise/img/6/lexapro/ [Pingback]
http://easycanada.info/js/pages/cialis/ [Pingback]
http://easytravelcanada.info/js/pages/8/prilosec/ [Pingback]
http://odin.net/images/pages/52807681/free-online-porn-samples.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/teen-nude-school-bus.html [Pingback]
http://odin.net/images/pages/35694472/art-bdsm.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/teenage-girl-nude.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/sexy-makeup-pics.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/barbue-girl.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/blonde-porn-star.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/adult-free-preview.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/tylene-buck-bikini-movies.... [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/aunt-judy-porn-site.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/nauty-celebritys-having-sex... [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/college-girls-escorts.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/asian-woman-for-anal-sex.ht... [Pingback]
http://odin.net/images/pages/35694472/pussy-movie-tralers.html [Pingback]
http://odin.net/images/pages/35694472/kate-winslet-nude-scenes-in-jude.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/hot-russian-models-teen-age... [Pingback]
http://odin.net/images/pages/52807681/sexy-thai.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/adult-swim-crest.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/statistics-on-teens-allowan... [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/oops-celeb.html [Pingback]
http://odin.net/images/pages/52807681/sixteen-inch-penis.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/stories-of-kakashi-and-sak... [Pingback]
http://odin.net/images/pages/52807681/lolita-boy-nude-pics.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/teen-trends-courtney-doll.h... [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/free-pictures-of-amateur-po... [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/mother-and-daugther-sex-st... [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/camping-naturisten-free-pi... [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/ametuer-zoo-girls.html [Pingback]
http://odin.net/images/pages/35694472/babe-tv.html [Pingback]
http://odin.net/images/pages/35694472/baby-got-back-by-throwdown.html [Pingback]
http://odin.net/images/pages/35694472/stories-housewives-seducing-husbands-frien... [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/hentai-spider-man.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/andy-kim-baby-i-love-you.h... [Pingback]
http://odin.net/images/pages/35694472/jenny-maccarthy-nude.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/teen-young-bbw.html [Pingback]
http://odin.net/images/pages/52807681/rainbow-coalition-gay.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/free-hardcore-heterosexual-... [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/free-sex-positions-clips.h... [Pingback]
http://odin.net/images/pages/35694472/pics-of-marilyn-manson.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/nude-cassie.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/gay-baseball-player.html [Pingback]
http://odin.net/images/pages/35694472/gay-justin-berfield.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/32162341/free-xxx-3some-pictures-tee... [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/pussy-licking-techniques.ht... [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/anal-sex-shemale.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/what-is-the-mature-ripened... [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/teen-girl-preview.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/milking-tits-escorts.html [Pingback]
http://odin.net/images/pages/52807681/all-fours-thumbnail-naked-girl.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/adult-free-gay-porn.html [Pingback]
http://cidesi.com/images/metro/metro2/pages/99493954/baby-pool.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/53348735/adult-bib.html [Pingback]
http://gatewayplayhouse.com/photos/cai/pages/35807953/pictures-of-black-girls.ht... [Pingback]
http://odin.net/images/pages/52807681/herrin-il-xxx.html [Pingback]
http://www.signalprocessingsociety.org/community/forum/buy-phentermine-online.ht... [Pingback]
http://www.signalprocessingsociety.org/community/forum/buy-cialis-online.html [Pingback]
http://www.signalprocessingsociety.org/community/forum/buy-hydrocodone-online.ht... [Pingback]
http://www.signalprocessingsociety.org/community/forum/buy-vicodin-online.html [Pingback]
http://www.signalprocessingsociety.org/community/forum/buy-soma-online.html [Pingback]
http://www.signalprocessingsociety.org/community/forum/buy-tramadol-online.html [Pingback]

Theme design by Jelle Druyts

Pick a theme: