17 décembre 2008

beans binding dans gwt

La JSR 295 a été crée pour définir un mécanisme de binding en Java. L'idée simple et supportée par de nombreux langages est que deux attributs de deux beans soit "liés", ce qui permet par exemple à un widget graphique de toujours rester synchronisé avec l'objet modèle qu'il affiche, sans devoir écrire du code de mise à jour fastidieux et répétitif.

beansbinding est l'implémentation associée à cette spec et est utilisé dans NetBeans, ce qui prouve une bonne maturité de la techno. Seulement le projet semble "dormant", et la JSR associée n'a pas bougé depuis 2006. Pourtant le mot clé "bind" utilisé par JavaFX montre bien l'importance de ce concept pour les IHM

gwt-beans-binding est un portage de la JSR 295 (ou plutôt de ses concepts puisqu'elle n'est ni aboutie, ni publique) pour GWT. La mise en oeuvre est très simple. Pour lier deux textBox par exemple, il suffit de déclarer :

Binding.createAutoBinding( READ_WRITE,
    textBox, BeanProperty.create( "text" ),
    model, BeanProperty.create( "name" ) );

L'équivalent codé "à la main" nécessite de définit de nombreux PropertyChangeListeners (NB: quand seront-ils supportés en standard par GWT ?).

Pourquoi se focaliser sur ce projet, encore en version 0.2, alors que d'autres options comme Gwittir offrent des solutions comparables ? 
  • D'une part, parce que quelque soit l'évolution de cette JSR, elle sera toujours considérée si un nouveau groupe s'attaque à ce problème de data-binding en Java. 
  • D'autre part, parce qu'elle propose une API simple et focalisée sur cette unique tâche. 
  • Enfin, parceque le développeur de cette petite librairie a l'air très motivé !
Pour voir gwt-beans-binding à l'oeuvre : démo

11 commentaires:

Anonyme a dit…

batterie iphone 7 repaired four ipad for me today in two hours. Did a great job on all of them and charged a great price, especially for me not having to travel anywhere and sit around waiting on the repair. He traveled all the way to me and fixed everything on site. Plus his work comes with a warranty…

BradCovey a dit…

The Assignment Writing Help In Nottingham is quite successful in writing content on such complex topics with new world research

jamesstone a dit…

Programming Assignment Help London from expert writers. Our team is extremely knowledgeable and skilled, and we can provide you authentic assignment writing services on schedule. Get writing help for all subjects that is quick, original, and flawless with a 100% guarantee.

johnathanwell a dit…

When discussing "beans binding dans gwt," let's focus on the topic of binding mechanisms and their application within GWT rather than introducing unrelated services like write my assignment cheap. Let's share insights, tips, and experiences related to beans binding in GWT and how it enhances the development process. Engaging in technical discussions can contribute to a better understanding of the topic and foster collaboration among developers.

Assignment Help a dit…

For Nottingham Assignment Writing Services you can contact professionals who can deliver the best assistance at affordable prices.

HarrySmith a dit…

When I was overwhelmed with assignments and running out of time, I discovered the "Pay Someone to Do My Assignment UK" service. It's been a game-changer for me. The team here is incredibly professional and always delivers on time. They have a knack for understanding your exact requirements and tailoring assignments accordingly. Plus, their customer support is excellent. I no longer stress over assignments; I turn to them, and it's sorted. Highly recommended!

Nicholas Tan a dit…

Dedicated to facilitating notarized translations of LTA documents in Singapore, catering to both legal and personal needs. Proficient in notary public translations for ICA, MFA, IRAS, MoM, and SAL documents, maintaining utmost precision and confidentiality. Known for delivering top-tier document legalisation services, including efficient apostille services in Singapore.

Rahima Ghori a dit…

Great insights on data binding! For those looking for a reliable Guildford Airport Taxi, check out Wizz Cars for stress-free airport transfers.

Robbin Micheal a dit…

Great insights on Beans Binding in GWT! If anyone's looking for reliable computer help near me for repairs and troubleshooting, check out 1st Class Computer Services for expert assistance.

Liam a dit…

Are you anxious about your next test? Why not reduce the burden? You may concentrate on what really matters—your education and general well-being—by pay someone to do my exam. It's a clever strategy to control your stress levels and guarantee that you achieve the outcomes you desire. Make the change to succeed academically.

Anthany brad a dit…

Are you trying to find the greatest best online essay help This service provides professional advice, prompt delivery, and excellent support to help you crush your assignments!