On Mon, Nov 23, 2009 at 10:26 PM, Jamu Kakar <span dir="ltr">&lt;<a href="mailto:jkakar@kakar.ca">jkakar@kakar.ca</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
If you were attending a talk about Storm, what would you like to<br>
hear about?<br><br></blockquote><div><br>A non-trivial example might get people&#39;s interest, if you have enough time allotted. You could draw an ERD illustrating a complex set of relations between tables, and describe a requirement which involves various kinds of joins (including some self joins to give you a chance to show off ClassAlias). <br>
<br>The requirement can then be shown as an extremely hairy multi-page SQL statement, for which the audience can be given a moment or two to appreciate the horror as the query scrolls slowly by. Low, ominous background music could add to the effect. <br>
<br>&quot;This is the kind of query you might see every day in a &#39;real world&#39; application,&quot; you could say flatly, &quot;except that in the real world it&#39;s a bit worse. You see, the joins in this query needs to vary dynamically, and each variant needs to unioned with the other variants.&quot;<br>
<br>You could then proceed to show how to assemble the same query using Storm classes such as Join and ClassAlias, set up the query structure using store.using, and specify the desired classes which should populate in the ResultSet using store.find. Then, after showing how to dynamically vary the ResultSet as needed, you could also show how to use itertools.chain to create the effect of a union between multiple ResultSet objects.<br>
<br>The result should be code which is much more readable and manageable than the horrific piece of SQL shown earlier, yet which when run in debug mode, can print that selfsame chunk of SQL.<br><br>That sort of talk really demonstrates the benefits of using an ORM, which is of more general interest than just Storm and might attract more attendees. However, it&#39;s a good showcase of Storm&#39;s capabilities.<br>
<br><br></div></div>