Viljo Marrandi <[EMAIL PROTECTED]> writes:
I'm answering what I can... :-) > 3. Authorization. Is cookie based auth most reasonable or are there some > other ways too? .htaccess will not do, I think, because all data is in > the same directory and authorized access/login is needed only on some > parts of site. Which data should I send with cookie? Only some random > key which is also stored in dbase and this key is used to find real data > from dbase? (I guess I must read again this thread about cookies). First of all, why putting everything at the same place? It would be easier to maintain things if only the generic things are at the same place and specific things are in their own directories. Depending on how much data you're going to store, I'd use a cookie that is a hash (e.g. MD5) to some index at the database. Don't send confidential information on them (people might use some public internet to view their information) and try not sending plain text (people might be tempted to change values). > 4. How is most reasonable to store(and use too) complex formulas and > coefficients? Problem is that there are 4 companies and each of them has > different way to calculate same thing eg. insurance for travelling, car > insurance etc. Unfortunately they are all quite different, because every > company uses even different things to calculate final result. So if we > use different formula for every company and insurance type we end up > with ~50 formulas and none understands afterwards which is which. Are > there any guidelines to generalize formulas? Ok, let's say we even > somehow make these formulas general enough to use, but where shall the > calculation take place? Postgres stored procs or in perl code/module (i > think this) or even in TT? Constans will be in db. Create modules for each company. This way you'll have each company's functions on her own module. They will be differentiated by namespace. (And you can use references to select the appropriated module, the information on which company that client belongs to might be in a record at the database ;-)) By using references, your only thing to worry will be naming the same things with the same names. You should also pass values by reference. Using modules will also make it possible to change formulae without worring about which of them are common to other companies or which are not common. And, since you're already going to use OO Perl... ;-) > P.S. I hope that in about few months I can write about this project to > success stories ;-) Me too! :-) Be seeing you, -- Godoy. <[EMAIL PROTECTED]> Solutions Developer - Conectiva Inc. - http://en.conectiva.com Desenvolvedor de Soluções - Conectiva S.A. - http://www.conectiva.com.br
msg23683/pgp00000.pgp
Description: PGP signature