mercredi 25 février 2015

How to decide what's the 'best' design pattern

I'm about to create a Soap based Web Application and I want to use Design Pattern for the implementation (for educational purposes/ I'm new to Web Services and Design Pattern).


I have an Android- Client Application which is able to send and receive SOAP Messages using the ksoap2 framework. The client communicates with the server in order to get stock data (which is stored in a server- sided Database). My goal is to combine the client- server- communication (request-/ response- cycle) in a meaningful way with Design Patterns like Observer Pattern or MVC.


For example, I could implement the observer pattern on client side where the observer is an Android- View and the subject an interface which communicates with the web service. In this case I would be using polling strategy so that the client (automatically) asks the server for new data and if so, the server returns the data to the client.


What kind of design pattern would you recommend on server side for application- logic and database connection?


Personally, I think its easier to implement a polling strategy in which the client asks the server about new Stock Information rather than pushing new information from the server to the client. On the other hand, to keep the data volume for clients low, it would be better to use pushing strategy.


What do you think/ what's your opinion about using the Web Application mentioned above in correlation with Design Patterns? Or do you have any resources on the web (links) about this topic?


Kind regards





Aucun commentaire:

Enregistrer un commentaire