Hi there,
I need a little advice on how I should design a system.
The systems involves a user first logging in, then directed to a home page in which they're able to subscribe to certain jobs.
My question is regarding gathering the logged in users details, such as their name etc.
Is it better 'design-wise' to get these details once the user has logged in with use of a User class which connects to a database, and assign properties in the class to the user details respectively.
OR
Is it better to simply get any user information when there's a direct need for it, which means calling some static get method in the User class which connects to the database and get's that particular detail.
When I say 'better' I mean, which method is more efficient speed wise, and which is good general programming style.
Thanks in advance.