Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Building a hash of employees.

by tomhukins (Curate)
on Jul 02, 2003 at 22:02 UTC ( [id://270983]=note: print w/replies, xml ) Need Help??


in reply to Re: Building a hash of employees.
in thread Building a hash of employees.

I agree that some sort of serialisation would help, but not necessarily XML. Others have suggested DBM or SQL databases. Personally, I find Storable quick and easy for this type of thing. If you want to use SQL, you might want to consider SQLite which I've used recently for several lightweight database applications where I didn't want a fully featured relational database server.

I like XML and use it where appropriate, but sometimes developers seem to use XML because they think everyone else does it, or because it's fashionable at the moment. If it works for you as a serialisation method, fine, use it, but make sure you consider the alternatives.

I disagree with the idea that each person can maintain his/her own profile in XML, as I would want to enforce strong data validation. You can't write a DTD to check that someone enters their age as a number, or that you can't have a birthday on June 31st. To do this, you need to check imput data using something like Params::Validate, perhaps with Regexp::Common. If you go down the XML route for this, you have to use something complicated like XML Schema.

If you want to migrate your data to a different programming environment, you can easily convert your data to XML at that point using one of Perl's many XML modules such as XML::Simple.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://270983]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-24 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found