Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 48108 invoked from network); 4 May 2006 09:28:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 May 2006 09:28:49 -0000 Received: (qmail 61311 invoked by uid 500); 4 May 2006 09:28:47 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 61266 invoked by uid 500); 4 May 2006 09:28:46 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 61255 invoked by uid 99); 4 May 2006 09:28:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 May 2006 02:28:46 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=HTML_10_20,HTML_BADTAG_80_90,HTML_MESSAGE,HTML_NONELEMENT_70_80,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 May 2006 02:28:44 -0700 Received: from localhost ([127.0.0.1] helo=talk.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1Fba89-0000cw-Vq for dev@myfaces.apache.org; Thu, 04 May 2006 02:28:18 -0700 Message-ID: <4225764.post@talk.nabble.com> Date: Thu, 4 May 2006 02:28:17 -0700 (PDT) From: Alexander Kazachonak To: dev@myfaces.apache.org Subject: Re: Summer of Code In-Reply-To: <4458E73A.6000405@ops.co.at> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2121_9381981.1146734897874" X-Nabble-Sender: alexander.kazachonak@gmail.com X-Nabble-From: Alexander Kazachonak References: <16275204.256201146673319747.JavaMail.servlet@perfora> <4458E73A.6000405@ops.co.at> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_2121_9381981.1146734897874 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit My idea to provide working UI with one line of code from entire data model and then refine it in small steps. And model is not static there, but is constantly being updated. Seems that Rumba framework and hbm2seam are not about that. Faces Freeway looks interesting. My english demands more. Jacob, I don't fully understand your sentence "I've been thinking though with JEE 5 and the EJB 3 adoption, that you couldn't produce something similar to your proposal that works off of pure EJB 3 metadata define the pages." As I understood you were proposing to work using only ejb3 metadata. And using EntityManager directly to persist data. It is easier and makes sense. But more interesting task is to extract data straight from the business layer. Data can come not only from RDBMS, but from web-services or other place. I've been thinking that we can provide access to data model for UI through general interface like extended Maps and Lists. Add to them methods for sorting, validation, extracting metadata about associations. We can use these maps and lists for CRUD templates, but how do maps and lists know about business layer. In business layer interface there usually may be several contracts of woking with data. We annotate this layer's methods with annotations describing what classes to use to deal with data using this method. Then our maps and lists can use this information and will know that we shouldn't use Item object's property comments to extract comments, but use commentsService method getComments(Item item, int start, int count) for paging and such. Are there any interested in mentoring this if I will provide more concrete details? All this is to be discussed. Mario Ivankovits wrote: > > Hi! > > I developed Faces Freeway to archive this dynamic generation: > http://facesfreeway.l3x.net/sample.html > The samples are not up to date, much more can be done already. > For those wanting to browse the source code: > http://facesfreeway.l3x.net/xref/index.html > > It extracts metadata from your entites and generates the jsf tree > dynamically. > All this is pluggable and extensible. > > I'll update the samples, just I need to find the time :-( > > Ciao, > Mario >> I've been chatting with Gavin about this for some time-- the code >> generation vs. dynamic generation for scaffolding. I believe the tooling >> coming from seam/hbm is all code generation where I would think there >> would be advantages to having component sets that dynamically determine >> validators and converters based on metadata. Higher level components >> could be constructed to actually compose the CRUD pages as a droppable >> component. >> >> >>> Please check out hbm2seam ( Hibernate Tools suite ) before a lot of hard >>> work >>> is poured into this. There may be a large duplication of effort. The >>> last I >>> checked, this was in alpha. >>> >>> Dennis Byrne >>> >>> >>>> -----Original Message----- >>>> From: jacob@hookom.net [mailto:jacob@hookom.net] >>>> Sent: Wednesday, May 3, 2006 11:57 AM >>>> To: dev@myfaces.apache.org >>>> Subject: RE: Summer of Code >>>> >>>> JSF *really* needs this agility with CRUD scaffolding. I've been >>>> thinking >>>> >>> though with JEE 5 and the EJB 3 adoption, that you couldn't produce >>> something >>> similar to your proposal that works off of pure EJB 3 metadata define >>> the >>> pages. Something like: >>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> This way, you could have your EJB 3 annotated model and without doing >>>> any >>>> >>> model wiring, these components would work by Class type to handle >>> persistence/UI concerns directly without hand-holding. >>> >>>> As for templating with Facelets, Rick Hightower published something >>>> similar >>>> >>> at IBM: >>> >>>> http://www-128.ibm.com/developerworks/java/library/j-facelets/index.html >>>> >>>> He says he has another article on the topic coming out soon. >>>> >>>> Overall, the need you are describing is obviously there. I wish JBoss >>>> >>> would've pursued this route more actively with Seam's UI library. >>> >>>> -- Jacob >>>> >>>> >>>> >>>>> Hello. It is not a comlete proposal, but I rather want to know your >>>>> opinion >>>>> on the project i'm working on. It is not straight myfaces codebase >>>>> related, >>>>> but you seem as most appropriate mentor. I planned to work on it >>>>> before I >>>>> knew that there is SoC. But may be you will convince me of its >>>>> uselessness. >>>>> >>>>> Recently I have been writing application using jsf. The application is >>>>> mostly CRUD. I think that there is much glue code that can be >>>>> eliminated. >>>>> All that identical CRUD backing beans, forms, dataTables, navigation >>>>> rules. >>>>> It is all powerful, but it should be possible to eliminate it until >>>>> you >>>>> >>> need >>> >>>>> something not very trivial. This is the principle which the Ruby on >>>>> Rails >>>>> growing popularity came from. >>>>> >>>>> There arises a need to define rules of generating it all based on >>>>> information about a data model. Code generation tools are >>>>> insufficient. >>>>> Imagine, you have generated all the beans and views, than provided >>>>> some >>>>> changes to some of them and than you want to add small change to the >>>>> template or, say, add a field to the domain object. Now you are left >>>>> on >>>>> >>> your >>> >>>>> own to manually change it everywhere it is used. >>>>> >>>>> I propose to extend facelets templating abilities to be able to >>>>> encapsulate >>>>> all that routine tasks into templates. See: >>>>> 1) marks any part of view definition as a >>>>> template. >>>>> 2) marks parts of the template as redefinable. >>>>> 3) redefines redefinable parts during particular >>>>> template usage. >>>>> inserts template and if it is being used >>>>> inside another template definition it automatically marks redefinable >>>>> part. >>>>> It can contain only tags. Other tags inside it are treated as tags >>>>> inside without name property defined. >>>>> With used during particular template usage you >>>>> can insert part of template marked as redefinable. >>>>> >>>>> Than we should generalize data CRUD interfaces and provide >>>>> implementations >>>>> for technologies/contracts we use to implement business layer. I plan >>>>> to >>>>> >>> use >>> >>>>> very simple and extendable interfaces. >>>>> >>>>> Let's assume that >>>>> >>> object="#{itemsService}" methodName="getLastItem"/> >>>>> will get the Item object from getLastItem method and set lastItem >>>>> variable >>>>> to Map containing Item object properties as keys and their values as >>>>> >>> values. >>> >>>>> Now the dream is to use >>>>> >>>>> to create simple edit form. >>>>> >>>>> See how we can create such a template: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> #{key}: >>>>> >>> template=".bool"> >>>>> >>> template=".string" name="validator"/> >>>>> >>> name="validator"/> >>>>> >>> template=".object" name="validator"> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> where for there is a helper TagHandler, which evalutes its body if >>>>> var is of pointed type. It is decided based on user-provided >>>>> algorithm. It >>>>> allows to do such things as automatically providing textarea for long >>>>> texts >>>>> and so. >>>>> >>>>> It is not necessary to divide all this functionality to many >>>>> templates, it >>>>> can reside in only one. >>>>> >>>>> Now you can, for example, define special validator for itemUrl field >>>>> of >>>>> lastItem object: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> And for other fields we can add into template default validator, which >>>>> will >>>>> validate them using hibernate validator annotations. >>>>> >>>>> Or we can redefine all components used to represent itemUrl property: >>>>> >>>>> >>>>> #{lastItem.itemUrl} - url of item description >>>>> >>>>> >>>>> Or we can extend or partially redefine map.field template to >>>>> differently >>>>> handle some types. >>>>> >>>>> Actually, for short it is display only sample. It is not a >>>>> comprehensive >>>>> description of my ideas. We will be able to write >>>>> >>> methodName="getActualItems"/> >>>>> >>>>> to represent a complete CRUD interface for caveatemptor.hibernate.org >>>>> data >>>>> model with an ability to drill down to assotiated objects. And you >>>>> still >>>>> have an ability to partially redefine default templates behavior. I >>>>> call it >>>>> Smart UI. And important point that it does not impose any requirements >>>>> to >>>>> your other view code. You can use it anywhere in facelets pages >>>>> >>> definitions. >>> >>>>> And than you can easily scale introducing backing beans, navigation >>>>> rules >>>>> >>> or >>> >>>>> anything else only when you need it. >>>>> >>>>> Feedback is appreciated. >>>>> -- >>>>> View this message in context: >>>>> http://www.nabble.com/Summer-of-Code-t1550695.html#a4212272 >>>>> Sent from the My Faces - Dev forum at Nabble.com. >>>>> >>>>> >>> >> >> > > > -- View this message in context: http://www.nabble.com/Re%3A-Summer-of-Code-t1551065.html#a4225764 Sent from the My Faces - Dev forum at Nabble.com. ------=_Part_2121_9381981.1146734897874 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit My idea to provide working UI with one line of code from entire data model and then refine it in small steps. And model is not static there, but is constantly being updated. Seems that Rumba framework and hbm2seam are not about that. Faces Freeway looks interesting. My english demands more. Jacob, I don't fully understand your sentence "I've been thinking though with JEE 5 and the EJB 3 adoption, that you couldn't produce something similar to your proposal that works off of pure EJB 3 metadata define the pages." As I understood you were proposing to work using only ejb3 metadata. And using EntityManager directly to persist data. It is easier and makes sense. But more interesting task is to extract data straight from the business layer. Data can come not only from RDBMS, but from web-services or other place. I've been thinking that we can provide access to data model for UI through general interface like extended Maps and Lists. Add to them methods for sorting, validation, extracting metadata about associations. We can use these maps and lists for CRUD templates, but how do maps and lists know about business layer. In business layer interface there usually may be several contracts of woking with data. We annotate this layer's methods with annotations describing what classes to use to deal with data using this method. Then our maps and lists can use this information and will know that we shouldn't use Item object's property comments to extract comments, but use commentsService method getComments(Item item, int start, int count) for paging and such. Are there any interested in mentoring this if I will provide more concrete details? All this is to be discussed.
Mario Ivankovits wrote:
Hi! I developed Faces Freeway to archive this dynamic generation: http://facesfreeway.l3x.net/sample.html The samples are not up to date, much more can be done already. For those wanting to browse the source code: http://facesfreeway.l3x.net/xref/index.html It extracts metadata from your entites and generates the jsf tree dynamically. All this is pluggable and extensible. I'll update the samples, just I need to find the time :-( Ciao, Mario > I've been chatting with Gavin about this for some time-- the code generation vs. dynamic generation for scaffolding. I believe the tooling coming from seam/hbm is all code generation where I would think there would be advantages to having component sets that dynamically determine validators and converters based on metadata. Higher level components could be constructed to actually compose the CRUD pages as a droppable component. > > >> Please check out hbm2seam ( Hibernate Tools suite ) before a lot of hard work >> is poured into this. There may be a large duplication of effort. The last I >> checked, this was in alpha. >> >> Dennis Byrne >> >> >>> -----Original Message----- >>> From: jacob@hookom.net [mailto:jacob@hookom.net] >>> Sent: Wednesday, May 3, 2006 11:57 AM >>> To: dev@myfaces.apache.org >>> Subject: RE: Summer of Code >>> >>> JSF *really* needs this agility with CRUD scaffolding. I've been thinking >>> >> though with JEE 5 and the EJB 3 adoption, that you couldn't produce something >> similar to your proposal that works off of pure EJB 3 metadata define the >> pages. Something like: >> >>> >>> >>> >>> >>> >>> >>> >>> >>> This way, you could have your EJB 3 annotated model and without doing any >>> >> model wiring, these components would work by Class type to handle >> persistence/UI concerns directly without hand-holding. >> >>> As for templating with Facelets, Rick Hightower published something similar >>> >> at IBM: >> >>> http://www-128.ibm.com/developerworks/java/library/j-facelets/index.html >>> >>> He says he has another article on the topic coming out soon. >>> >>> Overall, the need you are describing is obviously there. I wish JBoss >>> >> would've pursued this route more actively with Seam's UI library. >> >>> -- Jacob >>> >>> >>> >>>> Hello. It is not a comlete proposal, but I rather want to know your opinion >>>> on the project i'm working on. It is not straight myfaces codebase related, >>>> but you seem as most appropriate mentor. I planned to work on it before I >>>> knew that there is SoC. But may be you will convince me of its uselessness. >>>> >>>> Recently I have been writing application using jsf. The application is >>>> mostly CRUD. I think that there is much glue code that can be eliminated. >>>> All that identical CRUD backing beans, forms, dataTables, navigation rules. >>>> It is all powerful, but it should be possible to eliminate it until you >>>> >> need >> >>>> something not very trivial. This is the principle which the Ruby on Rails >>>> growing popularity came from. >>>> >>>> There arises a need to define rules of generating it all based on >>>> information about a data model. Code generation tools are insufficient. >>>> Imagine, you have generated all the beans and views, than provided some >>>> changes to some of them and than you want to add small change to the >>>> template or, say, add a field to the domain object. Now you are left on >>>> >> your >> >>>> own to manually change it everywhere it is used. >>>> >>>> I propose to extend facelets templating abilities to be able to encapsulate >>>> all that routine tasks into templates. See: >>>> 1)