开发者

Service layer and UI interface

开发者 https://www.devze.com 2023-04-05 09:49 出处:网络
Generally speaking a service layer is completely separate from UI interface.. However, i would just like to know is there any possibility of some dependency (however little) between UI and service la

Generally speaking a service layer is completely separate from UI interface..

However, i would just like to know is there any possibility of some dependency (however little) between UI and service layer? Please give any example.

I am asking this question as we are going to design an iPad optimized UI and we have an existing desktop UI...Now ideally there should be only presentation level or JSP, CSS changes For iPad UI..But the screens are not necessarily going to be 1-1 for iPad..i.e. There might be slight differences (other than just UI design) with the exising desktop version..

So i am asking this question in 开发者_如何学Gothis context.


the first rule to remember is: layers (should) only be top-down dependent. A good sample: UI may depends of Service, Service may depends of Model - it means that you cant put dependencies of UI on Service layer. Usually what people does is perform another layer to handle UI and Service, called Controller (which should handle the UI´s events).

UI has a Controller that has one or many Services.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号