|
-
Feb 6th, 2004, 05:15 AM
#1
Thread Starter
Frenzied Member
Frams or no frames in webshop?
I am building a "webshop" app in asp.net. It contains the classic stuff; basket, menu and item area. Should I use frames to build the page or is there a better .net way of doing it?
ANother question... I keep a collection of the users "items" stored in the session. I use that collection to update a datagrid with the "basket"... how can I update another frame(the basket) if I click on an item in the "item area"? I want to refres it, reload the datagrid from the session collection.
or perhaps there is a better way to do it?
kind regards
Henrik
ps Did a search, didn't find anything useful ds
-
Feb 6th, 2004, 05:16 AM
#2
Fanatic Member
stay away from frames is my advice!!!!
If you have something that'd you'd usually put in a frame consider building a customer webcontrol that you can just add to each page.
Nick
-
Feb 7th, 2004, 11:46 AM
#3
Thread Starter
Frenzied Member
Yeah of course, thanks 
kind regards
Henirk
-
Feb 7th, 2004, 08:15 PM
#4
Thread Starter
Frenzied Member
Since I love OO and architectural stuff, I started playing with the webusercontrol. If I make a class called "shoppingbasket" and add the proper properties and methods... which is the best way to pars data and to maintain it's state?
Should I keep the basket items in a dataset and add items to the dataset programatically whenever the user clicks on "add item" and then refres the shopping basket datagrid every time that happens?
OR
should I keep the items in a simple collection in the shoppingbasket class as well as hold the items in the session object? I definetly want to use the "shoppingbasket" class to be intelligent so it can calculate totals and stuff... and to be able to send the "shoppingbasket" class to the "sales" class when the user should submit the purchase.
What are your thougts on this as I see it the web user component is a way to reuse certain views, should I also include the shoppingbasket class into the web user component because it is what makes the basket works...
Which should come "first" if you look at it from the view, the web user component class or the "shoppingbasket" class?? Which should contain which?
IM not sure I make a whole lot of sense... but I just want to make sure I approach this the right way.
Kind regards
Henrik
-
Feb 7th, 2004, 09:17 PM
#5
Thread Starter
Frenzied Member
I have another question about user controls...
If I add all basket logic in the user control... how do I handle all butotn click events on the page? For example, if the user click on an item, I want to add an item to the basket collection, but how can I refer to the basket collection within the usercontrol if it is impossible to create new refrences to the user control, since it is declared mustinherit???? I can write:
dim uc as UIShoppingBasket
but I can do very little with the uc reference... for example I can't use any of my basket methods and properties.... so where do I put them instead and how should they be connected to the user control??? The reason Im writing OO is that it is so easy to think in OO upon design, but I think it is apain in the butt to incorporate this thinking in asp.net applications... the VIEW part is and
Anyone with suggestions on how to approach? Because I have practically modelled the entire webshop with classes, now I have to incorporate these classes in an asp.net app...
kind regards
Henrik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|