Re: You don't have permission to access /cgi-bin/WebObjects/TheApp.woa/-5579 on this server.

2010-04-15 Thread Mark Gowdy

Do a quick search for the message on 2nd April 2010:
Re: Application not working with update 10.6.3

This is probably the same problem:

The update added a few lines to /etc/apache2/httpd.conf

To the end of the  configuration of mailman: , it added:

ScriptAlias /cgi-bin/ /Library/WebServer/CGI-Executables/

which promptly stopped the WebObjects apache adaptor from being seen.

Hope that helps..

Mark

On 15 Apr 2010, at 03:54, Jeff Schmitz wrote:

Same thing was happening to me (I just upgraded to SL on my Dev  
machine), and after making the suggested change below, when I start  
my app with DirectConnect disabled I'm getting


Forbidden

You don't have permission to access /cgi-bin/WebObjects/ 
netBrackets.woa/- on this server.


Any ideas?

Thanks,
Jeff

On Apr 6, 2010, at 2:34 PM, David LeBer wrote:



On 2010-04-06, at 3:06 PM, David LeBer wrote:


Hey all,

I'm on Snow Leopard and my dev environment is not letting me  
connect to my app with direct connect disabled. Sheepishly, I  
can't remember whether this has worked since I updated  to SL.  
Does anyone have a working apache2 httpd.conf file they could  
send me that I could compare against mine?


Thx,

;david



Thanks everyone, found it.

Directory /
   Options FollowSymLinks
   AllowOverride None
   Order deny,allow
   Deny from all
/Directory

vs:

Directory /
   Options FollowSymLinks
   AllowOverride None
   #Order deny,allow
   #Deny from all
/Directory

I thought I'd corrected that...

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog:   http://davidleber.net
profile:http://www.linkedin.com/in/davidleber
twitter:http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/jeffandmonica 
%40mac.com


This email sent to jeffandmon...@mac.com


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/gowdy%40mac.com

This email sent to go...@mac.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Basic question - lightweight to-one relationship from entity to POJO/enum

2010-04-15 Thread David Avendasora

On Apr 14, 2010, at 9:49 PM, Ramsey Lee Gurley wrote:

 
 Well, there's only going to be one of each enum in memory.  So, that's a 
 bonus.

Memory is cheap. :-)

  They are fast to access... I don't block a thread waiting on a fault.  
 That's good too. On that same line of thought, there's no need to prefetch 
 them.  

Well, reading in 5 key-value rows from a table can't take all that long, even 
if you don't prefetch them. Obviously if they are used thousands of times in a 
transaction, then you'll need to speed it up, but I'd optimize it only if it's 
actually slowing things down.

 Does any of that make a big difference? I don't know.  Can't hurt though (^_^)

Depends on your definition of pain., I guess. :-)

I've always looked at it as a case of if the value is defined only in code, how 
do people who are reading the data directly out of the DB know what the value 
in the DB means? How do you make everything consistent between your app and a 
reporting system reading data out of it?

DBA: Oh hey, this transaction has a status of 1. What does 1 mean? Is it 
Active? Is it Closed? What? Now I've got to track down that bleeping developer 
and ask him to interpret this data. Would it have been so hard for him to just 
include all the context of his application in the DB where anyone can get at 
it? It's not like a few 5-row key-value tables are going to bring the DB to 
it's knees...

At least that's what I hear in my head whenever I think about it.

cue: Chuck.

Dave


 
 On Apr 8, 2010, at 4:52 AM, Mark Wardle wrote:
 
 Hi all, please forgive a very simple question but I'd like to create a
 lightweight (non-EO) to-one relationship from an EO. I make heavy use
 of D2W so I want to fulfil the WO/EOF rules and use to-one
 relationship components
 
 I usually create a new entity and have a genuine heavyweight EOF
 relationship but I have several properties for which this seems
 excessive.
 
 I have an entity (FormEdssFull) which can have a visual field score
 for both right and left eye.
 
 Can I do this with a java enum?
 
 public enum VisualAcuity {
 NORMAL(0, Normal),
 SIGNS_ONLY(1, Signs only:),
 MODERATE(2, Moderate),
 MARKED(3, Marked);
 
 /* insert enum constructor etc... */
 }
 
 and then create the appropriate accessor and mutator in the entity?
 
 What do other people do in these situations?
 
 Many thanks,
 
 Mark
 
 -- 
 Dr. Mark Wardle
 Specialist registrar, Neurology
 Cardiff, UK
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
 
 This email sent to webobje...@avendasora.com
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com
 
 This email sent to rgur...@mac.com
 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Strange Problem with Ajax/Wonder

2010-04-15 Thread Frank Gibau

Thank you Mike,
I am using WO 5.4.1 and wonderversion5.0.0-r10551/wonderversion.
That is a rather new version I think.
Two month ago I made an update ,from Version 4 to 5.0.0-r10551, hoping 
that this strange behaviour will be fixed (if its not my own mistake).


Is there a way to ask Projectwonder for its ajax version ?

Thank you
Frank

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Basic question - lightweight to-one relationship from entity to POJO/enum

2010-04-15 Thread Ramsey Lee Gurley

On Apr 15, 2010, at 8:07 AM, David Avendasora wrote:

 
 On Apr 14, 2010, at 9:49 PM, Ramsey Lee Gurley wrote:
 
 
 Well, there's only going to be one of each enum in memory.  So, that's a 
 bonus.
 
 Memory is cheap. :-)
 
 They are fast to access... I don't block a thread waiting on a fault.  
 That's good too. On that same line of thought, there's no need to prefetch 
 them.  
 
 Well, reading in 5 key-value rows from a table can't take all that long, even 
 if you don't prefetch them. Obviously if they are used thousands of times in 
 a transaction, then you'll need to speed it up, but I'd optimize it only if 
 it's actually slowing things down.
 
 Does any of that make a big difference? I don't know.  Can't hurt though 
 (^_^)
 
 Depends on your definition of pain., I guess. :-)
 
 I've always looked at it as a case of if the value is defined only in code, 
 how do people who are reading the data directly out of the DB know what the 
 value in the DB means? How do you make everything consistent between your app 
 and a reporting system reading data out of it?
 
 DBA: Oh hey, this transaction has a status of 1. What does 1 mean? Is it 
 Active? Is it Closed? What? Now I've got to track down that bleeping 
 developer and ask him to interpret this data. Would it have been so hard for 
 him to just include all the context of his application in the DB where anyone 
 can get at it? It's not like a few 5-row key-value tables are going to bring 
 the DB to it's knees...


Wait, what is the DBA doing with some dumb DB tools when he has D2JC? (^_~)  

I believe the enum prototype in wonder stores them as a string.  So, continuing 
with Mark's example, your DBA would just see NORMAL, SIGNS_ONLY, MODERATE, etc. 
 He doesn't see some fk and need to jump to another table to figure out what 
that fk happens to be.  It sounds like you're arguing against enumeration 
entities now (^_^)

 
 At least that's what I hear in my head whenever I think about it.
 
 cue: Chuck.
 
 Dave
 
 
 
 On Apr 8, 2010, at 4:52 AM, Mark Wardle wrote:
 
 Hi all, please forgive a very simple question but I'd like to create a
 lightweight (non-EO) to-one relationship from an EO. I make heavy use
 of D2W so I want to fulfil the WO/EOF rules and use to-one
 relationship components
 
 I usually create a new entity and have a genuine heavyweight EOF
 relationship but I have several properties for which this seems
 excessive.
 
 I have an entity (FormEdssFull) which can have a visual field score
 for both right and left eye.
 
 Can I do this with a java enum?
 
 public enum VisualAcuity {
 NORMAL(0, Normal),
 SIGNS_ONLY(1, Signs only:),
 MODERATE(2, Moderate),
 MARKED(3, Marked);
 
 /* insert enum constructor etc... */
 }
 
 and then create the appropriate accessor and mutator in the entity?
 
 What do other people do in these situations?
 
 Many thanks,
 
 Mark
 
 -- 
 Dr. Mark Wardle
 Specialist registrar, Neurology
 Cardiff, UK
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
 
 This email sent to webobje...@avendasora.com
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com
 
 This email sent to rgur...@mac.com
 
 



smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: WebServerResources patternset

2010-04-15 Thread John Huss
For posterity's sake:
I got this working although the files are duplicated when built with ant.
 So now I have this:

woproject/wsresources.include.patternset

WebServerResources/**/*
war/**/*


woproject/wsresources-war.include.patternset (only used by ant, see below)

**/*


build.xml


wsresources dir=.

includesfile name=woproject/wsresources.include.patternset /

excludesfile name=woproject/wsresources.exclude.patternset /

/wsresources

wsresources dir=war

includesfile name=woproject/wsresources-war.include.patternset /

/wsresources


This works perfectly with the eclipse builder - it has no issues.  The ant
builder on the other hand seems to be special casing the WebServerResources
source folder and treating others differently.  With this setup using ant I
get the war folder itself copied into the build's WSR AND the contents of
war copied into the build's WSR.  So there is duplication, but it will work.

I'm on my way to file a bug since the behavior between eclipse and ant
should be the same and it's not.

Thanks,
John
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Basic question - lightweight to-one relationship from entity to POJO/enum

2010-04-15 Thread David Avendasora

On Apr 15, 2010, at 8:53 AM, Ramsey Lee Gurley wrote:

 Wait, what is the DBA doing with some dumb DB tools when he has D2JC? (^_~)  

Ahg! Touché.  ( ! )

That's a vertical smiley, btw.

Dave ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: You don't have permission to access /cgi-bin/WebObjects/TheApp.woa/-5579 on this server.

2010-04-15 Thread Chuck Hill


On Apr 15, 2010, at 4:52 AM, Mark Gowdy wrote:


Do a quick search for the message on 2nd April 2010:
Re: Application not working with update 10.6.3

This is probably the same problem:

The update added a few lines to /etc/apache2/httpd.conf

To the end of the  configuration of mailman: , it added:

ScriptAlias /cgi-bin/ /Library/WebServer/CGI-Executables/

which promptly stopped the WebObjects apache adaptor from being seen.


An easy way to avoid this stepping on of your configuration is to use  
something like /Apps/ instead of /cgi-bin/ to mark WO URLs, and also  
update apache.conf:


# You can change the 'cgi-bin' part of WebObjectsAlias to whatever you
# prefer (such as Apps), but the 'WebObjects' part is required.
WebObjectsAlias /Apps/WebObjects

I'd rather switch than fight.


Chuck



On 15 Apr 2010, at 03:54, Jeff Schmitz wrote:

Same thing was happening to me (I just upgraded to SL on my Dev  
machine), and after making the suggested change below, when I start  
my app with DirectConnect disabled I'm getting


Forbidden

You don't have permission to access /cgi-bin/WebObjects/ 
netBrackets.woa/- on this server.


Any ideas?

Thanks,
Jeff

On Apr 6, 2010, at 2:34 PM, David LeBer wrote:



On 2010-04-06, at 3:06 PM, David LeBer wrote:


Hey all,

I'm on Snow Leopard and my dev environment is not letting me  
connect to my app with direct connect disabled. Sheepishly, I  
can't remember whether this has worked since I updated  to SL.  
Does anyone have a working apache2 httpd.conf file they could  
send me that I could compare against mine?


Thx,

;david



Thanks everyone, found it.

Directory /
  Options FollowSymLinks
  AllowOverride None
  Order deny,allow
  Deny from all
/Directory

vs:

Directory /
  Options FollowSymLinks
  AllowOverride None
  #Order deny,allow
  #Deny from all
/Directory

I thought I'd corrected that...

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog:   http://davidleber.net
profile:http://www.linkedin.com/in/davidleber
twitter:http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/jeffandmonica%40mac.com

This email sent to jeffandmon...@mac.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/gowdy%40mac.com

This email sent to go...@mac.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net


--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects







___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Basic question - lightweight to-one relationship from entity to POJO/enum

2010-04-15 Thread Chuck Hill

On Apr 15, 2010, at 5:53 AM, Ramsey Lee Gurley wrote:

On Apr 15, 2010, at 8:07 AM, David Avendasora wrote:

On Apr 14, 2010, at 9:49 PM, Ramsey Lee Gurley wrote:



Well, there's only going to be one of each enum in memory.  So,  
that's a bonus.


Memory is cheap. :-)

They are fast to access... I don't block a thread waiting on a  
fault.  That's good too. On that same line of thought, there's no  
need to prefetch them.


Well, reading in 5 key-value rows from a table can't take all that  
long, even if you don't prefetch them. Obviously if they are used  
thousands of times in a transaction, then you'll need to speed it  
up, but I'd optimize it only if it's actually slowing things down.


Does any of that make a big difference? I don't know.  Can't hurt  
though (^_^)


Depends on your definition of pain., I guess. :-)

I've always looked at it as a case of if the value is defined only  
in code, how do people who are reading the data directly out of the  
DB know what the value in the DB means? How do you make everything  
consistent between your app and a reporting system reading data out  
of it?


DBA: Oh hey, this transaction has a status of 1. What does 1 mean?  
Is it Active? Is it Closed? What? Now I've got to track down that  
bleeping developer and ask him to interpret this data. Would it  
have been so hard for him to just include all the context of his  
application in the DB where anyone can get at it? It's not like a  
few 5-row key-value tables are going to bring the DB to it's  
knees...



Wait, what is the DBA doing with some dumb DB tools when he has  
D2JC? (^_~)


I believe the enum prototype in wonder stores them as a string.  So,  
continuing with Mark's example, your DBA would just see NORMAL,  
SIGNS_ONLY, MODERATE, etc.  He doesn't see some fk and need to jump  
to another table to figure out what that fk happens to be.  It  
sounds like you're arguing against enumeration entities now (^_^)




At least that's what I hear in my head whenever I think about it.

cue: Chuck.


So far, I have not been using enums - though I can see the  
attraction.  The big reason for that is that I am stuck with a tool  
that can only parse Java 1.4 syntax.  Using something like  
ERXEnterpriseObjectCache with these Lookup EOs eliminates the fetching  
problem leaving you with a small memory and performance overhead.  It  
is not something that keeps me up at night.



Chuck



On Apr 8, 2010, at 4:52 AM, Mark Wardle wrote:

Hi all, please forgive a very simple question but I'd like to  
create a
lightweight (non-EO) to-one relationship from an EO. I make  
heavy use

of D2W so I want to fulfil the WO/EOF rules and use to-one
relationship components

I usually create a new entity and have a genuine heavyweight EOF
relationship but I have several properties for which this seems
excessive.

I have an entity (FormEdssFull) which can have a visual field  
score

for both right and left eye.

Can I do this with a java enum?

public enum VisualAcuity {
NORMAL(0, Normal),
SIGNS_ONLY(1, Signs only:),
MODERATE(2, Moderate),
MARKED(3, Marked);

/* insert enum constructor etc... */
}

and then create the appropriate accessor and mutator in the  
entity?


What do other people do in these situations?

Many thanks,

Mark

--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com

This email sent to webobje...@avendasora.com




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com

This email sent to rgur...@mac.com






___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net


--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects







___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to 

Re: Basic question - lightweight to-one relationship from entity to POJO/enum

2010-04-15 Thread Chuck Hill


On Apr 15, 2010, at 5:53 AM, Ramsey Lee Gurley wrote:



On Apr 15, 2010, at 8:07 AM, David Avendasora wrote:



On Apr 14, 2010, at 9:49 PM, Ramsey Lee Gurley wrote:



Well, there's only going to be one of each enum in memory.  So,  
that's a bonus.


Memory is cheap. :-)

They are fast to access... I don't block a thread waiting on a  
fault.  That's good too. On that same line of thought, there's no  
need to prefetch them.


Well, reading in 5 key-value rows from a table can't take all that  
long, even if you don't prefetch them. Obviously if they are used  
thousands of times in a transaction, then you'll need to speed it  
up, but I'd optimize it only if it's actually slowing things down.


Does any of that make a big difference? I don't know.  Can't hurt  
though (^_^)


Depends on your definition of pain., I guess. :-)

I've always looked at it as a case of if the value is defined only  
in code, how do people who are reading the data directly out of the  
DB know what the value in the DB means? How do you make everything  
consistent between your app and a reporting system reading data out  
of it?


DBA: Oh hey, this transaction has a status of 1. What does 1 mean?  
Is it Active? Is it Closed? What? Now I've got to track down that  
bleeping developer and ask him to interpret this data. Would it  
have been so hard for him to just include all the context of his  
application in the DB where anyone can get at it? It's not like a  
few 5-row key-value tables are going to bring the DB to it's  
knees...



Wait, what is the DBA doing with some dumb DB tools when he has  
D2JC? (^_~)


I believe the enum prototype in wonder stores them as a string.  So,  
continuing with Mark's example, your DBA would just see NORMAL,  
SIGNS_ONLY, MODERATE, etc.  He doesn't see some fk and need to jump  
to another table to figure out what that fk happens to be.  It  
sounds like you're arguing against enumeration entities now (^_^)


But said DBA will then commence whining about non-normalized data.






At least that's what I hear in my head whenever I think about it.

cue: Chuck.

Dave




On Apr 8, 2010, at 4:52 AM, Mark Wardle wrote:

Hi all, please forgive a very simple question but I'd like to  
create a
lightweight (non-EO) to-one relationship from an EO. I make  
heavy use

of D2W so I want to fulfil the WO/EOF rules and use to-one
relationship components

I usually create a new entity and have a genuine heavyweight EOF
relationship but I have several properties for which this seems
excessive.

I have an entity (FormEdssFull) which can have a visual field  
score

for both right and left eye.

Can I do this with a java enum?

public enum VisualAcuity {
NORMAL(0, Normal),
SIGNS_ONLY(1, Signs only:),
MODERATE(2, Moderate),
MARKED(3, Marked);

/* insert enum constructor etc... */
}

and then create the appropriate accessor and mutator in the  
entity?


What do other people do in these situations?

Many thanks,

Mark

--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com

This email sent to webobje...@avendasora.com




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com

This email sent to rgur...@mac.com






___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net


--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects







___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Basic question - lightweight to-one relationship from entity to POJO/enum

2010-04-15 Thread Mark Wardle

I've found this interesting.

My problem is I already have 80 entities.  For instance, I have an  
entity representing structured medical data: as such it has about  
fifty pick lists - representing these as separate entities will be a  
nightmare! Using enums seems to work well and keeps these items in a  
private namespace.


I also find it very convenient to create a NSDictionary with keys and  
default values that can be used in awakeFromInsertion - Ive found it a  
bit clumsy to start doing fetches to set default values in  
awakeFromInsertion.


Unless there's a WO-way of doing that.

The other issue is when calculating things.

Using an enum, I can do:

If (reflexPlantarRight == ReflexPlantar.EXTENSOR) { 

I've always found checking EO identity a bit clumsy!

Mark

--
Dr. Mark Wardle
Specialist registrar, Neurology
(Sent from my mobile)


On 15 Apr 2010, at 18:53, Chuck Hill ch...@global-village.net wrote:



On Apr 15, 2010, at 5:53 AM, Ramsey Lee Gurley wrote:



On Apr 15, 2010, at 8:07 AM, David Avendasora wrote:



On Apr 14, 2010, at 9:49 PM, Ramsey Lee Gurley wrote:



Well, there's only going to be one of each enum in memory.  So,  
that's a bonus.


Memory is cheap. :-)

They are fast to access... I don't block a thread waiting on a  
fault.  That's good too. On that same line of thought, there's no  
need to prefetch them.


Well, reading in 5 key-value rows from a table can't take all that  
long, even if you don't prefetch them. Obviously if they are used  
thousands of times in a transaction, then you'll need to speed it  
up, but I'd optimize it only if it's actually slowing things down.


Does any of that make a big difference? I don't know.  Can't hurt  
though (^_^)


Depends on your definition of pain., I guess. :-)

I've always looked at it as a case of if the value is defined only  
in code, how do people who are reading the data directly out of  
the DB know what the value in the DB means? How do you make  
everything consistent between your app and a reporting system  
reading data out of it?


DBA: Oh hey, this transaction has a status of 1. What does 1  
mean? Is it Active? Is it Closed? What? Now I've got to track down  
that bleeping developer and ask him to interpret this data. Would  
it have been so hard for him to just include all the context of  
his application in the DB where anyone can get at it? It's not  
like a few 5-row key-value tables are going to bring the DB to  
it's knees...



Wait, what is the DBA doing with some dumb DB tools when he has  
D2JC? (^_~)


I believe the enum prototype in wonder stores them as a string.   
So, continuing with Mark's example, your DBA would just see NORMAL,  
SIGNS_ONLY, MODERATE, etc.  He doesn't see some fk and need to jump  
to another table to figure out what that fk happens to be.  It  
sounds like you're arguing against enumeration entities now (^_^)


But said DBA will then commence whining about non-normalized data.






At least that's what I hear in my head whenever I think about it.

cue: Chuck.

Dave




On Apr 8, 2010, at 4:52 AM, Mark Wardle wrote:

Hi all, please forgive a very simple question but I'd like to  
create a
lightweight (non-EO) to-one relationship from an EO. I make  
heavy use

of D2W so I want to fulfil the WO/EOF rules and use to-one
relationship components

I usually create a new entity and have a genuine heavyweight EOF
relationship but I have several properties for which this seems
excessive.

I have an entity (FormEdssFull) which can have a visual field  
score

for both right and left eye.

Can I do this with a java enum?

public enum VisualAcuity {
NORMAL(0, Normal),
SIGNS_ONLY(1, Signs only:),
MODERATE(2, Moderate),
MARKED(3, Marked);

/* insert enum constructor etc... */
}

and then create the appropriate accessor and mutator in the  
entity?


What do other people do in these situations?

Many thanks,

Mark

--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com

This email sent to webobje...@avendasora.com




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com

This email sent to rgur...@mac.com






___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to 

Re: Basic question - lightweight to-one relationship from entity to POJO/enum

2010-04-15 Thread Mike Schrag
i'm an enum fan ... lookup tables are dead to me, because, as someone already 
pointed out, you almost always want them synced between code and the database, 
which invariably creates a mismatch at some point. the only reason i use lookup 
tables at this point is if the enumerated values are runtime-mutable. 
technically putting the enum name in a field isn't unnormalized, either, since 
that IS the primary key for the enum. just because it happens to be a string 
isn't a problem.

ms

On Apr 15, 2010, at 4:52 PM, Mark Wardle wrote:

 I've found this interesting.
 
 My problem is I already have 80 entities.  For instance, I have an entity 
 representing structured medical data: as such it has about fifty pick lists - 
 representing these as separate entities will be a nightmare! Using enums 
 seems to work well and keeps these items in a private namespace.
 
 I also find it very convenient to create a NSDictionary with keys and default 
 values that can be used in awakeFromInsertion - Ive found it a bit clumsy to 
 start doing fetches to set default values in awakeFromInsertion.
 
 Unless there's a WO-way of doing that.
 
 The other issue is when calculating things.
 
 Using an enum, I can do:
 
 If (reflexPlantarRight == ReflexPlantar.EXTENSOR) { 
 
 I've always found checking EO identity a bit clumsy!
 
 Mark
 
 -- 
 Dr. Mark Wardle
 Specialist registrar, Neurology
 (Sent from my mobile)
 
 
 On 15 Apr 2010, at 18:53, Chuck Hill ch...@global-village.net wrote:
 
 
 On Apr 15, 2010, at 5:53 AM, Ramsey Lee Gurley wrote:
 
 
 On Apr 15, 2010, at 8:07 AM, David Avendasora wrote:
 
 
 On Apr 14, 2010, at 9:49 PM, Ramsey Lee Gurley wrote:
 
 
 Well, there's only going to be one of each enum in memory.  So, that's a 
 bonus.
 
 Memory is cheap. :-)
 
 They are fast to access... I don't block a thread waiting on a fault.  
 That's good too. On that same line of thought, there's no need to 
 prefetch them.
 
 Well, reading in 5 key-value rows from a table can't take all that long, 
 even if you don't prefetch them. Obviously if they are used thousands of 
 times in a transaction, then you'll need to speed it up, but I'd optimize 
 it only if it's actually slowing things down.
 
 Does any of that make a big difference? I don't know.  Can't hurt though 
 (^_^)
 
 Depends on your definition of pain., I guess. :-)
 
 I've always looked at it as a case of if the value is defined only in 
 code, how do people who are reading the data directly out of the DB know 
 what the value in the DB means? How do you make everything consistent 
 between your app and a reporting system reading data out of it?
 
 DBA: Oh hey, this transaction has a status of 1. What does 1 mean? Is it 
 Active? Is it Closed? What? Now I've got to track down that bleeping 
 developer and ask him to interpret this data. Would it have been so hard 
 for him to just include all the context of his application in the DB where 
 anyone can get at it? It's not like a few 5-row key-value tables are going 
 to bring the DB to it's knees...
 
 
 Wait, what is the DBA doing with some dumb DB tools when he has D2JC? (^_~)
 
 I believe the enum prototype in wonder stores them as a string.  So, 
 continuing with Mark's example, your DBA would just see NORMAL, SIGNS_ONLY, 
 MODERATE, etc.  He doesn't see some fk and need to jump to another table to 
 figure out what that fk happens to be.  It sounds like you're arguing 
 against enumeration entities now (^_^)
 
 But said DBA will then commence whining about non-normalized data.
 
 
 
 
 At least that's what I hear in my head whenever I think about it.
 
 cue: Chuck.
 
 Dave
 
 
 
 On Apr 8, 2010, at 4:52 AM, Mark Wardle wrote:
 
 Hi all, please forgive a very simple question but I'd like to create a
 lightweight (non-EO) to-one relationship from an EO. I make heavy use
 of D2W so I want to fulfil the WO/EOF rules and use to-one
 relationship components
 
 I usually create a new entity and have a genuine heavyweight EOF
 relationship but I have several properties for which this seems
 excessive.
 
 I have an entity (FormEdssFull) which can have a visual field score
 for both right and left eye.
 
 Can I do this with a java enum?
 
 public enum VisualAcuity {
 NORMAL(0, Normal),
 SIGNS_ONLY(1, Signs only:),
 MODERATE(2, Moderate),
 MARKED(3, Marked);
 
 /* insert enum constructor etc... */
 }
 
 and then create the appropriate accessor and mutator in the entity?
 
 What do other people do in these situations?
 
 Many thanks,
 
 Mark
 
 -- 
 Dr. Mark Wardle
 Specialist registrar, Neurology
 Cardiff, UK
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
 
 This email sent to webobje...@avendasora.com
 
 
 
 ___
 

Re: Basic question - lightweight to-one relationship from entity to POJO/enum

2010-04-15 Thread Chuck Hill


On Apr 15, 2010, at 1:52 PM, Mark Wardle wrote:


I've found this interesting.

My problem is I already have 80 entities.  For instance, I have an  
entity representing structured medical data: as such it has about  
fifty pick lists - representing these as separate entities will be a  
nightmare! Using enums seems to work well and keeps these items in a  
private namespace.


I'd not be keen on 80 lookup tables either.




I also find it very convenient to create a NSDictionary with keys  
and default values that can be used in awakeFromInsertion - Ive  
found it a bit clumsy to start doing fetches to set default values  
in awakeFromInsertion.


Unless there's a WO-way of doing that.

The other issue is when calculating things.

Using an enum, I can do:

If (reflexPlantarRight == ReflexPlantar.EXTENSOR) { 

I've always found checking EO identity a bit clumsy!

Mark

--
Dr. Mark Wardle
Specialist registrar, Neurology
(Sent from my mobile)


On 15 Apr 2010, at 18:53, Chuck Hill ch...@global-village.net wrote:



On Apr 15, 2010, at 5:53 AM, Ramsey Lee Gurley wrote:



On Apr 15, 2010, at 8:07 AM, David Avendasora wrote:



On Apr 14, 2010, at 9:49 PM, Ramsey Lee Gurley wrote:



Well, there's only going to be one of each enum in memory.  So,  
that's a bonus.


Memory is cheap. :-)

They are fast to access... I don't block a thread waiting on a  
fault.  That's good too. On that same line of thought, there's  
no need to prefetch them.


Well, reading in 5 key-value rows from a table can't take all  
that long, even if you don't prefetch them. Obviously if they are  
used thousands of times in a transaction, then you'll need to  
speed it up, but I'd optimize it only if it's actually slowing  
things down.


Does any of that make a big difference? I don't know.  Can't  
hurt though (^_^)


Depends on your definition of pain., I guess. :-)

I've always looked at it as a case of if the value is defined  
only in code, how do people who are reading the data directly out  
of the DB know what the value in the DB means? How do you make  
everything consistent between your app and a reporting system  
reading data out of it?


DBA: Oh hey, this transaction has a status of 1. What does 1  
mean? Is it Active? Is it Closed? What? Now I've got to track  
down that bleeping developer and ask him to interpret this data.  
Would it have been so hard for him to just include all the  
context of his application in the DB where anyone can get at it?  
It's not like a few 5-row key-value tables are going to bring the  
DB to it's knees...



Wait, what is the DBA doing with some dumb DB tools when he has  
D2JC? (^_~)


I believe the enum prototype in wonder stores them as a string.   
So, continuing with Mark's example, your DBA would just see  
NORMAL, SIGNS_ONLY, MODERATE, etc.  He doesn't see some fk and  
need to jump to another table to figure out what that fk happens  
to be.  It sounds like you're arguing against enumeration entities  
now (^_^)


But said DBA will then commence whining about non-normalized data.






At least that's what I hear in my head whenever I think about it.

cue: Chuck.

Dave




On Apr 8, 2010, at 4:52 AM, Mark Wardle wrote:

Hi all, please forgive a very simple question but I'd like to  
create a
lightweight (non-EO) to-one relationship from an EO. I make  
heavy use

of D2W so I want to fulfil the WO/EOF rules and use to-one
relationship components

I usually create a new entity and have a genuine heavyweight EOF
relationship but I have several properties for which this seems
excessive.

I have an entity (FormEdssFull) which can have a visual field  
score

for both right and left eye.

Can I do this with a java enum?

public enum VisualAcuity {
NORMAL(0, Normal),
SIGNS_ONLY(1, Signs only:),
MODERATE(2, Moderate),
MARKED(3, Marked);

/* insert enum constructor etc... */
}

and then create the appropriate accessor and mutator in the  
entity?


What do other people do in these situations?

Many thanks,

Mark

--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects- 
d...@lists.apple.com)

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com

This email sent to webobje...@avendasora.com




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com

This email sent to rgur...@mac.com






___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:

Re: Basic question - lightweight to-one relationship from entity to POJO/enum

2010-04-15 Thread Sacha Michel Mallais
There are a few reasons I can think of to put lookup tables in the database:
1) Can edit the user-viewable text without recompiling (if you design your 
lookup tables correctly)
2) Localization

but most importantly:
3) Sorting happens at the database


sacha


On Apr 15, 2010, at 2:00 PM, Mike Schrag wrote:

 i'm an enum fan ... lookup tables are dead to me, because, as someone already 
 pointed out, you almost always want them synced between code and the 
 database, which invariably creates a mismatch at some point. the only reason 
 i use lookup tables at this point is if the enumerated values are 
 runtime-mutable. technically putting the enum name in a field isn't 
 unnormalized, either, since that IS the primary key for the enum. just 
 because it happens to be a string isn't a problem.
 
 ms
 
 On Apr 15, 2010, at 4:52 PM, Mark Wardle wrote:
 
 I've found this interesting.
 
 My problem is I already have 80 entities.  For instance, I have an entity 
 representing structured medical data: as such it has about fifty pick lists 
 - representing these as separate entities will be a nightmare! Using enums 
 seems to work well and keeps these items in a private namespace.
 
 I also find it very convenient to create a NSDictionary with keys and 
 default values that can be used in awakeFromInsertion - Ive found it a bit 
 clumsy to start doing fetches to set default values in awakeFromInsertion.
 
 Unless there's a WO-way of doing that.
 
 The other issue is when calculating things.
 
 Using an enum, I can do:
 
 If (reflexPlantarRight == ReflexPlantar.EXTENSOR) { 
 
 I've always found checking EO identity a bit clumsy!
 
 Mark
 
 -- 
 Dr. Mark Wardle
 Specialist registrar, Neurology
 (Sent from my mobile)
 
 
 On 15 Apr 2010, at 18:53, Chuck Hill ch...@global-village.net wrote:
 
 
 On Apr 15, 2010, at 5:53 AM, Ramsey Lee Gurley wrote:
 
 
 On Apr 15, 2010, at 8:07 AM, David Avendasora wrote:
 
 
 On Apr 14, 2010, at 9:49 PM, Ramsey Lee Gurley wrote:
 
 
 Well, there's only going to be one of each enum in memory.  So, that's a 
 bonus.
 
 Memory is cheap. :-)
 
 They are fast to access... I don't block a thread waiting on a fault.  
 That's good too. On that same line of thought, there's no need to 
 prefetch them.
 
 Well, reading in 5 key-value rows from a table can't take all that long, 
 even if you don't prefetch them. Obviously if they are used thousands of 
 times in a transaction, then you'll need to speed it up, but I'd optimize 
 it only if it's actually slowing things down.
 
 Does any of that make a big difference? I don't know.  Can't hurt though 
 (^_^)
 
 Depends on your definition of pain., I guess. :-)
 
 I've always looked at it as a case of if the value is defined only in 
 code, how do people who are reading the data directly out of the DB know 
 what the value in the DB means? How do you make everything consistent 
 between your app and a reporting system reading data out of it?
 
 DBA: Oh hey, this transaction has a status of 1. What does 1 mean? Is it 
 Active? Is it Closed? What? Now I've got to track down that bleeping 
 developer and ask him to interpret this data. Would it have been so hard 
 for him to just include all the context of his application in the DB 
 where anyone can get at it? It's not like a few 5-row key-value tables 
 are going to bring the DB to it's knees...
 
 
 Wait, what is the DBA doing with some dumb DB tools when he has D2JC? (^_~)
 
 I believe the enum prototype in wonder stores them as a string.  So, 
 continuing with Mark's example, your DBA would just see NORMAL, 
 SIGNS_ONLY, MODERATE, etc.  He doesn't see some fk and need to jump to 
 another table to figure out what that fk happens to be.  It sounds like 
 you're arguing against enumeration entities now (^_^)
 
 But said DBA will then commence whining about non-normalized data.
 
 
 
 
 At least that's what I hear in my head whenever I think about it.
 
 cue: Chuck.
 
 Dave
 
 
 
 On Apr 8, 2010, at 4:52 AM, Mark Wardle wrote:
 
 Hi all, please forgive a very simple question but I'd like to create a
 lightweight (non-EO) to-one relationship from an EO. I make heavy use
 of D2W so I want to fulfil the WO/EOF rules and use to-one
 relationship components
 
 I usually create a new entity and have a genuine heavyweight EOF
 relationship but I have several properties for which this seems
 excessive.
 
 I have an entity (FormEdssFull) which can have a visual field score
 for both right and left eye.
 
 Can I do this with a java enum?
 
 public enum VisualAcuity {
 NORMAL(0, Normal),
 SIGNS_ONLY(1, Signs only:),
 MODERATE(2, Moderate),
 MARKED(3, Marked);
 
 /* insert enum constructor etc... */
 }
 
 and then create the appropriate accessor and mutator in the entity?
 
 What do other people do in these situations?
 
 Many thanks,
 
 Mark
 
 -- 
 Dr. Mark Wardle
 Specialist registrar, Neurology
 Cardiff, UK
 ___
 Do not post admin requests to the 

Re: Basic question - lightweight to-one relationship from entity to POJO/enum

2010-04-15 Thread Kieran Kelleher
Just to add another one to the mix, I use CSV text files in Resources for 
static lookups. two columns, first is key, second is value.

They are lazy-initialized into a immutable dictionary and used in Popup menus, 
etc.

A few static utility methods and you are done. Usually values are either 
strings or Integers. So two different utility methods handle the appropriate 
type. The advantage is that this business logic stuff is kept with the app, and 
is easy to maintain and edit in development. I am not religious about this. I 
just use it when it suits me. Other times I use db tables, other times, enums.

YMMV.

Kieran


On Apr 15, 2010, at 5:08 PM, Chuck Hill wrote:

 
 On Apr 15, 2010, at 1:52 PM, Mark Wardle wrote:
 
 I've found this interesting.
 
 My problem is I already have 80 entities.  For instance, I have an entity 
 representing structured medical data: as such it has about fifty pick lists 
 - representing these as separate entities will be a nightmare! Using enums 
 seems to work well and keeps these items in a private namespace.
 
 I'd not be keen on 80 lookup tables either.
 
 
 
 I also find it very convenient to create a NSDictionary with keys and 
 default values that can be used in awakeFromInsertion - Ive found it a bit 
 clumsy to start doing fetches to set default values in awakeFromInsertion.
 
 Unless there's a WO-way of doing that.
 
 The other issue is when calculating things.
 
 Using an enum, I can do:
 
 If (reflexPlantarRight == ReflexPlantar.EXTENSOR) { 
 
 I've always found checking EO identity a bit clumsy!
 
 Mark
 
 -- 
 Dr. Mark Wardle
 Specialist registrar, Neurology
 (Sent from my mobile)
 
 
 On 15 Apr 2010, at 18:53, Chuck Hill ch...@global-village.net wrote:
 
 
 On Apr 15, 2010, at 5:53 AM, Ramsey Lee Gurley wrote:
 
 
 On Apr 15, 2010, at 8:07 AM, David Avendasora wrote:
 
 
 On Apr 14, 2010, at 9:49 PM, Ramsey Lee Gurley wrote:
 
 
 Well, there's only going to be one of each enum in memory.  So, that's a 
 bonus.
 
 Memory is cheap. :-)
 
 They are fast to access... I don't block a thread waiting on a fault.  
 That's good too. On that same line of thought, there's no need to 
 prefetch them.
 
 Well, reading in 5 key-value rows from a table can't take all that long, 
 even if you don't prefetch them. Obviously if they are used thousands of 
 times in a transaction, then you'll need to speed it up, but I'd optimize 
 it only if it's actually slowing things down.
 
 Does any of that make a big difference? I don't know.  Can't hurt though 
 (^_^)
 
 Depends on your definition of pain., I guess. :-)
 
 I've always looked at it as a case of if the value is defined only in 
 code, how do people who are reading the data directly out of the DB know 
 what the value in the DB means? How do you make everything consistent 
 between your app and a reporting system reading data out of it?
 
 DBA: Oh hey, this transaction has a status of 1. What does 1 mean? Is it 
 Active? Is it Closed? What? Now I've got to track down that bleeping 
 developer and ask him to interpret this data. Would it have been so hard 
 for him to just include all the context of his application in the DB 
 where anyone can get at it? It's not like a few 5-row key-value tables 
 are going to bring the DB to it's knees...
 
 
 Wait, what is the DBA doing with some dumb DB tools when he has D2JC? (^_~)
 
 I believe the enum prototype in wonder stores them as a string.  So, 
 continuing with Mark's example, your DBA would just see NORMAL, 
 SIGNS_ONLY, MODERATE, etc.  He doesn't see some fk and need to jump to 
 another table to figure out what that fk happens to be.  It sounds like 
 you're arguing against enumeration entities now (^_^)
 
 But said DBA will then commence whining about non-normalized data.
 
 
 
 
 At least that's what I hear in my head whenever I think about it.
 
 cue: Chuck.
 
 Dave
 
 
 
 On Apr 8, 2010, at 4:52 AM, Mark Wardle wrote:
 
 Hi all, please forgive a very simple question but I'd like to create a
 lightweight (non-EO) to-one relationship from an EO. I make heavy use
 of D2W so I want to fulfil the WO/EOF rules and use to-one
 relationship components
 
 I usually create a new entity and have a genuine heavyweight EOF
 relationship but I have several properties for which this seems
 excessive.
 
 I have an entity (FormEdssFull) which can have a visual field score
 for both right and left eye.
 
 Can I do this with a java enum?
 
 public enum VisualAcuity {
 NORMAL(0, Normal),
 SIGNS_ONLY(1, Signs only:),
 MODERATE(2, Moderate),
 MARKED(3, Marked);
 
 /* insert enum constructor etc... */
 }
 
 and then create the appropriate accessor and mutator in the entity?
 
 What do other people do in these situations?
 
 Many thanks,
 
 Mark
 
 -- 
 Dr. Mark Wardle
 Specialist registrar, Neurology
 Cardiff, UK
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  

Re: Basic question - lightweight to-one relationship from entity to POJO/enum

2010-04-15 Thread André Mitra
You may want to check out the WireHose Framework, in general, and 
com.wirehose.base.WHEOCache, in particular... Regards, André

On 2010-04-15, at 4:52 PM, Mark Wardle wrote:

 I've found this interesting.
 
 My problem is I already have 80 entities.  For instance, I have an entity 
 representing structured medical data: as such it has about fifty pick lists - 
 representing these as separate entities will be a nightmare! Using enums 
 seems to work well and keeps these items in a private namespace.
 
 I also find it very convenient to create a NSDictionary with keys and default 
 values that can be used in awakeFromInsertion - Ive found it a bit clumsy to 
 start doing fetches to set default values in awakeFromInsertion.
 
 Unless there's a WO-way of doing that.
 
 The other issue is when calculating things.
 
 Using an enum, I can do:
 
 If (reflexPlantarRight == ReflexPlantar.EXTENSOR) { 
 
 I've always found checking EO identity a bit clumsy!
 
 Mark
 
 -- 
 Dr. Mark Wardle
 Specialist registrar, Neurology
 (Sent from my mobile)
 
 
 On 15 Apr 2010, at 18:53, Chuck Hill ch...@global-village.net wrote:
 
 
 On Apr 15, 2010, at 5:53 AM, Ramsey Lee Gurley wrote:
 
 
 On Apr 15, 2010, at 8:07 AM, David Avendasora wrote:
 
 
 On Apr 14, 2010, at 9:49 PM, Ramsey Lee Gurley wrote:
 
 
 Well, there's only going to be one of each enum in memory.  So, that's a 
 bonus.
 
 Memory is cheap. :-)
 
 They are fast to access... I don't block a thread waiting on a fault.  
 That's good too. On that same line of thought, there's no need to 
 prefetch them.
 
 Well, reading in 5 key-value rows from a table can't take all that long, 
 even if you don't prefetch them. Obviously if they are used thousands of 
 times in a transaction, then you'll need to speed it up, but I'd optimize 
 it only if it's actually slowing things down.
 
 Does any of that make a big difference? I don't know.  Can't hurt though 
 (^_^)
 
 Depends on your definition of pain., I guess. :-)
 
 I've always looked at it as a case of if the value is defined only in 
 code, how do people who are reading the data directly out of the DB know 
 what the value in the DB means? How do you make everything consistent 
 between your app and a reporting system reading data out of it?
 
 DBA: Oh hey, this transaction has a status of 1. What does 1 mean? Is it 
 Active? Is it Closed? What? Now I've got to track down that bleeping 
 developer and ask him to interpret this data. Would it have been so hard 
 for him to just include all the context of his application in the DB where 
 anyone can get at it? It's not like a few 5-row key-value tables are going 
 to bring the DB to it's knees...
 
 
 Wait, what is the DBA doing with some dumb DB tools when he has D2JC? (^_~)
 
 I believe the enum prototype in wonder stores them as a string.  So, 
 continuing with Mark's example, your DBA would just see NORMAL, SIGNS_ONLY, 
 MODERATE, etc.  He doesn't see some fk and need to jump to another table to 
 figure out what that fk happens to be.  It sounds like you're arguing 
 against enumeration entities now (^_^)
 
 But said DBA will then commence whining about non-normalized data.
 
 
 
 
 At least that's what I hear in my head whenever I think about it.
 
 cue: Chuck.
 
 Dave
 
 
 
 On Apr 8, 2010, at 4:52 AM, Mark Wardle wrote:
 
 Hi all, please forgive a very simple question but I'd like to create a
 lightweight (non-EO) to-one relationship from an EO. I make heavy use
 of D2W so I want to fulfil the WO/EOF rules and use to-one
 relationship components
 
 I usually create a new entity and have a genuine heavyweight EOF
 relationship but I have several properties for which this seems
 excessive.
 
 I have an entity (FormEdssFull) which can have a visual field score
 for both right and left eye.
 
 Can I do this with a java enum?
 
 public enum VisualAcuity {
 NORMAL(0, Normal),
 SIGNS_ONLY(1, Signs only:),
 MODERATE(2, Moderate),
 MARKED(3, Marked);
 
 /* insert enum constructor etc... */
 }
 
 and then create the appropriate accessor and mutator in the entity?
 
 What do other people do in these situations?
 
 Many thanks,
 
 Mark
 
 -- 
 Dr. Mark Wardle
 Specialist registrar, Neurology
 Cardiff, UK
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
 
 This email sent to webobje...@avendasora.com
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com
 
 This email sent to rgur...@mac.com
 
 
 
 ___
 Do not post admin 

WOD to Inline

2010-04-15 Thread Kieran Kelleher
Fellow WO'ers,

The inline syntax really makes it easy to refactor existing WOComponents. 
WOLips has a great inline to wod refactoring feature, but the reverse would be 
awesome to allow you to take an old clunky WOComponent and make it all inline.

There is a jira out there for this feature request, but it only has two votes. 
If you would like this feature, please click on the vote link. If it gets a lot 
of votes, the MaSter will know it is worthwhile, if not, it can be cast off 
into neverland.

http://issues.objectstyle.org/jira/browse/WOL-476

Thanks. Kieran ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: no CGI-Executables/WebObjects installed

2010-04-15 Thread Jeff Schmitz
Went over all the apache config stuff on the wiki, and I think the problem was 
this directive:

   Tell wotaskd to Use Localhost Too
   Edit 
/System/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/Resources/Properties

   Add this line after the WOPort=1085 one:

   WOHost=localhost

When I looked at my Properties file, it had a similar line, but it said:

WOPort=localhost

What's weird is all this worked until my upgrade to Snow Leopard.  Could 
upgrading have caused that line to get changed?

Anyway, I changed it to WOHost, and now my app comes up.

Now on to the next problem.   The app can't find my css file that I keep under 
/Library/Webserver/Documents.  Haven't really debugged this part yet, but 
wanted to post what I found so far for the previous problem.

Jeff



On Dec 30, 2009, at 10:42 PM, Chuck Hill wrote:

 
 On Dec 30, 2009, at 8:20 PM, Jeff Schmitz wrote:
 
 I'm not configuring virtual hosts (that I know of anyway).
 
 http://wiki.objectstyle.org/confluence/display/WO/Running+Through+Apache+-+Leopard+Client+10.5.5+-+Summary
 
 I'm trying to set up a Snow Leopard Server deployment machine.  Will all 
 this apply?
 
 I don't know about all but the directory stuff will.
 
 
 Chuck
 
 
 On Dec 30, 2009, at 9:31 PM, Chuck Hill wrote:
 
 I think that your Apache config is messed up.  Are you configuring virtual 
 hosts?
 
 Check the Directory config here:
 http://wiki.objectstyle.org/confluence/display/WO/Web+Applications-Deployment-Apache
 http://wiki.objectstyle.org/confluence/display/WO/Running+Through+Apache+-+Leopard+Client+10.5.5+-+Summary
 
 Also:
 http://wiki.objectstyle.org/confluence/dosearchsite.action?searchQuery.queryString=%2Bdirectory+%2BapachesearchQuery.spaceKey=conf_global
 
 Chuck
 
 On Dec 30, 2009, at 7:08 PM, Jeff Schmitz wrote:
 
 
 Does apache.conf is included in httpd.conf? In /etc/apache2/httpd.conf, 
 you should have this :
 
   Include /System/Library/WebObjects/Adaptors/Apache2.2/apache.conf
 
 Yes, this has been there all along.  and the apache.conf file does exist.
 
 Jeff
 
 
 On Dec 30, 2009, at 8:00 PM, Pascal Robert wrote:
 
 
 Le 09-12-30 à 18:51, Jeff Schmitz a écrit :
 
 Hello,
 I used migration to migrate my data from a Leopard server to a snow 
 leopard server.  I then installed my webobjects app and started it with 
 Monitor for WebObjects.  That all seemed to work without problem.  
 However, when I try to navigate to the app with:
 
 http://localhost/cgi-bin/WebObjects/netBrackets
 
 I get a 404 error.  Looking at the httpd error logs I see:
 
 script not found or unable to stat: 
 /Library/WebServer/CGI-Executables/WebObjects
 
 I then tried to install WO using the installer here:
 
 http://support.apple.com/kb/DL688
 
 I restarted apache and am still getting the error.  I have verified that 
 the .../CGI-Executables/WebObjects script still does NOT exist.
 
 And it shouldn't exist, it should run as a Apache module.
 
 Shouldn't this have been installed by the installer?  I guess I could 
 copy the one over from my Leopard Server, but I'm afraid perhaps 
 something else didn't get installed correctly.  Any suggestions on how 
 to proceed?
 
 
 As a note, I have done the things outlined below:
 
 - Download  install WO 5.4.3 for 10.5 from ADC
 - cd /Developer/Examples/JavaWebObjects/Deployment/
 - sudo sh configure.sh
 - Test: http://127.0.0.1:1085  - wotaskd works
 - Test: http://127.0.0.1:56789 - WOMonitor works
 
 - edit /System/Library/WebObjects/Adaptors/Apache2.2/apache.conf :
 Uncomment Line WebObjectsAdminUsername public
 
 Does apache.conf is included in httpd.conf? In /etc/apache2/httpd.conf, 
 you should have this :
 
   Include /System/Library/WebObjects/Adaptors/Apache2.2/apache.conf
 
 If not, add it and restart Apache.
 
 - Restart apache: sudo apachectl restart
 
 
 
 Thanks,
 Jeff
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
 
 This email sent to prob...@macti.ca
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/products/practical_webobjects
 
 
 
 
 
 
 
 
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are 

Re: no CGI-Executables/WebObjects installed

2010-04-15 Thread Chuck Hill


On Apr 15, 2010, at 9:10 PM, Jeff Schmitz wrote:

Went over all the apache config stuff on the wiki, and I think the  
problem was this directive:


  Tell wotaskd to Use Localhost Too
  Edit /System/Library/WebObjects/JavaApplications/wotaskd.woa/ 
Contents/Resources/Properties


  Add this line after the WOPort=1085 one:

  WOHost=localhost

When I looked at my Properties file, it had a similar line, but it  
said:


WOPort=localhost

What's weird is all this worked until my upgrade to Snow Leopard.   
Could upgrading have caused that line to get changed?


No, but that line could certainly cause problems!  :-)  You were just  
lucky before.





Anyway, I changed it to WOHost, and now my app comes up.

Now on to the next problem.   The app can't find my css file that I  
keep under /Library/Webserver/Documents.  Haven't really debugged  
this part yet, but wanted to post what I found so far for the  
previous problem.


Jeff



On Dec 30, 2009, at 10:42 PM, Chuck Hill wrote:



On Dec 30, 2009, at 8:20 PM, Jeff Schmitz wrote:


I'm not configuring virtual hosts (that I know of anyway).


http://wiki.objectstyle.org/confluence/display/WO/Running+Through+Apache+-+Leopard+Client+10.5.5+-+Summary


I'm trying to set up a Snow Leopard Server deployment machine.   
Will all this apply?


I don't know about all but the directory stuff will.


Chuck



On Dec 30, 2009, at 9:31 PM, Chuck Hill wrote:

I think that your Apache config is messed up.  Are you  
configuring virtual hosts?


Check the Directory config here:
http://wiki.objectstyle.org/confluence/display/WO/Web+Applications-Deployment-Apache
http://wiki.objectstyle.org/confluence/display/WO/Running+Through+Apache+-+Leopard+Client+10.5.5+-+Summary

Also:
http://wiki.objectstyle.org/confluence/dosearchsite.action?searchQuery.queryString=%2Bdirectory+%2BapachesearchQuery.spaceKey=conf_global

Chuck

On Dec 30, 2009, at 7:08 PM, Jeff Schmitz wrote:



Does apache.conf is included in httpd.conf? In /etc/apache2/ 
httpd.conf, you should have this :


	Include /System/Library/WebObjects/Adaptors/Apache2.2/ 
apache.conf


Yes, this has been there all along.  and the apache.conf file  
does exist.


Jeff


On Dec 30, 2009, at 8:00 PM, Pascal Robert wrote:



Le 09-12-30 à 18:51, Jeff Schmitz a écrit :


Hello,
I used migration to migrate my data from a Leopard server to a  
snow leopard server.  I then installed my webobjects app and  
started it with Monitor for WebObjects.  That all seemed to  
work without problem.  However, when I try to navigate to the  
app with:


http://localhost/cgi-bin/WebObjects/netBrackets

I get a 404 error.  Looking at the httpd error logs I see:

script not found or unable to stat: /Library/WebServer/CGI- 
Executables/WebObjects


I then tried to install WO using the installer here:

http://support.apple.com/kb/DL688

I restarted apache and am still getting the error.  I have  
verified that the .../CGI-Executables/WebObjects script still  
does NOT exist.


And it shouldn't exist, it should run as a Apache module.

Shouldn't this have been installed by the installer?  I guess  
I could copy the one over from my Leopard Server, but I'm  
afraid perhaps something else didn't get installed correctly.   
Any suggestions on how to proceed?



As a note, I have done the things outlined below:

- Download  install WO 5.4.3 for 10.5 from ADC
- cd /Developer/Examples/JavaWebObjects/Deployment/
- sudo sh configure.sh
- Test: http://127.0.0.1:1085  - wotaskd works
- Test: http://127.0.0.1:56789 - WOMonitor works

- edit /System/Library/WebObjects/Adaptors/Apache2.2/ 
apache.conf :

Uncomment Line WebObjectsAdminUsername public


Does apache.conf is included in httpd.conf? In /etc/apache2/ 
httpd.conf, you should have this :


	Include /System/Library/WebObjects/Adaptors/Apache2.2/ 
apache.conf


If not, add it and restart Apache.


- Restart apache: sudo apachectl restart



Thanks,
Jeff

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects- 
d...@lists.apple.com)

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca

This email sent to prob...@macti.ca




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net


--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve  
specific problems.

http://www.global-village.net/products/practical_webobjects











--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who