• Post Reply Bookmark Topic Watch Topic
  • New Topic

passing data

 
Varalakshmi Ramanarayan
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When you design a swing for UI, how do you usually pass the data what user has entered to the bussiness logic layer?
Can serialization or XML be used for the purpose? If Yes, how?
hoping for the answer,
thanks,
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where does the business layer live - within the same desktop application, or as part of a server application somewhere?
 
Varalakshmi Ramanarayan
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf,
The Bussiness layer lives in the desktop application
Mine is a simple Desktop application.
please help me regarding this.
Thanks.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that case, why make things more complicated than a regular method call?
 
Varalakshmi Ramanarayan
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf,

Basically I am trying to learn how a multi-tier architecture work, so I took up this project. Though, mine is a desktop app as of now, sometime in future if I want to make it a web app, it should not cause much problem.
So I am looking for all possible ways to pass the data to logic layer.
Please give your comments on this.

Thanks,
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that case put a communication layer (or object) between the front end and the back end. Right now the communication layer would call into the back end layer directly (method call), later it could use something else (HTTP, WS call, ...) instead.
 
Varalakshmi Ramanarayan
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf,

Is it something like
- have a class (say CommunicationLayer)
- this class should have variables which can hold the user inputs
- then call a method on bussiness layer sending CommunicationLayer object

Please calrify
Thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really. The communication layer object doesn't need to hold on to any objects, nor should it be passed to other layers. It is simply a means of taking inputs from the view, and passing them on to the model (and return the results), to use MVC terminology.
 
Varalakshmi Ramanarayan
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf,
thanks,i'll learn more about MVC and try to implement it.

Regards.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!