cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Re: dynamcically altering a global variable
Date Fri, 20 Aug 2004 14:29:30 GMT
use of flow does not pre-determine where and 
how the data we are talking about could/should
come from.  In fact, if your MVC design is correct
it *cannot* know - you could be using simple POJOs
or XSPs or any other mechanism to get/set data;
or start with XML and scale up to a database as
needed... 

I don't agree tho' that XML cannot be used for 
tracking and, please note the orginal email did not
refer to use of a database at all... ;-)

>>> bhaskar@cs.unm.edu 2004/08/20 03:30:25 PM >>>
but then you may miss out on tracking. And if you use database to store

it anyways, then u can use the db in the first place also :-)

Regards,
Bhaskar

Paul Joseph wrote:

>Yes, these are much better approaches expecially (imo)
>the xml approach as it has fewer "moving parts" - no
>quartz and also, it doesn't have the overhead of
>talking to a db.
>
>thx
>Paul
>--- Derek Hohls <DHohls@csir.co.za> wrote:
>
>  
>
>>Alternatively you could be using flow for this and
>>reading the variable from an xml file - along with 
>>any other useful info such as user name etc - and 
>>also checking the time using javascript in flow and 
>>testing if the last login was before/after midnight 
>>and then resetting as needed.
>>
>>AFAIK (and a little knowledge is a dangerous thing!)
>>the so-called "global variable" in the Cocoon
>>sitemap
>>is more like a "global constant"...  but I'd like to
>>hear
>>differently.
>>
>>[There was a previous thread on dynamically creating
>>subsitemaps... I thibnk one of the developers said
>>it 
>>could be done but was somewhat dubious about its
>>lack of merits and possible dangers... but, hey,
>>you're
>>a programmer and current "Master of the Universe"!!]
>>
>>    
>>
>>>>>jh@domek.be 2004/08/20 09:19:20 AM >>>
>>>>>          
>>>>>
>>Alternatively, you could log every logon to the
>>system with a database
>>
>>timestamp and do checking there.
>>
>>It's just a matter of what is more familiar to you,
>>there are various 
>>ways of achieving this.
>>
>>Paul Joseph wrote:
>>    
>>
>>>Hi,
>>>
>>>I am wondering how best to do this in Cocoon:
>>>
>>>When a user logs in, the user has to check if they
>>>      
>>>
>>are
>>    
>>
>>>the first person to login for the day and if so,
>>>      
>>>
>>do
>>    
>>
>>>some tasks.
>>>
>>>To do this, I though of setting a global variable
>>>      
>>>
>>say
>>    
>>
>>>FIRST_LOGIN=true at midnight every night - using
>>>      
>>>
>>the
>>    
>>
>>>Quartz scheduler.  
>>>
>>>Then when a user logged in, as part of the
>>>authentication logic, I would have them check this
>>>variable and do the action if it was true.  Of
>>>      
>>>
>>course,
>>    
>>
>>>after doing the action, they would set this
>>>      
>>>
>>variable
>>    
>>
>>>to false.
>>>
>>>Any pointers as to how this can best be done would
>>>      
>>>
>>be
>>    
>>
>>>appreciated.  I am unable to implement this
>>>      
>>>
>>approach
>>    
>>
>>>at present as I do not know how to set a global
>>>variable whose value can be altered dynamcially.
>>>
>>>thx
>>>Paul
>>>      
>>>
>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>To unsubscribe, e-mail:
>>users-unsubscribe@cocoon.apache.org 
>>For additional commands, e-mail:
>>users-help@cocoon.apache.org 
>>
>>
>>-- 
>>This message has been scanned for viruses and
>>dangerous content by MailScanner, and is
>>believed to be clean.
>>MailScanner thanks transtec Computers for their
>>support.
>>
>>
>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>To unsubscribe, e-mail:
>>users-unsubscribe@cocoon.apache.org 
>>For additional commands, e-mail:
>>users-help@cocoon.apache.org 
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>For additional commands, e-mail: users-help@cocoon.apache.org 
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message