Help with concept - filters and number of items
Please check http://www.alibaba.com/catalogs/cid/702/Laptops.html they have nice filter here with number of items for each. Note one detail - they have locations here. Same thing on olx.com - location and number of items for each category.
Now imagine I have tables: [products] (Id, Name, CategoryId, LocationId) [Categories] (Id,Name) [Location] (Id, Name)
My question how can I do the same, cause count things even with caching looks expensive? And they give results pretty fast...
Please advice with possible ways to do that in ASP.NET, C#, MVC, MS开发者_JS百科 SQL, but avoice simple answers like "count and change" Thank you in advance.
I would go with ASP.NET MVC for server side and Jquery for client side , for your requirement.
This combination allows you to have full control over the UI , and manipulate them using Javascript.
Some of the complex controls rendered by ASP.NET has its 'id' value dynamically generated which might be an issue.
As for your requirement http://www.alibaba.com/catalogs/cid/702/Laptops.html
There are good number of Jquery plugins that you can take advantage of to render the visual effects.
Please check out the link below (Table Sorter plugin) which i found useful for adding display effects to tables in particular.
Table Sorter
Hope this helps.
Thanks , Vijay
They are showing the possible filters at level one. When you choose a filter, they are running the search with that filter and fetching narrowed filters. The key is running the filters each time. This is quite achievable. I have done this already in asp.net MVC. In your case, it would be even easier as you do not have many filters.
Decide the level-1 filters. For each level-1 filters, decide which are the level-2 filters. Decide what is the meanigful depth levels for each filter type.
As the user keeps adding filters, run the filters that user has selected or unselected so for. you get the items after applying the filters. Show them according to the level of filters.
精彩评论