archive-com.com » COM » D » DESIGNCAFFEINE.COM

Total: 264

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Web-Based Distributed Systems with XML: Loan Exchange B2B Company Case Study
    distributed system it would be more helpful if the information is in the form that can be reused in many different ways 13 For this to be possible every party that wishes to use the proprietary format they must build very expensive slow and brittle software adapters which are only good until the next release of the format by the party that invented that standard The control of this standard resides in private hands and thus can be changed or even withdrawn without notice 13 In the case of IMX the binary and text delimited standard make it impossible for IMX to extract information reliably from the LOS software s proprietary storage formats as these change with every new release of the software and IMX has no way to know which version is currently running on which of our several thousand Broker customers This brittle and non validating nature of the proprietary standard make it necessary for the Brokers to enter validate and maintain two copies of the same information In addition proprietary formats are often protected by a slew of licenses copyrights patents and intellectual property rights restrictions 12 This makes them hard to share especially among competition XML on the other hand is completely free and unencumbered by these restrictions The challenge of interoperability has grown exponentially with the number of systems The most challenging aspect of this problem is the ability to exchange information services 14 The system s language defines how it is constructed and used and different proprietary standards can not connect with one another easily This proprietary patented standard strategy may have worked well in the past as a strategy for locking your customers into your format but in this widely distributed world exclusivity is hardly a goal one can still attempt to pursue To be effective in today s distributed environment a wide variety of dissimilar information systems developed independently by different software engineering groups across countries time and communities must share timely accurate complete information in a form that is mutually understandable 14 This goal is clearly not met by the use of any proprietary standard Thus the legacy binary and text formats suffer from being brittle from any lack of schema and validation and also from the difficulty of being non human readable and thus difficult to debug They are not at all future proof against upgrades and handle any changes very poorly resulting in unpredictable system behavior Thus any proprietary standard is a bad choice for a middle layer of a Web based DS The new emerging XML standard In recent years a new standard XML has been developed by the W3C to address the requirements of commercial web publishing and to enable further expansion of web technology into new domains of distributed document processing 24 XML holds the promise to improve the communication between the distributed systems by removing the shortcomings of HTML and proprietary formats that we have so far discussed XML provides a powerful information technology More specifically it provides an interpreted flexible means of transmitting not only data but also its semantics and structure 35 XML aims to have as many as possible of the following attributes Human readable Machine readable Object oriented hierarchical and meta document object model Self validating Must allow for easy query of the document elements and for easy transformation Extensible and graceful to upgrade Future proof and organically evolving 14 10 XML has all these superior qualities making it a natural choice as the next communication standard of choice More importantly the attribute of being easily machine readable in a standardized way using SOAP allows XML to make direct RPC calls to a Web Service providing true integration for the WBDS XML has superior qualities as communication standard of choice For a format to be both machine and human readable is quite a challenge Human logic is often fussy and language has many permutations so format must allow for this It must also maintain a rigid structure to be understood by computer parsers and generators Fortunately XML takes care of both of these seemingly conflicting requirements gracefully The key is self description by use of generic meta data Like HTML XML is a mark up language which relies on nested tags and tag attributes to represent data and data structure For example the property address of a loan in our B2B exchange can be represented as follows loan property address street 10 Maple Drive street city Springfield city state IL state address property loan As you can see this is quite human readable we did not have to tell you it is a loan s property address as this information is already included in the document This format is also machine readable through two major types of parsers even driven parser SAX and tree based parser DOM Because the tags in the well formed document explain their contents so precisely this information can be used by the machine to discover the document s meaning and use it elsewhere This format is also object oriented hierarchical and adheres to meta document object model Object orientation is enforced through the hierarchy of nested meta date tags We know for example that loan is an object of which property is an attribute Property itself is a composite object it contains an address object where city street and state are simple objects or text attributes see second example below We also mentioned that XML allows for some of the human fussiness which imparts it additional flexibility Compare previous document s XML format with this also perfectly valid representation of the same data loan property address street 10 Maple Drive city Springfield state IL property loan The same data which was previously contained in several simple objects like street has now become a direct part of the attributes of the address object Both XML documents are perfectly valid from human standpoint but a change like that would mean a complete disaster for a machine translators if it were HTML or a proprietary standard However because the data is in XML DOM and SAX parsers would have no problem interpreting this new data format because that tag metadata still imparts firm specific structural meaning to the document s contents But how do we know that this new format is valid for our application How do we provide this fussiness and flexibility to our format The answer is of course automatic validation Validation specification is patterns expressed in some formal way in particular for use by the program the pre and post conditions we want to assert about the document s structures it clarifies a programmers tasks and capabilities and nature of data 17 Validation is the key to usefulness of XML because it imparts meaning to a particular piece of data and rigorously enforces the format for the purpose of sharing the data with other systems 18 Currently there are two major validation formats Document Type Definition DTD and XML Schema Only DTD is accepted by the W3C 22 DTD is truly a validation specification it describes the number and the nature of attributes and elements and their nesting pattern However DTDs have many shortcomings they are not re usable or extensible They must be created purely by hand and can not be automatically inferred from the related XML Also DTD is a stand alone entity in a format all its own and thus must be treated and validated differently from the XML data For large and complicated documents DTDs get quite large and they can not be split into pieces which would describe portions of the main document 19 Also very importantly it does not impart data type meaning such as integer double text month day 4 digit year etc to the elements merely providing us with a convenient notation 19 XML Schema on the other hand is a still emerging format supported by several major software vendors including Microsoft 100 Schema is a collection of rules about a document s structures which also includes validation and information about meaning of elements 17 Schema has the ability to specify this element is day this element is month this element is a 4 digit year whereas a validation language like DTD concentrates on lexical structural issues this element must conform to regular expression nnnn nn nn So schema contains somewhat different validation information which also carries additional meta data about the element s data type As such schema can provide a more rigorous validation then the DTD but more importantly it can be used to both constrain and explain the document 20 The current draft of the W3C XML Schema proposal states The purpose of a schema is to define and describe a class of XML documents by using these markup constructs to constrain and document the meaning usage and relationships of their constituent parts datatypes elements and their content attributes and their content entities and their contents and notations Schema constructs may also provide for the specification of additional information such as default values Schemas are intended to document their own meaning usage and function through a common documentation vocabulary Thus XML Schema Structures can be used to define describe and catalogue XML vocabularies for classes of XML documents 22 XML Schema is also free of other DTD restrictions it is written in the original XML format and is thus XML compliant which gives users a lot of freedom in creating automated Schemas and breaking up and re using larger Schemas as a set of smaller specific validation rules 21 Very importantly both DTD and XML Schema allows for easy versioning and graceful future upgrades in the data formats This can be accomplished by either sending the schema or DTD inline along with every XML document or better yet providing a set of validation templates available on the web instantly accessible and versioned so both a version of the format and rules themselves can be gracefully changed as the needs of the format evolve organically within a community Such ease of upgrade allows for the format to begin very simply and evolve quickly along with the needs of the people who use it In the past to insure the industry s use of a specific format an industry association had to be involved in some way to appease the conflicting parties and come up with a format that meets the need of everyone involved This lengthy process often takes years and any upgrade to the format that has been finally developed takes months and cooperation of the entire industry to approve These are difficult propositions and XML can be used effectively to shorten the time for developing and maintaining a standard entirely without a ruling body of any kind Several industries have chosen to form consortiums that define the new XML standards that everyone in that industry should abide by One of these standards Solution Exchange Standard SES markup language standard supported by the consortium of over 60 hardware software and communication companies to facilitate the exchange of technical information on the web is described with this announcement The standard has been designed to be flexible It is independent of any platform vendor or application so it can be used to exchange solution information without regard to the system it is coming from or going to Additionally the standard has been designed to have a long lifetime SGML offers room for growth and extensibility so the standard can easily accommodate rapidly changing support environments 40 In relevance to our Mortgage Industry B2B we must mention MISMO the new XML standard developed by major Broker and Lender companies to replace the old brittle proprietary MORNET standard developed by Fannie Mae 99 MISMO was developed by the Mortgage Industry Standards Maintenance Organization in association with Mortgage Bankers Association of America 101 Although XML based MISMO is a much more flexible standard then MORNET it still suffers from intransigency of being developed and approved by the central party and thus time to develop approve and release any changes to MISMO is still quite long MISMO work began in 1998 with the release of the W3C XML 1 0 standard Yet it took till June 15 2000 to get the MISMO 1 0 approved 102 This is scarcely the way to go in a fast web based environment in which B2B companies like IMX have to work Thus even though it is exciting and gratifying to see many industry consortiums come up with XML based standards like MISMO and SES some parts of which may be reusable true power of XML based communication comes from Web Services integration model not from the top down format standardization by an industry consul In a Web Services model XML standard is flexible and can be changed on a day to day basis as different businesses open up their internal core mission critical systems to collaboration in a SOAP based XML format to form a true flexible WBDS Thus in a Web Services model interested companies and communities can come together purely on the need to basis and create XML standards that answer the exact needs of that group in just a matter of days Software can also be created quickly to parse translate and validate this XML data If any part of the standard needs to change this again can be accomplished quite quickly and painlessly and even several versions of the same standard can exist without customary confusion This capability allows not only the companies within a particular industry to exchange the format but also a variety of heterogeneous agencies that can exchange their data in a natural way Let a thousand DTDs bloom on the web is the goal of such an organic collaboration because as business conditions and requirements change so can new XML standards be adopted quickly to meet these challenges 10 One of the important XML capabilities that makes this kind of community data sharing possible is the ability to easily transform XML into HTML for viewing or into another XML document of a different format to be sent to another part of the distributed system 17 This language is called eXtensible Stylesheet Language or XSL With XSL any XML document can be transformed into a different format in just several hundred lines of code that can be written in just a few hours Compare this to building and validating a C code adapter to a proprietary data format or an HTML search engine data parser XSL is one more step in insuring that the XML format is future proof If a new data format is demanded by a business need or a change in the community XSL can be easily deployed to transform the older XML format into the newer version This version can also be sent in the request for the Web Service thus completing the information cycle Client asks for a specific format and the server can choose among several XSLs to return the document in an exact format the client has requested If the version needed is not available the client can deploy it s own XSL to transform the data into the exact format required for passing the data down the line to the next distributed system component Thus XSL is an essential component in a web distributed system something that HTML and proprietary formats can not provide with any degree of reliability without much time and expense Thus we have shown that XML has evolved to overcome the shortcomings of the older web formats XML has several important characteristics It is a Human readable allows for fussy logic and growth b Machine readable accurate object presentation c Self validating with DTD and newly developing XML Schema Validation rules can be made available on the web for easy versioning d Extensible for graceful upgrades in schema e Transformable for easy change in formats and organically generated adapters f Future proof with organically evolving standards which change as the community grows and data requirements change XML Based Web Services Using SOAP Web Service is any program that is callable by another program across the Web in a platform language object model neutral fashion using standardized Web Services protocols 103 The Web Services protocols include Simple Object Access Protocol SOAP Universal Description Discovery and Integration UDDI and Web Services Description Language WSDL All these protocols are XML based Thus a Web Service to an application is what Web page is to a person it allows one machine to automatically discover the format and information that the other machine has and allows it to get and utilize this information in a purely automatic fashion without any need for human intervention SOAP is at it s simplest level an XML Based RPC Methodology SOAP behaves in a similar fashion to the HTTP headers the only difference is that SOAP describes the functionality that must occur as a result of the exchange WSDL serves as a mechanism for creating endpoints or destinations for the SOAP requests WSDL files define what a request should contain and the data types of each element in the request WSDL file can be considered a stub which defines the way application generating the stub works 117 UDDI is the equivalent of the Web Yellow Pages Businesses such as IMX can register their web services in the UDDI business registry and in doing so let the partners and anyone else who knows and uses UDDI easily find the Web Services they need 118 UDDI provides a standard place and a standard interface for Web Services query and storage The process for a typical Web Service is described below It follows the basic publish find bind cycle 121 In this example the service provider publishes its service interface a WSDL document to a service registry a UDDI Provider A service requester searches the service registry and finds a web service that suits its needs Catalogs of reusable business collaboration definitions and forms is also available

    Original URL path: http://www.designcaffeine.com/articles/web-based-distributed-systems-with-xml-loan-exchange-b2b-company-case-study/ (2016-04-27)
    Open archived version from archive


  • Social Networking
    customers interact with data through a slew of services made possible by technologies such as electronic data exchange secure credit card processing and sophisticated communication tools VNCs are reshaping entire industries by providing a new level of customization of content and commerce and by engaging the users in producing information MS CIS Program Paper Golden Gate University November 2000 Filed Under 56 Articles on Digital Strategy Mobile and Search Tagged

    Original URL path: http://www.designcaffeine.com/tag/social-networking/page/2/ (2016-04-27)
    Open archived version from archive

  • Improve the Usability of Search-Results Pages: Add Sophisticated but Easy-to-Use Filtering and Sorting Controls
    Using personas allows the designer to prioritize which users are the most important ones to design for those models become one or two primary personas for your project Other important classes of users become secondary personas Thus the key to a successful just enough design is to address the needs of the primary personas without unduly inconveniencing the secondary personas For more discussion about personas as an effective design tool see Resources for links to Cooper s excellent books About Face 2 0 and The Inmates Are Running the Asylum Regardless of whether you choose to use persona modeling in your design it is invaluable to conduct frequent usability tests with real users throughout the design process The usability tests should be conducted frequently and as early in the design process as possible using static HTML or even low tech paper prototypes It may initially seem like a hassle but if you consider the high cost of modification and quality assurance of the finished software product versus the low cost of modifying a paper prototype obviously performing detailed product design before coding begins is well worth the effort Persona based design coupled with frequent usability testing is the most cost effective way of ensuring that your final product will be successful in helping your users reach their goals Although filters are hard to design the good news is they are often relatively easy to implement which you will see as we add the category and price filter to my chocolate cookbook search results page Designing a category filter with drop down control One popular implementation of the category filter is a drop down control This implementation is especially handy if many categories need to be displayed and screen real estate is tight Note that providing this filter up front often makes little sense Currently Amazon has 35 categories and few people will ever make the effort to read all 35 categories to find out which one fits the subject best Most likely if users wanted to put in the time to learn the categories they would browse instead of search The key to a successful category filter is instead to narrow the categories only to those constrained by the search results so the user can more easily choose the most likely category from the smaller more relevant list Usually the category with the most items contains the most relevant search results so it makes sense to show it first with other relevant categories appearing in the order of descending item count To make this ordering scheme clear to the user it helps to show the item count after the category name In our case Cooking would clearly be the first category with the most items making for easy user selection For someone looking for cookbooks it would be obvious to select Cooking and avoid the Persperational Fiction category as shown in Figure 2 Search filters can be implemented using SQL in the following way Assuming the original search query used to retrieve chocolate items was SELECT FROM item WHERE title chocolate simplified for clarity ORDER BY average customer review DESC The list of categories for these search results can be obtained by using the original SQL search condition of title chocolate modified with a GROUP BY clause SELECT category name category id COUNT AS items count FROM item WHERE title chocolate GROUP BY category name category id ORDER BY COUNT DESC To construct the filter we first need to create a small helper class HtmlOption Each object of this class represents one option in the drop down HTML select control Value objects must be serializable for use in distributed Java systems like J2EE public final class HtmlOption implements java io Serializable Both value and text are strings private final String val private final String text Constructor public HtmlOption String text String val this text text this val val Accessors only with no corresponding mutators public String getValue return val public String getText return text Each object of this class will be immutable which is a good object oriented design practice and has many advantages As Joshua Bloch writes in his famous book Effective Java immutable objects are simple have only one state can be shared freely and are inherently thread safe Now we have everything we need to write the code that will generate our category filter ResultSet rs Standard JDBC the rest omitted for clarity ArrayList categoriesFilter new ArrayList Add the first option All Categories String text All Categories String val 0 categoriesFilter add new HtmlOption text val Add the default no filter option while rs next text rs getString category name rs getString items count val rs getString category id categoriesFilter add new HtmlOption text val After this method runs we will end up with an ArrayList categoriesFilter full of the custom HtmlSelect objects that represent the options in the HTML select control Under a typical Model View Controller framework the completed categoriesFilter object can be sent to a JSP JavaServer Pages page or Apache Velocity template to render the category filter as a simple HTML drop down control One simple way to do this is to use the following Velocity macro macro renderHtmlSelectOptions optionsList selectedValue foreach htmlOption in optionsList if selectedValue htmlOption Value option value htmlOption Value SELECTED htmlOption Text option else option value htmlOption Value htmlOption Text option end end end Note that in the context of Velocity we can safely use the operator to compare Java String objects For more information about Apache Velocity see Resources To render the category filter the above macro is called as follows from the Velocity template select name categoryid size 1 renderHtmlSelectOptions categoriesFilter gridViewRequest CategoryId select Note that Velocity will conveniently map the shorthand attribute notation gridViewRequest CategoryId to the corresponding getter method call gridViewRequest getCategoryId according to the standard JavaBeans convention At runtime assuming none of the categories have been selected the above macro will yield select name categoryid option value 0 SELECTED All Categories option option value 2 Cooking 2 234 option option value 5 Persirational Fiction 1 987 option option value 8 History 1 385 option option value 34 Agriculture 998 option select It is easy to see how immediately useful such filtering control would be to users they can just select from the list of the categories relevant to their search without learning all 35 categories on your site Users often find the interface to be less confusing if the order of the categories in the drop down menu always remains in the same relevance order highest items count first regardless of how the items in the grid are sorted Of course how you sort the categories in your particular filter will depend entirely upon what your users are trying to accomplish Designing minimum and maximum price filters In Figure 2 above the item price range filter is prefilled with the available maximum and minimum prices of the range of items in the search results providing both a good visual clue to how the control operates and a good starting point for the user s exploration Prefilling appropriate filter controls with a range of valid values is a nice touch and fairly easy to implement Maximum and minimum prices for the particular search results can be obtained similarly to the categories above SELECT MAX price AS max price MIN price AS min price FROM item WHERE title chocolate The values yielded by this query could be stored in a simple custom MinMaxPriceFilter value object that can be rendered easily in the JSP or Velocity template using standard JavaBeans display code The values for the maximum and minimum price controls need only be loaded from the database if they are not already provided by the GridViewRequest object as discussed below Implementing sorting Headers or drop down Sorting is another essential tool that allows users to manipulate the search results Unlike filtering sorting is a term that most users understand intuitively and can be simply labeled as Sort by as Amazon com does Figure 3 Just as we did earlier with the filtering controls we made the entire sorting control including the caption read like a natural English sentence Figure 3 Amazon com s sorting implementation using the Sort by caption To come up with a good sorting scheme focus on the particular persona s goals that do not change instead of on tasks that change as technology and design evolve For example in the chocolate cookbook use scenario I set a goal to find the best quality cookbook in the 5 to 0 dollar range My tasks were to filter based on price and category and to sort in the most highly rated items first direction I did not need the tool that sorted items based on category publishing date author s last name or the number of recipes Adding those options would create more cognitive noise clutter up the UI and make it hard to find the functionality I actually needed to accomplish my goal Sorting can be implemented in the UI using clickable table headers like those on Appartments com or using the HTML drop down control like those on Amazon com Clickable table headers save screen real estate and look slick However most large e commerce sites implement result sorting as a drop down control for several good reasons First not all the attributes on which personas would like to sort by are feasible to put in a grid Second the sort drop down is more flexible and completely independent from the format and nature of the data in the grid Third and most importantly in this implementation we can specify precisely what items will appear first using natural language that maps best to a user s mental model For example the Price Cheapest First sort is clear unambiguous and goal oriented In the drop down sort control avoid industry terms such as descending or ascending most users find them confusing Use sorting terms appropriate to the attribute being sorted Publication Date Newest First is a good way to describe the SQL query sort ORDER BY publish date DESC A site with good usability should have a valid default sort order which loads before the user has a chance to change anything suitable for goals of a primary persona The code below illustrates how to create a dynamic drop down sort control The default sort order is Price Cheapest First ArrayList sortOrder new ArrayList sortOrder add new HtmlOption Price Cheapest First 0 sortOrder add new HtmlOption Price Highest First 1 sortOrder add new HtmlOption Publication Date Newest First 2 The drop down control can be rendered in the Apache Velocity template using the renderHtmlSelectOptions Velocity macro introduced previously select name sortorder size 1 renderHtmlSelectOptions sortOrder gridViewRequest SortOrderId select At runtime the call to the macro generates the following HTML select name sortorder size 1 option value 0 selected Price Cheapest First option option value 1 Price Highest First option option value 2 Publication Date Newest First option select It is easy to go overboard with adding sorting and filtering options to the UI when confusion pervades the persona s goals and how specific sorting and filtering options help her accomplish those goals Once again picking the right primary persona to design for and running frequent usability tests will ensure that you add only the appropriate filtering and sorting controls and avoid visual noise Remember the entire sorting control including the caption should read like a natural sentence Capturing filtering and sorting values using GridViewRequest One way to simplify capturing users selections of sorting and filtering UI objects is to use the GridViewRequest object introduced in the code samples above This value object VO interacts with the preloaded filter objects in the Velocity template to generate the dynamic values of all the filters and sorting selections in the user interface GridViewRequest provides a convenient bridge between HttpServletRequest and business objects code and uses good object oriented design practices such as achieving object immutability by using a static factory method that calls a private constructor see Effective Java Value objects must be serializable for use in distributed Java systems like J2EE public class GridViewRequest implements java io Serializable Private attributes private String parameter Simplified for clarity use tokenize implementation private int categoryId Store as int but provide 2 accessors as int and as String private int sortOrderId Store as int but provide 2 accessors as int and as String private float minPrice private float maxPrice Private constructor ensures immutability private GridViewRequest super This static factory method replaces the constructor It creates the VO directly from the HttpServletRequest object We need to collect the incoming values for 1 search parameter tokenized 2 category 3 min price 4 max price 5 sort direction All these user inputs need to be cleaned and parsed Default is 0 0 for prices and 0 for categoryId and sortOrderId public static GridViewRequest getInstance HttpServletRequest request GridViewRequest gridViewRequest new GridViewRequest Note tokenize the user s search parameters as needed using a good Java util Tokenizer implementation or similar see the Resources section for examples listViewRequest parameter cleanString request getParameter param Min Price Filter try If empty min price is 0 0 if isEmpty request getParameter minprice listViewRequest minPrice 0 0 else Try to parse the min price listViewRequest minPrice Float parseFloat cleanString request getParameter minprice catch Exception e Exception resets min price back to 0 0 listViewRequest minPrice 0 0 Parse and set maxPrice in a similar manner omitted for clarity Parse and set sortOrderId Default is 0 i e sort order Cheapest first try If empty sortOrderId is 0 if isEmpty request getParameter sortorderid listViewRequest sortOrderId 0 else Try to parse the sortOrderId listViewRequest sortOrderId Integer parseInt cleanString request getParameter sortorderid catch Exception e Exception resets sortOrderId back to 0 listViewRequest sortOrderId 0 Parse and set categoryId in the similar manner omitted for clarity Provide only accessor methods for all attributes to keep the object immutable Velocity calls toString method on the attribute This method returns String to support Apache Velocity s attribute quick access scheme public String getCategoryId return Integer toString categoryId Velocity calls toString method on the attribute This method returns String to support Apache Velocity s attribute quick access scheme public String getSortOrderId return Integer toString sortOrderId Add similar getter methods for parameter minPrice maxPrice etc utility methods A quick static helper method to cleanup the string public static String cleanString String dirty if null dirty return You may also want to remove or encode any unsafe string attributes etc in this method omitted to safe space return dirty trim A quick static helper method determine if the string is empty or null public static boolean isEmpty String dirty if null dirty dirty length 1 return true return false End of GridViewRequest class The object of the GridViewRequest class renders itself completely and cleanly directly from the HttpServletRequest object in one simple call to the static factory method and remains immutable for its entire lifetime Once formed it can be passed to the method that constructs the SQL for the item search where the user s chosen values for the filter and sort controls can be applied dynamically to the search results query findItemWithFilter GridViewRequest vo Make appropriate adjustments for tokenized parameter String sql SELECT FROM item WHERE title vo getParameter Apply category filter if supplied if vo getCategoryId equals 0 or use 0 for the vo accessor method that returns int sql AND category id vo getCategoryId Apply min price filter if supplied getMinPrice returns a float it must be formatted appropriately for use in SQL if vo getMinPrice 0 0 Using and subtracting 1 cent from MinPrice is a quick method to defeat Java float s formatting inconsistencies sql AND price vo getMinPrice 0 01 Use analogous method for MaxPrice only make sure to add 1 cent instead of subtracting it omitted for clarity Apply the sort order using Java case statement Make sure to use vo accessor method that returns an int switch gridViewRequest getSortOrderIdAsInt case GridViewRequest NEWEST FIRST 2 sql ORDER BY PUBLISH DATE DESC break case GridViewRequest MOST EXPENSIVE FIRST 1 sql ORDER BY PRICE DESC break the rest of sorting options are omitted to save space default default sort order case GridViewRequest CHEAPEST FIRST or 0 sql ORDER BY PRICE ASC Run the SQL normally to get the items This method would be more efficient if I had used a StringBuffer to construct the SQL query string but I used the overloaded operator for clarity It goes without saying that your finished code should have search parameter parsing and all of the error handling and data cleanup of the incoming parameters associated with a Web application Traditional HTML controls are not the only way to implement filtering functionality As I explain in the next section to create a truly world class experience for your users sometimes it pays to look outside the traditional Internet browser box World class filtering using category links As I already mentioned the concept of filtering is foreign to most users Provided that sufficient amount of screen real estate is available a truly world class alternative to a drop down filtering control is to use category links as shown in Figure 4 Figure 4 Category links and price extraction provide a natural and obvious filtering alternative Click on thumbnail to view full sized image Following one of the links will have the same effect as selecting one of the categories from a drop down control and pressing the Go button in the previous desgin However links have many advantages over the drop down control They are highly visible and intuitive to use They are the original and universally accepted form of Web navigation They don t require an additional click to see or to select from a drop down control Users inherently feel safe selecting links because if things go wrong users feel they can just click the Back button Most importantly well designed links have the advantage

    Original URL path: http://www.designcaffeine.com/articles/improving-search-results-usability-through-filtering-and-sorting/ (2016-04-27)
    Open archived version from archive

  • Plotting PIA
    Greg Nudelman Cohesive real world guidance to creating mapping and deploying NET Primary Interop Assemblies PIAs Practical advice on creating PIAs three alternative methods for NET solution mapping and robust ClearCase integration using absolute file path Published in ASP NET Pro November 2005 Filed Under 56 Articles on Digital Strategy Mobile and Search Tagged With Software Engineering Popular Upcoming Events Case Studies 1 Prototype Material Design Featured 8 Mobile UX

    Original URL path: http://www.designcaffeine.com/articles/plotting-pia/ (2016-04-27)
    Open archived version from archive

  • Timestamp-Based Caching Framework: Current Data with Peak Performance
    use this loading method objects need only implement a simpler Timestamped interface shown in the code below Access to a static loading method allows TBCF to be compatible with an even greater range of legacy systems public interface Timestamped public String getId public long getTimestamp To allow users the ability to plug in any caching scheme LRU LFU etc a simple Cache interface which extends java util Map is used to denote the caching class public interface Cache extends java util Map Additional methods for Cache not found in Map Returns the maximum size of the cache public int getMaxSize The caching class is based on a popular LRU algorithm called LRULInkedMapCache because it was created by extending the LinkedHashMap class which has been provided in the standard java util package since J2SE 1 4 Whenever possible we use standard java util interfaces Collection List and Map as return types for our framework methods To address multithreading and synchronization concerns we use synchronized wrappers in the Sun Java naming convention xxxTable wraps xxxMap We have developed our CacheManager using the Data Access Object DAO design pattern the CacheManager automatically loads some objects from the cache and others from the database insulating the caller from implementation CacheManager is a singleton implementing the static Cache initialization The entire timestamp based caching framework has a dynamic Java runtime configuration that can be loaded from a properties file or entered on the command line Whenever possible we use immutable objects like TimestampedId for simplicity and reliability We always throw layer appropriate exceptions like ResourceLoadException To make our design intentions clear we have created our Util class to be non instantiatable and final because it contains only static utility methods The resulting UML class diagram is shown in Figure 4 Figure 4 UML class diagram of the timestamp based caching framework Click on thumbnail to view full sized image A look at the code Note that in the code snippets below I have omitted error handling comments and many other essential details in the interest of moving the narrative along I encourage you to look at the actual source code downloadable from Resources while you peruse this section Step 1 User s search getCdIdsThatMatchUserSearch In this section we load all the IDs timestamps for CDs authored by Britney Spears If we were not using a cache our first step would be to create the complete list of CDs containing all of the required data However since our first TBCF requirement is to decrease object churning we instead load a list of small immutable objects TimestampedIds As the name suggests this object aggregates exactly two attributes Id and Timestamp The Id is used to retrieve CD objects from the cache or database whereas the Timestamp attribute is used to determine the freshness of the cache s CD objects to ensure none of the delivered objects are stale TimestampedId objects are designed to be light they can be created quickly and put minimum load on our application public static List getCdIdsThatMatchUserSearch String artist throws ResourceLoadException rs stmt executeQuery SELECT id timestamp FROM cd WHERE artist artist TimestampedId id null while rs next id new TimestampedId rs getString 1 rs getLong 2 returnVec addElement id return returnVec Step 2 CacheManager main method loadFromCacheAndDB The loadFromCacheAndDB method represents the brains of our framework It has been developed with a Data Access Object DAO design pattern we give the loadFromCacheAndDB method a list of the object IDs we want and it does the rest automatically picking valid objects from the cache and loading the remainder from the database Here is how this method works First loadFromCacheAndDB sets up two lists currentCached and refreshFromDb Using the list of TimestampedIds from Step 1 which contains all of the CDs we need to load we fill both current and refresh lists using the fillFreshAndStaleFromCache method Second the IDs in the refresh list containing stale and missing IDs are used to load objects from the database using the Cacheable interface s loadFromIds method specific to the object being cached In this way we optimize our retrieval strategy we only hit the database to create objects we did not already have in our cache One caveat of this methodology is that it requires an instance of the Cacheable class on which to call an automatic loader method Why do we need this instance To allow us the flexibility of using a Java interface to call various load methods The JVM simply needs to know which load method to call For example cd loadFromIds will load from a different table than author loadFromIds so we need an instance of the Cacheable class to help the JVM select the right method In many cases a static load method is preferred but since static methods can t be a part of the interface we must provide a dummy instance of the Cacheable object on which to call our loading method In a later section I discuss an alternative loading mechanism that uses Java reflection to allow us to call static load methods Once all the stale or missing objects are loaded we update our cache with these objects according to the LRU algorithm implemented in LRULInkedMapCache If the cache is already full this algorithm will always remove the least recently used item from the cache and replace it with one of the incoming stale or missing objects Finally we combine our currentCached and newlyLoaded lists to make a single list of fresh completely loaded objects from the cache and database public static List loadFromCacheAndDB List timestampedIds Cacheable cacheable throws ResourceLoadException Vector currentObjectsFromCache new Vector Vector idsToRefreshFromDb new Vector fillFreshAndStaleFromCache timestampedIds idsToRefreshFromDb currentObjectsFromCache Collection objectsFromDb cacheable loadFromIds idsToRefreshFromDb updateCache objectsFromDb currentObjectsFromCache addAll objectsFromDb combine lists return currentObjectsFromCache Step 3 CacheManager filtering fillFreshAndStaleFromCache In the fillFreshAndStaleFromCache method we iterate through an incoming list of TimestampedIds of Britney CDs to determine which objects need to be reloaded from the database and which can be retrieved from the cache We use the

    Original URL path: http://www.designcaffeine.com/articles/timestamp-based-caching-framework-current-data-with-peak-performance/ (2016-04-27)
    Open archived version from archive

  • Make More Money: Best Practices for Ads in Search Results: Part 2
    on your site Thus clicking an ad almost always involves extra work for your customers For this reason if your customers are getting the results they want on your site most do not click a competitor s ad unless the ad makes a very attractive offer or the competitor s brand is stronger Some sites understand their customers reluctance to do extra work and consciously decide to exploit this fact by hosting competitors ads boosting their revenue without much cannibalization of their own sales The key to doing this successfully is making rational judgments regarding which ads to host based on your overall site revenue strategy and hard site traffic statistics Some successful strategies for carrying competitors ads include the following making competitors ads look like advertising Customers deliberately ignore such ads and they get very few clicks This strategy works great if you get paid for ad impressions not by the number of clicks carrying only ads for weaker brands This limits the number of customers who click away from your site not allowing ads to display competitors prices Displaying the actual prices for specific competing goods or services encourages customers to click ads The competitor ad on Yahoo Cars shown in Figure 4 provides a good example for all three of these strategies Figure 4 Competitor advertising on Yahoo Cars Another interesting strategy involves completely embracing the experience of offering the best marketplace price from whatever source and being fully committed to always carrying ads from various competitors You can see one example of this strategy on Buy com which we discussed in Part 1 of this column Buy com shows prices from eBay and Dell as well as the price for the product from its internal search engine This strategy works well in any of the following cases Your site has the best price Differences in price are not significant Competitors prices do not give a complete picture for example items for sale are used or have high shipping costs but their ads do not communicate these details Provide Ads for Internal Merchandise Instead of Third Party Advertising Amazon com uses an interesting variation on this strategy carrying the same items from both Amazon s own store and their online marketplace as pictured in Figure 5 Figure 5 Ad for the Amazon marketplace This is a win win situation for both Amazon and their customers Amazon collects rich fees from sellers in their marketplace so they make money regardless of which items customers purchase Having a marketplace also benefits consumers by providing multiple highly relevant shopping options without presenting anything that looks or feels like an ad This strategy is very tricky because Amazon is essentially competing with their own sellers However despite the challenges this strategy has been quite successful in large part because Amazon has been very proactive constantly adjusting their price points and the inventory of items they carry to keep their marketplace thriving and provide customers with the comfort of knowing they are

    Original URL path: http://www.designcaffeine.com/articles/make-more-money-best-practices-for-ads-in-search-results-part-2/ (2016-04-27)
    Open archived version from archive

  • eye-tracking
    Search UX Design Articles UX Design UXmatters Make More Money Best Practices for Ads in Search Results Part 1 Jan 19th 2010 by Greg Nudelman Conflicting demands make many UX professionals think of ads as a necessary evil Customers frequently go out of their way to say they hate ads while marketers always seem to try their hardest to stuff as many of them as they can on each search

    Original URL path: http://www.designcaffeine.com/tag/eye-tracking/ (2016-04-27)
    Open archived version from archive

  • peel corner
    In Part 2 of Ads Best Practices we ll discuss understanding what makes a good ad limiting cannibalization providing ads for internal merchandise instead of third party advertising and ads on pages that appear if there are no search results Filed Under 56 Articles on Digital Strategy Mobile and Search Search UX Design Articles Tagged With ads eye tracking peel corner Search UX Design Articles UX Design UXmatters Popular Upcoming

    Original URL path: http://www.designcaffeine.com/tag/peel-corner/ (2016-04-27)
    Open archived version from archive



  •