Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Controller Vs SFSB Controller (given swing and jsp)

 
Bil Bob
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,

All my development experience has been web-based J2EE development and never Swing/AWT (apart from university, many years ago)

I was wondering how to use a controller for swing apps and web (jsp) apps at the same time.

In all instances I have used servlet based (essentially httprequest / servlet-based) controllers or customized/stuts architectures)

MY QUESTION: Should Swing apps also go thru the same controller as the jsp's would or a different one? Is a servlet-based controller appropriate for a GUI app or should it just speak straight to a SLSB controller?

I find it may involve some replication to split them up...but essentially we need two points of entry to send requests/events through to Business tier, dont we?

Thanks VERY much for your advice. Any input is much appreciated
 
Francis Shillitoe
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would think that you would use different controller classes. It wouldn't make much sense to shoe horn Swing/AWT events into a controller based on servlets. Servlets are used for dealing with HTTP requests. Although HttpServlet is a subclass of GenericServlet, I've never seen anyone implement non-HTTP servlets by subclassing straight from GenericServlet rather than from HttpServlet. Of course, you can use the same business logic layer for serving your Swing or HTTP controllers. You may even find ways to factor out various controller functions into handler objects that can be used by both the Swing and HTTP controllers.

Francis
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic