• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Servlet Controller Vs SFSB Controller (given swing and jsp)

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic