Re: New to PHP, need pointers to best practices for the design of an atypical web app

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks. I have a Perl simulation of the CAT working (which has all the technical algorithms). What I need to do is build the user interface and I/O (and translate the Perl algorithms to PHP) to allow real people to take a CAT online for a research project. I agree that nailing down the data structures, and understanding how a PHP app is constructed, have been the two main issues.

I'm working on a v1 that will store a hidden/cookie session ID that will be tied to a serialized object stored in a database to maintain state, possibly like this: https://www.w3schools.com/php/php_sessions.asp , although it's not immediately apparent how I extend this model to store sessions in a database.

If I use PHP sessions to maintain state in MySQL (as suggested on the w3schools page above) does PHP delete old state? That might be a good security measure and necessary for some applications, but (as you say) I'll have all the data I want in that structure.

-Alan


On 7/2/2019 6:18 AM, Stephen wrote:
I see storing data between page views as your big challenge. Maintaining a "state" for the user session.

I am guessing that you have many questions, and that means lots of data. Using a database makes sense. PHP has fine interfaces to databases.

And since the application will be used by others, they need a place to install their questions.

If I was tasked with this project, I would start by documenting data structures and the algorithms. (Nicholas Worth)

If I understand correctly, the user navigation through the test is the tricky part.

Only when this is done, would I consider the PHP programming.


-- 

Alan D. Mead, Ph.D.
President, Talent Algorithms Inc.

science + technology = better workers

http://www.alanmead.org

"You're an interesting species. An interesting mix. 
You're capable of such beautiful dreams, and such 
horrible nightmares. You feel so lost, so cut off, 
so alone, only you're not. See, in all our 
searching, the only thing we've found that makes 
the emptiness bearable, is each other."

-- Carl Sagan, Contact

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux