Frage

I want to make a Android Application of grocery stores. I have an existing Wicket Application deployed on server which I want to use in my Android Application for request handling. Is it compatible to use wicket application for android part.

There are 2 ways:

  1. Use existing Wicket Application for request handling from Android Application. Can some one suggest me is this possible or is this the right way? If yes how can I achieve this and some tutorials are most welcome.

  2. Second thing I thought about is integrate Spring with Wicket and migrate all my service classes to Spring and then use those spring service classes for Android Application. This approach is little costly and time consuming. But if first aprroach is not so good, I might think of opting this. So any tutorial on this part is also welcome.

Any help or advice appreciated. Thanks in advance !

War es hilfreich?

Lösung

I would definitely suggest to choose some sort of option 2. It doesn't really matter if you migrate your services to Spring, EJB or whatever, but the separation of services (or business logic or whatever you want to call it) and the view (or presentation or layout or...) would come in very handy in this case.

I firmly believe in the saying "premature optimization is the root of all evil", meaning that you should really skip any additional layer or indirection you simply don't need. However, if there actually is a use case which justifies a separation into different layers (or abstraction levels or...) you should tackle it as soon as you can. You will benefit a lot from it later on.

Just think of the Wicket application and the Android application as two different presentations of your grocery store. If you clearly separate the business logic from the presentation and make it accessible via HTTP (be it RESTful, SOAP or whatever way you prefer), you can easily imagine building an iOS, Windows Phone, you-name-it presentation of your grocery store without touching the core itself.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top