Re: MyFaces + Shale + Facelets
JBoss Seam does exactly what you want. beans(components) are scoped. Marius Werner Punz wrote: Laurie Harper schrieb: Spring provides a much more capable IoC solution than Faces alone; I prefer to use it for everything I can, to get things like automatic dependency injection. I'd use it to manage all my beans, but it doesn't have support for scoping beans (i.e. request/session/application scope), so for things that need to be scoped I use Faces. For everything *else* I use Spring :-) unfortunately yes, this is a huge problem, but the next major spring version will have the scopes of jsf to my knowledge, so the mess to have beans partially defined in jsf and partially defined in spring soon will have an end. --- avast! Antivirus: Inbound message clean. Virus Database (VPS): 0602-2, 11.01.2006 Tested on: 13.01.2006 09:47:38 avast! - copyright (c) 1988-2005 ALWIL Software. http://www.avast.com begin:vcard fn:Oancea Marius n:Marius;Oancea org:Hermann Oberth Faculty of Engineering, Lucian Blaga University of Sibiu;Department of Computer Science adr:;;4 Emil Cioran Str.;Sibiu;Sibiu;550025;Roumania email;internet:[EMAIL PROTECTED] title:Asist. Ing. tel;home:+40 369 401740 tel;cell:+40 742 207963 url:http://www.csac.ulbsibiu.ro version:2.1 end:vcard
Re: MyFaces + Shale + Facelets
Mike Kienenberger schrieb: > On 1/13/06, Werner Punz <[EMAIL PROTECTED]> wrote: >> Have in mind that jsf-spring works quite well in many situations, but >> some situations still are problematic with that lib, I recently (in fact >> last night) ran into the situation of not being able to deploy an app on >> websphere due to the fact that jsf-spring interfered with the WAS6 class >> loader. > > Werner, are you sure it was an issue with jsf-spring and not with spring? > Remember when we talked about the jenia4faces/jsf-spring/jetty issue > with resolving references? It turned out to an error in Spring, not > jsf-spring. > > There's not a lot going on in the jsf-spring code. > Well as it seems, yes, we moved the code over to the standard spring jsf bindings (which in that case were good enough) and they worked, I have not dug deeper into the problem yet, but the problem looks like being jsf-spring related, it only occurs on websphere, and the websphere codebase is a dying one, sooner than later to be replaced with geronimo as core foundation, so finding out the cause is not really that worthwile.
Re: MyFaces + Shale + Facelets
On 1/13/06, Werner Punz <[EMAIL PROTECTED]> wrote: > Have in mind that jsf-spring works quite well in many situations, but > some situations still are problematic with that lib, I recently (in fact > last night) ran into the situation of not being able to deploy an app on > websphere due to the fact that jsf-spring interfered with the WAS6 class > loader. Werner, are you sure it was an issue with jsf-spring and not with spring? Remember when we talked about the jenia4faces/jsf-spring/jetty issue with resolving references? It turned out to an error in Spring, not jsf-spring. There's not a lot going on in the jsf-spring code.
Re: MyFaces + Shale + Facelets
Yes I agree with you but it would be great to be able to use the clean EL syntax of JSF managed beans in the xml files. To refer aother bean property in spring, you need to declare it using a special bean wich is very verbose. The mixing approach you talking about is because we confuse two concepts here. Declarative programming and configuration. For instance, declaring a bean stateful has nothing to do with the configuration because if you change it to stateless your code need some changes. A datasource url is a configuration and need to be put in a centralized configuration. This changes has no impact on your code. I think the confusion comes from the fact that a configuration is declarative by nature. On 1/13/06, Werner Punz <[EMAIL PROTECTED]> wrote: > Alexandre Poitras schrieb: > > The thing I like about JSF managed beans is the clean EL syntax > > instead of the very verbose xml language (I have nothing against xml > > files but I do think we abuse its usage). I hope Spring IoC container > > adopt it one day if it is possible. But using annotations is going to > > be even better :) Can't wait! > > > > I personally love the EJB3 @Bean @inject @outject paradigm > very clean and tight. > > I think things like bean definitions at least should have the optional > option of annotations, I do not thing blocking the xml way is good at > all, in many situations you need a centralized configuration of things. > But in many you do not need it, a mixed approach in this area might be > the best way to go. > > -- Alexandre Poitras Québec, Canada
Re: MyFaces + Shale + Facelets
Alexandre Poitras schrieb: > The thing I like about JSF managed beans is the clean EL syntax > instead of the very verbose xml language (I have nothing against xml > files but I do think we abuse its usage). I hope Spring IoC container > adopt it one day if it is possible. But using annotations is going to > be even better :) Can't wait! > I personally love the EJB3 @Bean @inject @outject paradigm very clean and tight. I think things like bean definitions at least should have the optional option of annotations, I do not thing blocking the xml way is good at all, in many situations you need a centralized configuration of things. But in many you do not need it, a mixed approach in this area might be the best way to go.
Re: MyFaces + Shale + Facelets
Marco Mistroni schrieb: > Hello all, > it seems to me that the Spring-JSF project allows you to scope > beans... isn't that so? > pls correct me if i m wrong./... > > regards > marco It should, yes to my knowledge jsf-spring (although it did not work for me in my last project) should allow the calling from jsf beans within spring and vice versa thus you can scope beans over jsf. Things will become easier however with spring 2.0 then you simply define all beans in spring and have faces-config doing the rest. (the xml syntax according to the spring devs, also will be cleaned up and tighter, I have not looked into it yet though) Have in mind that jsf-spring works quite well in many situations, but some situations still are problematic with that lib, I recently (in fact last night) ran into the situation of not being able to deploy an app on websphere due to the fact that jsf-spring interfered with the WAS6 class loader. But at least if you go the one way route there are other fallback options. So choose your binding technology with care upfront and do some minimal testing.
Re: MyFaces + Shale + Facelets
The thing I like about JSF managed beans is the clean EL syntax instead of the very verbose xml language (I have nothing against xml files but I do think we abuse its usage). I hope Spring IoC container adopt it one day if it is possible. But using annotations is going to be even better :) Can't wait! On 1/12/06, Marco Mistroni <[EMAIL PROTECTED]> wrote: > Hello all, > it seems to me that the Spring-JSF project allows you to scope beans... > isn't that so? > pls correct me if i m wrong./... > > regards > marco > > > > On 1/12/06, Werner Punz <[EMAIL PROTECTED]> wrote: > > Laurie Harper schrieb: > > > > > Spring provides a much more capable IoC solution than Faces alone; I > > > prefer to use it for everything I can, to get things like automatic > > > dependency injection. I'd use it to manage all my beans, but it doesn't > > > have support for scoping beans (i.e. request/session/application scope), > > > so for things that need to be scoped I use Faces. For everything *else* > > > I use Spring :-) > > > > > unfortunately yes, this is a huge problem, but the next major spring > > version will have the scopes of jsf to my knowledge, so the mess to > > have beans partially defined in jsf and partially defined in spring soon > > will have an end. > > > > > > -- Alexandre Poitras Québec, Canada
Re: MyFaces + Shale + Facelets
Hello all, it seems to me that the Spring-JSF project allows you to scope beans... isn't that so? pls correct me if i m wrong./... regards marco On 1/12/06, Werner Punz <[EMAIL PROTECTED]> wrote: Laurie Harper schrieb:> Spring provides a much more capable IoC solution than Faces alone; I > prefer to use it for everything I can, to get things like automatic> dependency injection. I'd use it to manage all my beans, but it doesn't> have support for scoping beans (i.e. request/session/application scope), > so for things that need to be scoped I use Faces. For everything *else*> I use Spring :-)>unfortunately yes, this is a huge problem, but the next major springversion will have the scopes of jsf to my knowledge, so the mess to have beans partially defined in jsf and partially defined in spring soonwill have an end.
Re: MyFaces + Shale + Facelets
Laurie Harper schrieb: > Spring provides a much more capable IoC solution than Faces alone; I > prefer to use it for everything I can, to get things like automatic > dependency injection. I'd use it to manage all my beans, but it doesn't > have support for scoping beans (i.e. request/session/application scope), > so for things that need to be scoped I use Faces. For everything *else* > I use Spring :-) > unfortunately yes, this is a huge problem, but the next major spring version will have the scopes of jsf to my knowledge, so the mess to have beans partially defined in jsf and partially defined in spring soon will have an end.
Re: MyFaces + Shale + Facelets
Gary VanMatre wrote: From: Julián García <[EMAIL PROTECTED]> Hi, I am using Hibernate + Spring + Myfaces. It's been working but I think that I am writing a LOT of code in the view layer. I have a small custom validation framework of my own, and my own init mechanisms in my beans. I use tiles. I'd like to do more templating, and reuse some code out thereI was thinking of: Facelets: to do templating Shale: init mechanisms in beans, client-side validation, Spring integration Any experiencies you want to share combining or using separately this 2 frameworks with MyFaces 1.1.1 Do they have overlapping features? Would you use them both for production? Facelets and Shale Clay do have overlap. Both allow templating, and alternative to JSP. Clay's HTML full view templating allows you to use old school html. I believe that Facelets requires well formed XML. Clay is also unique in that it provides metadata inheritance and symbol replacement overlapping with tiles generic layout features. The Clay full XML veiws could compare to tiles. Clay is based on a component so it can be use within JSP too. Yup, Facelets requires well formed XML. I don't know how it compares to Clay's symbol replacement mechanism, but it does make it easy to define substitutions (e.g. in a view makes #{foo} an alias for #{something} in the template. {...] I'm a bit bias on the Clay versus Facelets comparison but Shale and Facelets would be a good technology stack too. Yeah, that's what I'm using currently (I started using Facelets before I started using Shale). It works very well. I think that JSF and Spring have some overlap. They both provide IoC. So, if you wanted to reduce the layers in your stack you might go with Shale+Myfaces/Hibernate or iBatis. Spring provides a much more capable IoC solution than Faces alone; I prefer to use it for everything I can, to get things like automatic dependency injection. I'd use it to manage all my beans, but it doesn't have support for scoping beans (i.e. request/session/application scope), so for things that need to be scoped I use Faces. For everything *else* I use Spring :-) L.
Re: MyFaces + Shale + Facelets
Yeah or use the Spring-JSF integration libraries to combines the IoC container together. On 1/11/06, Gary VanMatre <[EMAIL PROTECTED]> wrote: > > >From: Julián García <[EMAIL PROTECTED]> > > > > > Hi, > > > > I am using Hibernate + Spring + Myfaces. It's been working but I think > > that I am writing a LOT of code in the view layer. I have a small custom > > validation framework of my own, and my own init mechanisms in my beans. > > I use tiles. > > > > I'd like to do more templating, and reuse some code out thereI was > > thinking of: > > > > Facelets: to do templating > > Shale: init mechanisms in beans, client-side validation, Spring > integration > > > > Any experiencies you want to share combining or using separately this 2 > > frameworks with MyFaces 1.1.1 > > > > Do they have overlapping features? Would you use them both for production? > > > > Facelets and Shale Clay do have overlap. Both allow templating, and > alternative to JSP. Clay's HTML full view templating allows you to use old > school html. I believe that Facelets requires well formed XML. Clay is > also unique in that it provides metadata inheritance and symbol replacement > overlapping with tiles generic layout features. The Clay full XML veiws > could compare to tiles. Clay is based on a component so it can be use > within JSP too. > > The key point is that you have to choose if you are using JSP, XML or HTML > for view composition and it's not wise to try to switch between view > technologies. The Shale use case example does this with moderate success. > This has to do with how you define the entry point resource that defines the > page. Maybe this will change in JSF x.x. > > I'm a bit bias on the Clay versus Facelets comparison but Shale and Facelets > would be a good technology stack too. > > I think that JSF and Spring have some overlap. They both provide IoC. So, > if you wanted to reduce the layers in your stack you might go with > Shale+Myfaces/Hibernate or iBatis. > > > > Thanks for your comments. > > > > Julian > > Gary > -- Alexandre Poitras Québec, Canada
Re: MyFaces + Shale + Facelets
>From: Julián García <[EMAIL PROTECTED]> >> Hi, > > I am using Hibernate + Spring + Myfaces. It's been working but I think > that I am writing a LOT of code in the view layer. I have a small custom > validation framework of my own, and my own init mechanisms in my beans. > I use tiles. > > I'd like to do more templating, and reuse some code out thereI was > thinking of: > > Facelets: to do templating > Shale: init mechanisms in beans, client-side validation, Spring integration > > Any experiencies you want to share combining or using separately this 2 > frameworks with MyFaces 1.1.1 > > Do they have overlapping features? Would you use them both for production? > Facelets and Shale Clay do have overlap. Both allow templating, and alternative to JSP. Clay's HTML full view templating allows you to use old school html. I believe that Facelets requires well formed XML. Clay is also unique in that it provides metadata inheritance and symbol replacement overlapping with tiles generic layout features. The Clay full XML veiws could compare to tiles. Clay is based on a component so it can be use within JSP too. The key point is that you have to choose if you are using JSP, XML or HTML for view composition and it's not wise to try to switch between view technologies. The Shale use case example does this with moderate success. This has to do with how you define the entry point resource that defines the page. Maybe this will change in JSF x.x. I'm a bit bias on the Clay versus Facelets comparison but Shale and Facelets would be a good technology stack too. I think that JSF and Spring have some overlap. They both provide IoC. So, if you wanted to reduce the layers in your stack you might go with Shale+Myfaces/Hibernate or iBatis. > Thanks for your comments. > > Julian Gary