[gwt-contrib] Re: Flurry of Data binding threads

2008-10-09 Thread chris.ruffalo

Going to stick my nose in here a bit:

I certainly believe that this is all one ball of wax.  I /know/ that
the system that I've been working on can be used to modify the data.
I know it breaks the JSR-303 paradigm so I've left it alone.  The
fundamental difference is that I'm expecting some output from the
process.  A lack of output signifies that everything worked.  Also I'm
not sure how much other metadata frameworks are putting in to pure JVM
mode operation.

I'm currently investigating mechanisms for cutting down on code
overhead because creating a validator for each class has proven to be
large.  Maybe what I need to do (and will investigate) is creating a
gimpy version of the annotations and other metadata on each method and
then packaging that to be consumed by a validator.  Or maybe not,
still working on that.

In any case I'd desperately like to merge functionality with someone
else and build a larger user base and feature set.  I'm not married to
the JSR-303 or anything but it seemed like a good place to start.

I agree with Emily's view of the world and I agree mostly with Ray.
I'm a little fuzzy on the work being done on UI templates and I'm not
sure about the compile-time emphasis.  As I've mentioned before I need
things to work on both sides of the divide.  I'd love to see some
work put in to code templates that work through dynamic generation at
compile time and at run time.  I'm sure that most people don't want me
relying on constant introspection to get the job done just for
performance reasons.

Also the HasValue (or HasData) is a must.  I thought I came up with
that in the shower this morning.  I must have read it somewhere here
first right?  Anyway  I'm looking forward to what is coming in the
days ahead.

Shameless plug:  http://code.google.com/p/gwt-validation/

Chris Ruffalo

On Oct 9, 4:15 pm, Emily Crutcher [EMAIL PROTECTED] wrote:
 To give you an idea of where I am coming from, here is my understanding of
 the world:

 *Metadata Systems, comprising Models and Controllers*
 xforms, Ian's databinding system, Arthur's validation system, gwt team's
 upcoming proposal for data management:

 All part of the larger metadata, binding, code generation class of systems.
 Hopefully all of these can eventually use the same basic concepts and it
 going to be a huge undertaking to get it right. In fact, so huge of one that
 the gwt team has decided to duck for now and are trying very hard not to get
 involved in these discusions at the current time.

 *Widget bridge classes, part of the application's view.*
 Classes used to expose the application's view to the meta data systems.

 *HasValue*:  Provides the bridge between the metadata model and the world of
 widgets. From the meta data system's point of view it has some way of
 creating/linking with instances of HasValueString, HasValueBoolean,
 HasValueDate, etc..

 From the widgets point of view, we have a whole bunch of text boxes, text
 areas, date pickers, etc. on the page.

 Accordingly, HasValue should only ever be used for simple leaf types on leaf
 widgets.

 *EventHandlers*: Provides a way for the meta data system controllers to add
 callbacks to react to widget changes.





  -Ray

  On Wed, Oct 8, 2008 at 7:15 AM, Ray Ryan [EMAIL PROTECTED] wrote:
   We all seem to be talking about data binding and validation a lot, and
  some
   of us are even implementing code about it. We on the GWT team hear the
  need
   and feel it ourselves.

   We have some notions of how we'd like to tackle this in a way that blends
   seamlessly with the rest of GWT, and are looking to start design and
   implementation in earnest before the year is out. This makes it unlikely
   that we'll accept core or incubator patches that implement such a system.
   That said, we don't want to shoot down the excellent work that's being
  done!
   If you have a system that's shaping up to meet your needs and that you
  want
   to share with the GWT community, please do!  Set up a Google Code
  project,
   announce it here, embarrass us by shipping first and attracting a user
   base. We'll probably steal from you shamelessly and ask for your help as
  our
   own system takes shape.
   I hope this doesn't ruffle any feathers, and that you'll understand why
  we
   haven't been as responsive on some of these threads as we should have
  been.
   Thanks,
   rjrjr

 --
 There are only 10 types of people in the world: Those who understand
 binary, and those who don't
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: GWT Issue 343 and the JSR-303 Draft (Implementing in GWT)

2008-10-08 Thread chris.ruffalo

Yes it is, consider:

public class Parent {

   @NotNull
   private String parentString = null;

   @NotNull
   @Valid
   private Child child = null;

   /*
 GETTER AND SETTER METHODS GO HERE
   */
}

public class Child {

   @NotEmpty
   @NotNull
   private String childString = null;

   @NotNull
   private Parent = null;

   /*
 GETTER AND SETTER METHODS GO HERE
   */
}

(Not that this example would require proper getter methods and some
set values)

In this case the @Valid annotation causes the validator to Validate
the child class according to the rules of that child class.  The
@NotNull validation is performed first howerver /and/ it should be
noted that the @Valid annotation will not be processed on null objects
in any case.  The validators also contain logic to prevent cyclic
reprocessing, for example if you set the bidirectional Parent-Child
relationship as is possible in the example Parent /will not/ be
processed twice and therefore neither will Child.  The protection
isn't perfect but it should be enough for the needs of most people.

Let me know if you have any more questions.

On Oct 8, 9:00 am, rb [EMAIL PROTECTED] wrote:
 Is it possible to validate nested objects from a parent?

 Thanks,
 Rex

 On Oct 6, 8:23 pm, chris.ruffalo [EMAIL PROTECTED] wrote:

  Yea, easily.  I didn't mean to make it Java6 specific.

  isEmpty() seems like a better metaphor, I'll take a loot at it right
  now.

  Thanks for pointing that out.

  On Oct 6, 9:13 am, rb [EMAIL PROTECTED] wrote:

   Could this be changed to support Java 5?

   The String.isEmpty() and the AbstractValidator.unrollConstraintSet
   have Java 6 specific stuff.

   A lot more people will be able to use this if you take out the Java 6
   stuff.

   Thanks,
   Rex

   On Oct 2, 1:22 pm, chris.ruffalo [EMAIL PROTECTED] wrote:

Another release has been made 
@http://code.google.com/p/google-web-toolkit/issues/detail?id=343

Please review and send me your comments.  I'd like to target this for
the GWT Incubator so I can get some more eyes on and stuff.

My CLA has been electronically submitted and I'm ready to go.

Chris Ruffalo

On Sep 12, 3:09 pm, chris.ruffalo [EMAIL PROTECTED] wrote:

 I've been looking at 
 :http://code.google.com/p/google-web-toolkit/issues/detail?id=343

 And I've hit a few snags:

 Namely:
   Hosted mode works fine but compiling tries to rebind twice (even
 though I only have
 one GWT.create()) and it can't create the printwriter because the
 class it is trying to write
 already exists.  I guess I need a smarter generator. (?)

   How the heck can I reconcile the functionality of java regex and
 compiled regex?  I
 guess I could have a javascriptPattern and javaPattern property on
 each validator... but that
 sounds like a lot of work for the user.  That is unless I've missed a
 new development along the
 lines of making that easier for developers.

 Anyway, any input would be appreciated and I think if I can figure out
 these snags and get my
 CLA finished (I applied online last night) then I could post the code
 and people could start
 poking at it a little bit because basic field/method level validation
 is working.

 Chris Ruffalo- Hide quoted text -

- Show quoted text -- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: GWT Issue 343 and the JSR-303 Draft (Implementing in GWT)

2008-10-08 Thread chris.ruffalo

In the above Example the Parent field should also have an @Valid
annotation.

Also, instead of updating in the GWT issue 343 thread I'm updating
here:

http://code.google.com/p/gwt-validation/

It also has the Java5 release for download.

On Oct 8, 12:51 pm, chris.ruffalo [EMAIL PROTECTED] wrote:
 Yes it is, consider:

 public class Parent {

   [EMAIL PROTECTED]
    private String parentString = null;

   [EMAIL PROTECTED]
   [EMAIL PROTECTED]
    private Child child = null;

    /*
      GETTER AND SETTER METHODS GO HERE
    */

 }

 public class Child {

   [EMAIL PROTECTED]
   [EMAIL PROTECTED]
    private String childString = null;

   [EMAIL PROTECTED]
    private Parent = null;

    /*
      GETTER AND SETTER METHODS GO HERE
    */

 }

 (Not that this example would require proper getter methods and some
 set values)

 In this case the @Valid annotation causes the validator to Validate
 the child class according to the rules of that child class.  The
 @NotNull validation is performed first howerver /and/ it should be
 noted that the @Valid annotation will not be processed on null objects
 in any case.  The validators also contain logic to prevent cyclic
 reprocessing, for example if you set the bidirectional Parent-Child
 relationship as is possible in the example Parent /will not/ be
 processed twice and therefore neither will Child.  The protection
 isn't perfect but it should be enough for the needs of most people.

 Let me know if you have any more questions.

 On Oct 8, 9:00 am, rb [EMAIL PROTECTED] wrote:

  Is it possible to validate nested objects from a parent?

  Thanks,
  Rex

  On Oct 6, 8:23 pm, chris.ruffalo [EMAIL PROTECTED] wrote:

   Yea, easily.  I didn't mean to make it Java6 specific.

   isEmpty() seems like a better metaphor, I'll take a loot at it right
   now.

   Thanks for pointing that out.

   On Oct 6, 9:13 am, rb [EMAIL PROTECTED] wrote:

Could this be changed to support Java 5?

The String.isEmpty() and the AbstractValidator.unrollConstraintSet
have Java 6 specific stuff.

A lot more people will be able to use this if you take out the Java 6
stuff.

Thanks,
Rex

On Oct 2, 1:22 pm, chris.ruffalo [EMAIL PROTECTED] wrote:

 Another release has been made 
 @http://code.google.com/p/google-web-toolkit/issues/detail?id=343

 Please review and send me your comments.  I'd like to target this for
 the GWT Incubator so I can get some more eyes on and stuff.

 My CLA has been electronically submitted and I'm ready to go.

 Chris Ruffalo

 On Sep 12, 3:09 pm, chris.ruffalo [EMAIL PROTECTED] wrote:

  I've been looking at 
  :http://code.google.com/p/google-web-toolkit/issues/detail?id=343

  And I've hit a few snags:

  Namely:
    Hosted mode works fine but compiling tries to rebind twice (even
  though I only have
  one GWT.create()) and it can't create the printwriter because the
  class it is trying to write
  already exists.  I guess I need a smarter generator. (?)

    How the heck can I reconcile the functionality of java regex and
  compiled regex?  I
  guess I could have a javascriptPattern and javaPattern property on
  each validator... but that
  sounds like a lot of work for the user.  That is unless I've missed 
  a
  new development along the
  lines of making that easier for developers.

  Anyway, any input would be appreciated and I think if I can figure 
  out
  these snags and get my
  CLA finished (I applied online last night) then I could post the 
  code
  and people could start
  poking at it a little bit because basic field/method level 
  validation
  is working.

  Chris Ruffalo- Hide quoted text -

 - Show quoted text -- Hide quoted text -

   - Show quoted text -
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: GWT Issue 343 and the JSR-303 Draft (Implementing in GWT)

2008-10-02 Thread chris.ruffalo

Another release has been made @ 
http://code.google.com/p/google-web-toolkit/issues/detail?id=343

Please review and send me your comments.  I'd like to target this for
the GWT Incubator so I can get some more eyes on and stuff.

My CLA has been electronically submitted and I'm ready to go.

Chris Ruffalo

On Sep 12, 3:09 pm, chris.ruffalo [EMAIL PROTECTED] wrote:
 I've been looking at 
 :http://code.google.com/p/google-web-toolkit/issues/detail?id=343

 And I've hit a few snags:

 Namely:
   Hosted mode works fine but compiling tries to rebind twice (even
 though I only have
 one GWT.create()) and it can't create the printwriter because the
 class it is trying to write
 already exists.  I guess I need a smarter generator. (?)

   How the heck can I reconcile the functionality of java regex and
 compiled regex?  I
 guess I could have a javascriptPattern and javaPattern property on
 each validator... but that
 sounds like a lot of work for the user.  That is unless I've missed a
 new development along the
 lines of making that easier for developers.

 Anyway, any input would be appreciated and I think if I can figure out
 these snags and get my
 CLA finished (I applied online last night) then I could post the code
 and people could start
 poking at it a little bit because basic field/method level validation
 is working.

 Chris Ruffalo
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: GWT Issue 343 and the JSR-303 Draft (Implementing in GWT)

2008-09-17 Thread chris.ruffalo

I wasn't including the source files.  Disregard.  Release should be
soon.

On Sep 17, 3:38 pm, chris.ruffalo [EMAIL PROTECTED] wrote:
 One final bit of help.

 I'm having problems building a jar that will work with the modules to
 compile under a normal project.  If I export the jar with Eclipse
 everything works fine (add directory entries and all that) and the
 compile and shell modes work.

 If I use an ant task to build the jar then it will not work with the
 compiled mode or the shell mode.

 I've never been able to have ant (1.7.1) do this in the past either,
 on other projects.

 Any help would be appreciated.

 On Sep 12, 11:08 pm, chris.ruffalo [EMAIL PROTECTED] wrote:

  I see.  That worked, I guess I was expecting something bad to happen
  if I didn't write new source.  In retrospect why would that happen?

  Fortunately I don't have to do anything different (per user agent)
  yet.

  On Sep 12, 3:39 pm, BobV [EMAIL PROTECTED] wrote:

Namely:
 Hosted mode works fine but compiling tries to rebind twice (even
though I only have
one GWT.create()) and it can't create the printwriter because the
class it is trying to write
already exists.  I guess I need a smarter generator. (?)

   This is expected behavior.  The generator gets called once per
   permutation.  If the PrintWriter is null, just return the name of the
   implementation class that you were tryping to create.  It works this
   way because you may want to generate different code for different
   user.agent values or along some other deferred-binding axis.  In this
   case, you would name the implementation classes differently.

   --
   Bob Vawter
   Google Web Toolkit Team
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: GWT Issue 343 and the JSR-303 Draft (Implementing in GWT)

2008-09-17 Thread chris.ruffalo

Released here : http://code.google.com/p/google-web-toolkit/issues/detail?id=343

Let me know what you think.

On Sep 17, 6:42 pm, chris.ruffalo [EMAIL PROTECTED] wrote:
 I wasn't including the source files.  Disregard.  Release should be
 soon.

 On Sep 17, 3:38 pm, chris.ruffalo [EMAIL PROTECTED] wrote:

  One final bit of help.

  I'm having problems building a jar that will work with the modules to
  compile under a normal project.  If I export the jar with Eclipse
  everything works fine (add directory entries and all that) and the
  compile and shell modes work.

  If I use an ant task to build the jar then it will not work with the
  compiled mode or the shell mode.

  I've never been able to have ant (1.7.1) do this in the past either,
  on other projects.

  Any help would be appreciated.

  On Sep 12, 11:08 pm, chris.ruffalo [EMAIL PROTECTED] wrote:

   I see.  That worked, I guess I was expecting something bad to happen
   if I didn't write new source.  In retrospect why would that happen?

   Fortunately I don't have to do anything different (per user agent)
   yet.

   On Sep 12, 3:39 pm, BobV [EMAIL PROTECTED] wrote:

 Namely:
  Hosted mode works fine but compiling tries to rebind twice (even
 though I only have
 one GWT.create()) and it can't create the printwriter because the
 class it is trying to write
 already exists.  I guess I need a smarter generator. (?)

This is expected behavior.  The generator gets called once per
permutation.  If the PrintWriter is null, just return the name of the
implementation class that you were tryping to create.  It works this
way because you may want to generate different code for different
user.agent values or along some other deferred-binding axis.  In this
case, you would name the implementation classes differently.

--
Bob Vawter
Google Web Toolkit Team
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] GWT Issue 343 and the JSR-303 Draft (Implementing in GWT)

2008-09-12 Thread chris.ruffalo

I've been looking at : 
http://code.google.com/p/google-web-toolkit/issues/detail?id=343

And I've hit a few snags:

Namely:
  Hosted mode works fine but compiling tries to rebind twice (even
though I only have
one GWT.create()) and it can't create the printwriter because the
class it is trying to write
already exists.  I guess I need a smarter generator. (?)

  How the heck can I reconcile the functionality of java regex and
compiled regex?  I
guess I could have a javascriptPattern and javaPattern property on
each validator... but that
sounds like a lot of work for the user.  That is unless I've missed a
new development along the
lines of making that easier for developers.

Anyway, any input would be appreciated and I think if I can figure out
these snags and get my
CLA finished (I applied online last night) then I could post the code
and people could start
poking at it a little bit because basic field/method level validation
is working.

Chris Ruffalo



--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: GWT Issue 343 and the JSR-303 Draft (Implementing in GWT)

2008-09-12 Thread chris.ruffalo

I see.  That worked, I guess I was expecting something bad to happen
if I didn't write new source.  In retrospect why would that happen?

Fortunately I don't have to do anything different (per user agent)
yet.

On Sep 12, 3:39 pm, BobV [EMAIL PROTECTED] wrote:
  Namely:
   Hosted mode works fine but compiling tries to rebind twice (even
  though I only have
  one GWT.create()) and it can't create the printwriter because the
  class it is trying to write
  already exists.  I guess I need a smarter generator. (?)

 This is expected behavior.  The generator gets called once per
 permutation.  If the PrintWriter is null, just return the name of the
 implementation class that you were tryping to create.  It works this
 way because you may want to generate different code for different
 user.agent values or along some other deferred-binding axis.  In this
 case, you would name the implementation classes differently.

 --
 Bob Vawter
 Google Web Toolkit Team
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---