[Javamatch-cvs] javamatch/docs/website javamatch.xml,1.4,1.5
Status: Pre-Alpha
Brought to you by:
iterson
From: Walter v. I. <it...@us...> - 2004-09-09 14:20:01
|
Update of /cvsroot/javamatch/javamatch/docs/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24722/website Modified Files: javamatch.xml Log Message: Updated match hierarchy, web site (faq, and others) Index: javamatch.xml =================================================================== RCS file: /cvsroot/javamatch/javamatch/docs/website/javamatch.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** javamatch.xml 6 Sep 2004 09:13:04 -0000 1.4 --- javamatch.xml 9 Sep 2004 14:19:50 -0000 1.5 *************** *** 34,38 **** The following code defines and executes this match query: </p> ! <p class="source">OrList query = new OrList(); query.addQuery(new LessThan("size", 100)); query.addQuery(new NumberEquals("distanceToSwimmingPool", 0)); --- 34,38 ---- The following code defines and executes this match query: </p> ! <pre class="source">OrList query = new OrList(); query.addQuery(new LessThan("size", 100)); query.addQuery(new NumberEquals("distanceToSwimmingPool", 0)); *************** *** 40,45 **** List campSites = guide.getCampSites(); ! MatchResult matchResult = matchEngine.executeQuery(query, campSites); ! </p> <p><b><i> Note: the syntax for retrieval of data members (such as "size") will change in version 0.2 --- 40,44 ---- List campSites = guide.getCampSites(); ! MatchResult matchResult = matchEngine.executeQuery(query, campSites);</pre> <p><b><i> Note: the syntax for retrieval of data members (such as "size") will change in version 0.2 *************** *** 60,72 **** second-hand car, I can specify the following query: </p> ! <p class="source">OrList query = new OrList(); ! query.addQuery(new StringEquals("brand", "BMW")); ! query.addQuery(new Range("buildYear", 1997, 2002)); ! query.addQuery(new LessThan("price", 10000)); ! query.addQuery(new LessThan("mileage", 80000)); ! ! List allCars = carData.getAllCars(); ! MatchResult matchResult = matchEngine.executeQuery(query, allCars); ! </p> <p> You may want to find a match with more complicated, domain-specific criteria, --- 59,70 ---- second-hand car, I can specify the following query: </p> ! <pre class="source">OrList query = new OrList(); ! query.addQuery(new StringEquals("brand", "BMW")); ! query.addQuery(new Range("buildYear", 1997, 2002)); ! query.addQuery(new LessThan("price", 10000)); ! query.addQuery(new LessThan("mileage", 80000)); ! ! List allCars = carData.getAllCars(); ! MatchResult matchResult = matchEngine.executeQuery(query, allCars);</pre> <p> You may want to find a match with more complicated, domain-specific criteria, *************** *** 76,80 **** query can be part of the matching process. </p> ! <p class="source"><i>/** * Class RegularServiceIntervals a query to be used by JavaMatch, * that checks if a Car has has been services frequently --- 74,78 ---- query can be part of the matching process. </p> ! <pre class="source"><i>/** * Class RegularServiceIntervals a query to be used by JavaMatch, * that checks if a Car has has been services frequently *************** *** 95,100 **** // for how regular the services took place</i> } ! } ! </p> <p> More information about extensions can be found in the docs directory in the distribution --- 93,97 ---- // for how regular the services took place</i> } ! }</pre> <p> More information about extensions can be found in the docs directory in the distribution *************** *** 157,169 **** </p> <h3>What is JavaMatch, compared to SQL?</h3> <h3>What is JavaMatch, compared to my own search algorithm?</h3> <h2>"How, when and where to use"</h2> <h3>Why hasn't this been implemented before?</h3> <h3>How about performance?</h3> <h3>I only want exact matches. How can I get them?</h3> <p> Exact matches can be specified using an AndList-query. However, if you only want exact results from your database, plain SQL might be a ! better alternative, as it is integrated inside the database </p> <h2>"Usage"</h2> --- 154,198 ---- </p> <h3>What is JavaMatch, compared to SQL?</h3> + <p>If you compare the functionality of JavaMatch with SQL, you'll see two big + differences: + <ul> + <li>SQL is row-based, JavaMatch is object-oriented</li> + <li>SQL returns all rows that <b>exactly</b> match your query, and returns them + in the order they are encountered in the database. JavaMatch finds out which + objects <b>best</b> match your query, and returns their top 10, in ascending + order</li> + </ul> + </p> <h3>What is JavaMatch, compared to my own search algorithm?</h3> + <p> + I don't know <i>your</i> search algorithm, but JavaMatch uses reflection to + specify its queries. It can be applied to any domain, and any data structure. + You own query mechanism might be more domain-specific, and can therefore be + optimized better. + </p> <h2>"How, when and where to use"</h2> <h3>Why hasn't this been implemented before?</h3> + <p>Usually, large amounts of data are kept in a database instead of in memory + (although the <a href="http://www.prevayler.org">Prevayler</a> project proves + memory is also an option). Now that object relational mapping tools are gaining + popularity, matching of objects in memory also becomes more interesting. + </p> <h3>How about performance?</h3> + <p> + JavaMatch retrieves all data from the database. For some kinds of queries, + this happens even twice. Furthermore, the data is compared using reflection. + So, JavaMatch is (at least theoretically) slow. But... Many databases aren't + really that big. A couple of thousand objects shouldn't cause too many + problems. If you have a very large database, the mechanism doesn't prevent + a hierarchical scheme, with a distributed database. I guess that won't be yet + in release 1.0, but feel free to ask if you want to hear my ideas about this. + (or if you want to contribute). + </p> <h3>I only want exact matches. How can I get them?</h3> <p> Exact matches can be specified using an AndList-query. However, if you only want exact results from your database, plain SQL might be a ! better alternative, as it is executed inside the database. That ! causes less overhead. </p> <h2>"Usage"</h2> *************** *** 220,223 **** --- 249,256 ---- <li><a href="http://www.hibernate.org/">Hibernate</a> (Object-relational mapping tool)</li> </ul> + <h3>Object-oriented data access</h3> + <ul> + <li><a href="http://sodaquery.sourceforge.net">SODAQuery</a> (Searching data in object databases)</li> + </ul> <h3>Object data retrieval</h3> <ul> *************** *** 260,265 **** in the current version), add the line </p> ! <p class="source">new MatchFrame(prevayler, desktop); ! </p> <p> This adds another frame to the user interface, one that shows the results of the matching. --- 293,297 ---- in the current version), add the line </p> ! <pre class="source">new MatchFrame(prevayler, desktop);</pre> <p> This adds another frame to the user interface, one that shows the results of the matching. *************** *** 275,279 **** <p>If you have <a href="http://ant.apache.org">ant</a>, you might want to use <a href="prevayler/build.xml">build.xml</a>. Put it in the prevayler-X.YY.ZZZ directory, ! run ant in that same directory, and you'll see the demo: <img src="prevayler/screenshot.png" alt="Prevayler screenshot"/> </p> --- 307,311 ---- <p>If you have <a href="http://ant.apache.org">ant</a>, you might want to use <a href="prevayler/build.xml">build.xml</a>. Put it in the prevayler-X.YY.ZZZ directory, ! run ant in that same directory, and you'll see the demo:<br/> <img src="prevayler/screenshot.png" alt="Prevayler screenshot"/> </p> *************** *** 306,309 **** --- 338,351 ---- </tr> <tr> + <td>0.3</td> + <td> + Planned features: + <ul> + <li>Better syntax for following and constraining object references, + handle collections</li> + </ul> + </td> + </tr> + <tr> <td>0.x</td> <td>...</td> *************** *** 327,330 **** --- 369,377 ---- </tr> <tr> + <td>20040909</td> + <td>Added NotQuery, listener mechanism, added FAQ contents, fixed + <pre>-tags in website (for Internet Explorer)</td> + </tr> + <tr> <td>20040906</td> <td>Added Prevayler demo</td> |