Hi,

I've a problem..

In my aplication I want to track users who visit user-profiles of other
users.

Actually everythings working fine, I've a user user-object (with
getters/setters& a validate-function), a user-dao, a user-gateway and a
userTO. (and a user-listener to get access from the machII-framework)

Now, eg when a user looks at a profile of another user, I wanna perform
some sql-actions.
But the problem is, I don't know where to put that actions.

I think I don't need another object like 'profilecalls', because.. let
me explain:
The pagecalls are stored in a single table in the db
(fld_useridowner,fld_useridcaller,fld_datetime)
And I want to store just about 100 calls for every user (owner).

So when a user calls another user-profile, I need to either) insert a
new record or) update the oldest record.
Earlier or later there will always(max) be 100 calls for each user.

Anyway, I thought of using the userGateway for this updates, but I'm not
sure. I read some threads on the cfcDev and the machII-mailnglist, there
I read about some kind of manger. (does anyone has more stuff to read
about manger-objs?)
Hmm, I think about simply creating a 'profileCallGateway' and a
'profileCallDAO'.

In the profileCallDAO I could do the inserts and updates (in what way
ever) and the delete-operation (if a user gets deleted). I think I won't
need the read-method, there I'll use the gateway to receive the calls
other users made.
Well, eg if I want to receive a users pageCalls, I call a method from
the gateway like getUsersPCalls(userid).
This will eg return an array of userid(caller)+date. (or a query)
On a page where the user can view his pageCalls I'd populate an array of
userObjects by the array returned from the pageCallsGateway.
So I'll notify my pageCall-Listener, retrieve the array in request-scope,
put it in event-args, then call my user-listener, it (or he) reads the
array from the event-args and populates an array of user-objects

But,.. the one information, the date the user called my page isn't in
the userObject. So I could read it from the original array the gateway
gave me (whatever, didn't think about this in detail)

My main question is, where to put the updates of the pagecalls, what
would you think? some kind of manager (more stuff to read?:)
or create a pageCallDAO+gateway without having a PageCall-object, this
isn't usual I think.. but it's just one information, the visit date, I'd
then create an object for. hmm

This thread on the cfcDev-list was  interesting->Bean, DAO, Gateways:
Where to put logic?
Got the Idea of the manager reading this thread, any more good
blogs/sources about this topic? (Already searched a lot in the lists and
read in Seans blog..)

thx a lot

sebastian
-- 
Sebastian Mork <[EMAIL PROTECTED]>


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]

Reply via email to