Hi,

Unless a strong case could be made against it, I am planning on multi- 
page display,
however I do think we should analyze the situation a bit more before  
deciding on
which approach to take.

The purpose of the main page is to display the monthly tournament on
top and the daily tourneys below it - next 3 tourneys (including the  
one currently in
progress). It also displays user's registration status and allows user  
to register for
the tourneys he is eligible for. So there is both read and write  
operations involved here.

There are 3 approaches we can use to achieve this:
1. PHP code directly accessing the database.

2. PHP code making REST calls.

3. Javascript code making REST calls with a new widget.


The advantage of approach 1 is the simplicity. I already have the code  
to interface PHP
with the database and the code to display monthly/daily tourney is  
quite simple.
HOWEVER the biggest disadvantage is that we cannot alter the database  
directly to register the
user - the server will not know about this. Hence I am not keen on  
this approach. I would
rather use the same approach for both read and write operations and  
clearly PHP cannot be
used for the write operations.

I would strike off the approach 2 right away since it would involve  
duplicating a lot of code which
already exists in javascript and is a waste of effort.

That leaves us with option 3, which I think we should use for both the  
tourney list display and the registration
of the user from this page.

In addition to the prize and sponsors I will also need a field that  
indicates whether the tourney is monthly
or daily, and I would need the results to be sorted according to start  
time as it is more efficient to do this
on the server-side rather than the client side. With this requirement  
in mind, I will leave it up to you
whether you want to hijack an existing API or create a new API.

As for registering for tourney start events, I am still planning on  
doing it (even with a multi page display).
When a tourney to which the user is registered starts, I am simply  
going to redirect the page to the
relevant game table page.

Loic, I am assuming you reviewed my code for templateTourneyDetails.  
Do you have any comments/suggestions regarding this code ?

Thanks,
/Chandan


On 21/09/2008, at 1:28 AM, Loic Dachary wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I spent some time today thinking about the best way to add attributes
> to the tourneys. The attributes you're interested in are prize and
> sponsors, but the problem is more general. During the discussion we
> had a few days ago, we concluded that transparently adding fields to
> the packets returned by TourneyList was the best option.
>
> The rationale was that jpoker already provides a communication
> framework that you don't want to replicate (refreshing the list every
> N seconds). This framework is going to be used in the page listing the
> tournaments, not only to get the list of active tournaments, but also
> to get the server notification when a tournament begins.
>
> However, I realized we did not address the issue of using permalinks
> to navigate the web site or not. This design choice has an impact and
> I would like to know what your plans are. In a nutshell, will the room
> be a single page web application or will it be a multipage web
> application ? When a user is invited to join a tournament, does it
> hide the current display in favor of a table display ? Or does it
> redirect to a page that displays the table ?
>
> If you favor a multipage display, it may be more sensible to do the
> work of enriching the tourneys in the PHP page you query to display
> the list of tables. Otherwise it makes more sense to create a server
> side proxy that does it by hijacking the Ajax request.
>
> I've prepared the code for the server side proxy but I will wait for
> your input before completing it.
>
> Cheers
>
> P.S. I've cc'ed the pokersource public mailing list as some people may
> have an opinion on this problem.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkjVFoAACgkQ8dLMyEl6F21VAACgsfR135e614hvQY02VRUCugFp
> iFgAnR471tduKMIorAO8um52Ay8Niyrq
> =miYY
> -----END PGP SIGNATURE-----
>
> <loic.vcf>


_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users

Reply via email to