[JBoss Seam] - Seam and the old school of thinking
by esfahan
Hi there,
I am still in the process of learning Seam and started wondering about the following.
Seam proposes class design along this lines:
| @Stateful
| @Scope(EVENT)
| @Name("register")
| public class RegisterAction implements Register
| {
| @In
| private User user;
| private String verify;
| ...
| public String register()
| {
| // register the injected user
| }
|
| public String getVerify()
| {
| return verify;
| }
|
| public void setVerify(String verify)
| {
| this.verify = verify;
| }
|
My first question is regarding the register() method. In what I will call 'old school' thinking the API would be register(User user). Is the former method not obfuscating the code. By just reading eg the JavaDoc for this class you would not know what's getting registered. You actually have to explicitly look at the code to see that a user gets injected and used in the register() method. Is this still consistent with OO design? Is this just something Java programmers have to get used to thanks to DI and annotations? Maybe it's just me beeing stuck in old school thinking?
Another of these old school pattern which I see violated in the proposed design is that the EJB layer forms some sort of generic business interface. Using these interfaces you can build different clients interacting with the EJB layer, eg Web Services or even Swing GUIs. In the RegisterAction example I cannot reuse the Register interface to eg generate wsdl files for a web service. I have to create a whole new set of interfaces and underlying implementations. For the same reason the getter/setter for the verify string troubles me . It seems wrong to put this string into a stateful session bean.
Maybe I am having the wrong angle on this? Maybe one should leave the concept of EJBs defining the business interface behind and just consider the beans as the clue which binds the presentation layer to the persistence layer?
If my requirements however ask for different clients (eg web client, web service) I would have to introduce an additional 'old school' EJB layer.
What do other people think?
Cheers
Hardy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980268#3980268
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980268
19 years, 6 months
[JBoss Eclipse IDE (users)] - Re: What is to be downloaded?
by max.andersen@jboss.com
2) All = *all* plugins - nothing more; nothing less. The other zip files are simply there to allow you to get the individual parts if you don't need them all.
3) All the plugins. And no you don't need to download the individual plugins if you download the distribution that has all plugins.
4) JSF and JPA are *not* part of Webtools 1.5.1. They are only available as a seperate download. (if that has changed in a .1 release then please give me a link that shows it). Note, nothing prevents you from downloading and installing these additonal plugins.
5) Difference between Hibernate Tools and Dali JPA ? Long story short: Dali JPA is purely focused on standard JPA annotation editing and it is an Eclipse Project intended for 3rd party vendors to built upon.
Hibernate Tools is our toolset which includes support for hibernate.xml, hibernate annotations and JPA annotations. There is code generation, query execution, code completion in mappings and code, etc.
Currently the two tools are complementary (even though JPA also have a *small* part of DDL generation) and when we get the possibility to include Dali we probably will.
Difference between Hibernate Tools and EJB Tools ? Hibernate Tools is for using Hibernate/JPA (persistence) and EJB3 Tools is for doing EJB3 development (session beans etc.). EJB3 > JPA
JBossAS-Tools: "JBossAS Tools (WTP based adapter) 1.0.0.Beta2 (standalone)." just as it says on the download page. Meaning the WTP based adapter for controlling/using JBossAS.
You don't need to try every single download; just get the *all* plugins download.
p.s. I'm sure Marshall would like help on get the page better documented - it is opensource after all; contributions are always welcome.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980266#3980266
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980266
19 years, 6 months