Re: [To sum it up] Re: Confused
I wouldn't even say that Struts and EJBs are on the opposite end of a scale. They can't be compared because they aren't the same thing (apples and oranges comes to mind). Struts is a Java implementation of the MVC (Model 2) pattern. It gives you a nice framework with a controller and a bunch or really nice utilities (tags, validation, etc) to build with. It's meant to be used on your presentation tier. I know, some developers choose to put business logic and persistence code in their Action classes but in my opinion that's not a good practice since you're coupling your model to your presentation tier. Change your presentation framework (Struts) and you now have to change all of your business classes. EJB provides a framework for your model (business) and persistence tiers. It gives you nice things like declarative transaction and security management, object pooling, etc. It's usually too complex for anything other than large enterprise applications though. I'd go with Hibernate or IBATIS. On 6/15/05, Daniel Perry <[EMAIL PROTECTED]> wrote: > I took one look at ejbs and ran a mile. > > Struts and EJBs seem to be at the opposite end of a scale. > Struts is sensible, nice to work with, efficient, and generally everything > that EJBs arnt! > > I personally use it with OJB (made that decision 1.5 yrs ago). Hibernate > seems to be more popular, and if i was to make the decision now, i'd > probably go with hibernate. I'm sticking with OJB in the systems i have > because refactoring the whole lot would be such a chore, and OJB works fine > (though i have had to deal with some really annoying intermittent bugs). > > Daniel. > > > -Original Message- > > From: Pierre Thibault [mailto:[EMAIL PROTECTED] > > Sent: 14 June 2005 19:53 > > To: Struts Users Mailing List > > Subject: Re: [To sum it up] Re: Confused > > > > > > Le 14 juin 2005 à 04:59, Stéphane Zuckerman a écrit : > > > > Hello Stéphane, > > > > > > > ... > > > Anyway, this little presentation is far from complete, and I > > > suggest you read some doc about J2EE applications before going > > > further with struts (java.sun.com is a good start). > > > > > > -- > > > Stéphane Zuckerman > > > > > > The difficulty here is that there is lot of pieces that go together. > > There is a lot of choices and it is not clear for the new developers > > which path to fellow. I decided to buy the book 'Struts The Complete > > Reference' and I am only at the beginning. I'll continue to dig on > > the subject. I'm happy to see that there is community here for > > helping me. I fell already a lot more comfortable. > > > > Thank you. > > > > A+ > > > > -- > > Pierre > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Virtually, Andre Van Klaveren Architect III, SCP Enterprise Transformation Services Unisys Corporation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: [To sum it up] Re: Confused / one little question
In fact, this thread was really about Struts and how it integrates with various J2EE technologies and containers, not "about Hibernate/EJBs"... Anyway: I don't think that anyone says that Hibernate is better than EJB period; but maybe easier and more flexible to use than Entity EJBs CMP, which is just one of the species of EJBs. It is true that EJB (entity beans or not) has these nice features you mention: declarative transactions and declarative security (multi threading and "synchronization" are in fact container and coding related, and also "implemented" by Hibernate), BUT the question is: are those really necessary? Hibernate also supports CMT, and, if facaded by SessionBeans (which is a very common scenario and is also recomanded for entity beans), you have declarative transactions. Security is a very nice feature, but in scenarios where you only use a web application to access the EJBs, and the EJB container is "isolated" from the rest of the world, it becomes either useless, or a burdain to use... And I think that this scenario is the most common (especially among the subscribers to a list such as "Struts Users" :) It's also true that in some scenarios the Entity Beans might be more effective than using an ORM such as Hibernate, but these scenarios are extremely rare... Also, even Hibernate is sometimes regarded as being too complicated and too hard to learn by some (it was a very hot discussion about this on this list), and in even simpler scenarios are preferred even simpler tools such as iBatis, ORB, etc.. In my opinion, a discussion with a subject such as "EJB is better than Hibernate" is completely meaningless... The right tool always depends on the job, and the right tool for every imaginable job was just not yet invented. :-) The answer to your last question IMHO is: yes, you can, if the web layer is the only thing accessing your beans. But the subject of security is much more complicated in a real-life application than "what framework do I need to best implement it?" You're welcome, Radu Marco Mistroni wrote: Hello all, Sorry to get into this thread so late... Since I have same view as Daniel about Hibernate/EJBs, I wanted to ask one additional question, since right now I am using EJBs.. Now, EJBs have some features that let the coder concentrate only On the business logic instead of dealing, for example, with synchronization, transaction, threading ..and security, meaning that you can declare in the Deployment descriptor which roles are allowed to do what with your EJBs. Where can you do the same with ORM tools? In the web layer? Or do you have to have a security framework in place (such as acegi)? Thanx and regards Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [To sum it up] Re: Confused / one little question
Spring takes care of all this (http://springframework.org) without the overhead of an ejb container. Acegi is one aspect closely tied to spring that takes care of security declaratively. Regards, Abdullah -Original Message- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 15, 2005 5:04 AM To: 'Struts Users Mailing List' Subject: RE: [To sum it up] Re: Confused / one little question Hello all, Sorry to get into this thread so late... Since I have same view as Daniel about Hibernate/EJBs, I wanted to ask one additional question, since right now I am using EJBs.. Now, EJBs have some features that let the coder concentrate only On the business logic instead of dealing, for example, with synchronization, transaction, threading ..and security, meaning that you can declare in the Deployment descriptor which roles are allowed to do what with your EJBs. Where can you do the same with ORM tools? In the web layer? Or do you have to have a security framework in place (such as acegi)? Thanx and regards Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [To sum it up] Re: Confused / one little question
Hello all, Sorry to get into this thread so late... Since I have same view as Daniel about Hibernate/EJBs, I wanted to ask one additional question, since right now I am using EJBs.. Now, EJBs have some features that let the coder concentrate only On the business logic instead of dealing, for example, with synchronization, transaction, threading ..and security, meaning that you can declare in the Deployment descriptor which roles are allowed to do what with your EJBs. Where can you do the same with ORM tools? In the web layer? Or do you have to have a security framework in place (such as acegi)? Thanx and regards Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [To sum it up] Re: Confused
I took one look at ejbs and ran a mile. Struts and EJBs seem to be at the opposite end of a scale. Struts is sensible, nice to work with, efficient, and generally everything that EJBs arnt! I personally use it with OJB (made that decision 1.5 yrs ago). Hibernate seems to be more popular, and if i was to make the decision now, i'd probably go with hibernate. I'm sticking with OJB in the systems i have because refactoring the whole lot would be such a chore, and OJB works fine (though i have had to deal with some really annoying intermittent bugs). Daniel. > -Original Message- > From: Pierre Thibault [mailto:[EMAIL PROTECTED] > Sent: 14 June 2005 19:53 > To: Struts Users Mailing List > Subject: Re: [To sum it up] Re: Confused > > > Le 14 juin 2005 à 04:59, Stéphane Zuckerman a écrit : > > Hello Stéphane, > > > > ... > > Anyway, this little presentation is far from complete, and I > > suggest you read some doc about J2EE applications before going > > further with struts (java.sun.com is a good start). > > > > -- > > Stéphane Zuckerman > > > The difficulty here is that there is lot of pieces that go together. > There is a lot of choices and it is not clear for the new developers > which path to fellow. I decided to buy the book 'Struts The Complete > Reference' and I am only at the beginning. I'll continue to dig on > the subject. I'm happy to see that there is community here for > helping me. I fell already a lot more comfortable. > > Thank you. > > A+ > > -- > Pierre > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [To sum it up] Re: Confused
Le 14 juin 2005 à 04:59, Stéphane Zuckerman a écrit : Hello Stéphane, ... Anyway, this little presentation is far from complete, and I suggest you read some doc about J2EE applications before going further with struts (java.sun.com is a good start). -- Stéphane Zuckerman The difficulty here is that there is lot of pieces that go together. There is a lot of choices and it is not clear for the new developers which path to fellow. I decided to buy the book 'Struts The Complete Reference' and I am only at the beginning. I'll continue to dig on the subject. I'm happy to see that there is community here for helping me. I fell already a lot more comfortable. Thank you. A+ -- Pierre