aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes [URLyBird]How to realize both local and remote Client? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "[URLyBird]How to realize both local and remote Client?" Watch "[URLyBird]How to realize both local and remote Client?" New topic
Author

[URLyBird]How to realize both local and remote Client?

Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi rancers,
Assignment requires me to realize both local and remote Client. I plan to create BusinessFactory in Business Layer. Can any one guide me in details?


SCJP 1.4 SCJD
Oricio Ocle
Ranch Hand

Joined: Nov 30, 2004
Posts: 284

Hello,
I plan to create BusinessFactory in Business Layer

Yes, it's an elegant solution.
Since i expose both business, and data methods to the client through a facade, I have FacadeFactory instead.

Regards


SCJP, OCMJD, OCMJEA
Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi Oricio,
Could you please talk something about your FacadeFactory? I think it will help me a lot.
Oricio Ocle
Ranch Hand

Joined: Nov 30, 2004
Posts: 284

Yes of course,

My FacadeFactory class provides three efundamental issues:
  • Constructs default facade implementations based on default smaller pieces(default lockManager,default DAO,...).
  • Provides a single access point to backend services.
  • Provides instance pooling


  • Has two static methods getLocalFacade (filepath ,islockingEnabled) that returns a facade implementation from the specified parameters and getRemoteFacade(port,alias) that returns a facade implementing proxy to a registry bound facade.
     
    It is sorta covered in the JavaRanch Style Guide.
     
    subject: [URLyBird]How to realize both local and remote Client?