<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Commerce Starter Kit</title><link>http://forums.asp.net/84.aspx</link><description>Discuss the Commerce Starter Kit Installation Package and Source Code for ASP.NET 1.x.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Two Questions about IBS Store programming methods</title><link>http://forums.asp.net/thread/366721.aspx</link><pubDate>Wed, 15 Oct 2003 03:30:47 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:366721</guid><dc:creator>dcpennington2</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/366721.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=84&amp;PostID=366721</wfw:commentRss><description>You are correct in that yours seems a more efficient way to go from a writing stand-point. I think one simple consideration the developers of IBS may have made was that the code within this would be looked over by experts as well as many complete novices... And while the whole thing may have been coded purely with efficiency in mind, it was a better route to allow little bits of code to speak for themselves rather than be more efficient. 
&lt;br /&gt;

&lt;br /&gt;
 This project, after all, is a demonstration that was intended for dissection and analysis by a huge and diverse audience. They avoided a lot of complexities to make it universally learnable. IBS may not be without some inefficiencies, but people like you who are openly expressing other possibilities and better ways to do small tasks are what is making this community better as a whole. 
&lt;br /&gt;

&lt;br /&gt;
Keep it up :)
&lt;br /&gt;

&lt;br /&gt;
Daniel Pennington
&lt;br /&gt;
MCSD, MCDBA</description></item><item><title>Re: Two Questions about IBS Store programming methods</title><link>http://forums.asp.net/thread/207738.aspx</link><pubDate>Wed, 30 Apr 2003 21:07:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:207738</guid><dc:creator>ljp007</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/207738.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=84&amp;PostID=207738</wfw:commentRss><description>Regarding the second question. I understand. I guess they did it for consistency and readability -- as well as being a best practice. However, on a page which calls a couple subs and which uses the same object and variable, I use this on many of my .aspx pages without problem. Saves time and typing without any problem.</description></item><item><title>Re: Two Questions about IBS Store programming methods</title><link>http://forums.asp.net/thread/207060.aspx</link><pubDate>Wed, 30 Apr 2003 07:07:50 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:207060</guid><dc:creator>asmason</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/207060.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=84&amp;PostID=207060</wfw:commentRss><description>Hi,
&lt;br /&gt;

&lt;br /&gt;
Regarding your first question, I agree it does seem a little wierd.  Maybe the developers wanted to keep everything but Strings out of presentation logic.  Maybe they just got carried away with Strings, since the cartId holds a String when it is a GUID, but then an Integer once the customer has logged in / registered.  It could be just a case of inconsistency.  
&lt;br /&gt;

&lt;br /&gt;
Regarding your second question, they do not declare class scope variables because it is normal practice to use the lowest scope possible.  Things would be very messy otherwise!
&lt;br /&gt;

&lt;br /&gt;
Regards,
&lt;br /&gt;

&lt;br /&gt;
Anthony
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;</description></item><item><title>Two Questions about IBS Store programming methods</title><link>http://forums.asp.net/thread/206958.aspx</link><pubDate>Wed, 30 Apr 2003 02:48:28 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:206958</guid><dc:creator>ljp007</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/206958.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=84&amp;PostID=206958</wfw:commentRss><description>I have two questions about the IBS Store Programming Methodology hopefully someone can clarify.
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
1)	Throughout the CustomersDB class the variable, customerID, is passed into Functions as a String (ByVal CustomerID As String). However, once inside the function(s) the customerID variable is Cast to an Integer, CInt(customerID). Why didn’t they simply declare the customerID variable type as Integer and avoid having to type cast in every function which uses the variable? Clearly, the developers thought of this when they developed IBS, but for some reason they decided to use this technique, presumably for stability. Why?
&lt;br /&gt;

&lt;br /&gt;
2)	On many of the IBS .aspx pages, ShoppingCart.aspx –for one, there are a number of Sub Procedures which instatiate and dimension the same objects and variables. On ShoppingCart.aspx there are 3 different subs (Sub UpdateShoppingCartDatabase(), Sub PopulateShoppingCartList(), Sub CheckoutBtn_Click) which all instantiate the same object:
&lt;br /&gt;

&lt;br /&gt;
        Dim cart As IBuySpy.ShoppingCartDB = New IBuySpy.ShoppingCartDB()
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
	Then dimension the same variable: 
&lt;br /&gt;

&lt;br /&gt;
        ' Obtain current user's shopping cart ID
&lt;br /&gt;
        Dim cartId As String = cart.GetShoppingCartId() 
&lt;br /&gt;

&lt;br /&gt;
My question is why didn’t the developers simply declare this object and variable outside any Sub Procedures and make them accessible to all the Subs throughout the page – which would have saved time and called for less code-- ?
&lt;br /&gt;</description></item></channel></rss>