Forum Moderators: coopster

Message Too Old, No Replies

trying to understand ebay's schema

interested in how their system is setup

         

kentor

1:15 pm on Aug 5, 2009 (gmt 0)

10+ Year Member



I want to build a site similar to ebay (a mini version of it) and I'm wondering how they built their system. The part I don't understand the most is how they manage their categories. They have one search code and probably one code for posting items for sale as well as one code for displaying the items. But how do they create/store the template for each category? Also what is the database structure behind their setup? And finally they have so many categories and sub-categories, let's say somebody posts an item inside (which is most likely the process ebay used to add categories)
Motors -> Parts & Accessories > Racing Parts

A few days later, people request more sub categories under "Racing Parts":

Accessories
Auto Racing Parts
Fasteners, Fluids & Gaskets
Kart Racing Parts
Safety Equipment
Other

So now they have a new level for Racing parts that go like this:

Motors -> Parts & Accessories > Racing Parts > Accessories
Motors -> Parts & Accessories > Racing Parts > Fasteners
etc..

What happens with the existing listings that have been posted prior to adding the new subcategories? do they get moved to a sub-category? Does ebay force new items to be listed in the sub-categories and removes their old posting form for "Racing Parts"? If they do, what if the user is missing a category, the user may get confused and not post and then ebay will lose money. And if they don't remove the general Racing Parts posting form, then users will post in a category that is too generic and now it will become difficult to use the "Refine search" option because all the forms have different fields that ebay could filter by.

If you guys have any ideas, please let me know. I'm really confused on how they do it and would really like to understand :)

andrewsmd

1:34 pm on Aug 5, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you really want to do all of that, it's going to take more than one person. Yes, they do move all products to sub categories when they create them, but they also have an army of people working for them. The fact of the matter is, for one man, you could build something "like" ebay, but nowhere close to all of the functionality that they have. I would assume they use some sort of template system such as smarty or the html/template/it.php package with pear. With that you can set specific place holders and then load data into them dynamically with php. So for the most part, all of your important content would be in the database backend i.e. all of the descriptions of products, image files or at least references to files for products, your categories and sub categories.

kentor

1:53 pm on Aug 5, 2009 (gmt 0)

10+ Year Member



I want to build something similar. I understand that it is too big of a project to build ebay myself but I don't want all of what they have, just a small part and I'm really curious about their structure for my own understanding because it scales and it is stable.

andrewsmd

2:02 pm on Aug 5, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well then, using templates with a db backend is the way to go.

kentor

2:15 pm on Aug 5, 2009 (gmt 0)

10+ Year Member



what kind of templates, like XML or what, can you please give me an example template or a link to a guide or something. Thanks a lot

andrewsmd

2:47 pm on Aug 5, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sure just google php and smarty and read a little bit. These templates can use xml but you don't have to. Personally, I don't like xml because that's what a database is for. Just a personal preference though. I don't know what kind of server you have set up, but if you have pear installed they have a template package called it.php. Its default location is HTML/Template/IT.php just do a var_dump(require_once("HTML/Template/IT.php")); If that outputs true then you have the pear template package. That's the one I use, if you have that, I can give you some good code examples.

kentor

2:52 pm on Aug 5, 2009 (gmt 0)

10+ Year Member



OK great I'll look at that. I just use a basic LAMP stack. Thanks for your help. I'll play with smarty and let you know if I need any more help :)