Re: ApplicationGateway vs DefaultEventGateway

"Diez B. Roggisch" <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi,

> I appreciate your honesty :) ... but my curiosity didn't stop ;) ... and
> now i would like to know where do you think is necessary so separate the
> two implementation ... or maybe where it's better to keep them separated
> i can't figure it out now.

We usually implement event-handlers as inner classes - so one big class 
aggregate a great deal of inner classes. If you have a full fledged app, with 
different parts like user management, content delivery, service center 
application and so on, its preferable to seperate these parts into different 
classes - a barracuda app is there no different than any other OO-based app. 
Or do you stuff all your logic in one class ? :)

This might come more naturally if you used one class per event-handler - but I 
plain hate the neccessity of one-file-one-class in java, and there isn't much 
sense in creating dozens of useless declarative lines like imports when all 
you want are two lines of code forwarding/handling an event.

> And for Jacob ... why do you suggested to made them separated ... just
> for the purpose of showing all the cases in an example app !?

As said before - I'm not even sure if he did do that (usually, he _is_ the one 
forcing me lazy bas...d to work on stuff, so its quite likely :))

But you might be right - its for displaying the capabilities. 

And before I compiled everything in one big, page-based example, the different 
modules you see - repopulation, file upload - were different parts, all in 
their respective package, only acessible by a static html page. But they 
shared the DBRAppGW, as I wanted only one context in the tomcat for them. And 
you already said why I needed my onw GW at all - for this DispatcherFactory 
of mine.

Regards,

Diez
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.