Hello All,
This is my first post on Javaranch and I have just started to implement
patterns to an application. My Application is similar to EBay.
Here I am not sure if I have to use template pattern or strategy pattern to process search Listing.
If I use template than I have a template method which does basic search.
This method is defined in Manager class , Administrator class and User class.
So every one have different kind of search options inside that template method, example admin will search for accounts, where as user will search for items.
If I use Strategy than I was thinking like i will write a basic search method where search is based on two types generic search and advanced search based on the entered item.
I am not sure as a designer which idea i should consider to make my search works similar to ebay search.
I was also thinking to use strategy pattern for the services( listing, selling, buying,bidding)
Can i combine template search and strategy services? I wanted to know if i following the right approach.
thanks in advance
Nandita