Best of Both Worlds #

Nothing that special to say, except that I've started on the hybrid JavaScript/Perl solution. For example, I've added Next and Previous buttons. Since I use frames, I need a way for the buttons frame to determine which message the message view frame is showing and then move on the next one while also marking it as read in the message list. JavaScript makes this a lot easier, since a frame can access another frame's variables (since in this case they're siblings). So I simply store the ID of the current message as a variable in the message frame, and then get it in the buttons frame, increment/decrement it, and then call the Read function of the list frame with the new ID. This function (which is also used when clicking on a message in the list) sets the contents of the message view frame as appropriate and changes the image next to the message subject to reflect that it's read. I'm planning to implement a delete button in a similar way (except that the list will have to be completely reloaded for now, since I don't generate it from within JavaScript yet).

After the delete button is in, I want to add a new way to login and cookies. Although the current user info only allows me in (the user data isn't hard-coded, it's loaded from a file, but there's no way to edit it), ideally I wish for people to be able to set up an account, where they specify their email address, pop server, user name and password, and then they can log in with the email address (not the username, since it's not unique, e.g. 'mihai' at the pop3 server 'mail71.pair.com' is different from 'mihai' at the server 'mail.att.ne.jp') and password and have access to their email. Also on the same topic, I want the option of cookies to that people don't have to type in the email address/password all the time. This might not make sense when grendel is supposed to be an 'email-anywhere' web-application, but it's useful for those like me who also want to access their mail from behind a proxy and thus use their own computer (saving the username/password on a public computer isn't too good security-wise) but still need to use Grendel.

The full JavaScript-based threaded/sorted view of the message list will come later, since that's not a big a requirement as this (at least from my point of view, I'm getting tired of having to type in my name and password when checking my mail). Plus the new system will allow others to see on their what I'm up to (there ought to be no security worries, I store the password on the server in an encrypted form, and all I do when the user enters his password is compare the encrypted version of his with the encrypted version on the server, and if they're the same I allow the user in, this is the same system used by UNIX, and it makes sense because the administrator (or anyone else who has access to the password file) can't get all the password used in a system by simply looking at the password file).

Post a Comment