users
[Top] [All Lists]

RE: [cinjug-users] Constants imply DP (was: Question on last Mond ay's m

To: users@xxxxxxxxxx
Subject: RE: [cinjug-users] Constants imply DP (was: Question on last Mond ay's meeting)
From: Amol Deshmukh <adeshmukh@xxxxxxxxxxxxxx>
Date: Fri, 25 Feb 2005 13:13:34 -0500
Delivered-to: mailing list users@cinjug.org
Mailing-list: contact users-help@cinjug.org; run by ezmlm
...that's still a way to deal with the problem using
a Constants approach. (Not to mention that the fact that
since MyConstants.java is generated during build, 
you could get into IDE code completion issues when
accessing your constants)

>From what I understand the idea of a non-DP approach is
to avoid using Constants and instead convey that 
/something/ with a method.

~ amol

> -----Original Message-----
> From: Edward Sumerfield [mailto:esumerfd@xxxxxxxxxxx]
> Sent: Friday, February 25, 2005 12:52 PM
> To: users@xxxxxxxxxx
> Subject: Re: [cinjug-users] Constants imply DP (was: Question on last
> Monday's meeting)
> 
> 
> Automate. I didn't test it but you get the idea. Code 
> generation rocks.
> 
> MyConstants.properties
>     something=somethingelse
> 
> Generate Code.sh
>     echo "class MyConstants {" > MyConstants.java
>     cat MyContants.properties | \
>         sed -e "s/([^)])=([^)])/String \1 = \"\2\";" >> 
> MyConstants.java
>     echo "}" >> MyConstants.java
> 
>     cat MyContants.properties |
>         sed -e "s/([^)])=([^)])/    var \1 = \"\2\";" > MyConstants.js
> 
> A more elegant way would be to use ant and use its copy file 
> with filter 
> variables to generate the language specific files from build 
> variables.
> 
> ----- Original Message ----- 
> From: "Mark Windholtz" <windholtz@xxxxxxxxx>
> To: "Jim Cook" <jimcook@xxxxxxxxxxxxx>
> Cc: <users@xxxxxxxxxx>
> Sent: Friday, February 25, 2005 12:36 PM
> Subject: Re: [cinjug-users] Constants imply DP (was: Question on last 
> Monday's meeting)
> 
> 
> > Jim Cook wrote:
> >>
> >> Obviously the logic to produce the total is duplicated 
> (Once in Java and 
> >> the
> >> other in Javascript)
> > ...
> >> Any suggestions on how I could solve this without using constants?
> >>
> >
> >   Another realization is that one reason we all drop back to
> >   Data Processing is that DP is a common language accessible
> >   across departments and different programming languages.
> >
> >   One solution is find a way to generate the JavaScript from a
> >   primary Java definition.  Tapestry does some of this, but I'm not
> >   sure how customizable it is.
> >
> >   In your case, I think your stuck with duplication.
> >   If it's all in Java however, it worth reconciling.
> >
> > Regards,
> > -Mark
> 
> 
> ---------
> You may unsubscribe from this mailing list
> by sending a blank email addressed to:
> users-unsubscribe@xxxxxxxxxx
> 
> --
> Find additional help by sending a blank email
> addressed to:
> users-help@xxxxxxxxxx
> 

<Prev in Thread] Current Thread [Next in Thread>