Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Catalyst : Observations After Week 1

by water (Chaplain)
on Nov 13, 2005 at 14:42 UTC ( #508104=note: print w/ replies, xml ) Need Help??


in reply to Re: Catalyst : Observations After Week 1
in thread Catalyst : Observations After Week 1

I don't really consider that MVC. (It's just a pattern, so if that works for you, great! However, in my experience it's not the right approach.)

Say more, please!

Would you suggest this should live in the model, so other non-web-apps can call $obj->give_raise(or whatever) and for free get the logic ("no raises to fired emps", for example)?

Suggestions?

water


Comment on Re^2: Catalyst : Observations After Week 1
Download Code
Re^3: Catalyst : Observations After Week 1
by chromatic (Archbishop) on Nov 13, 2005 at 17:43 UTC

    Yes, exactly that.

    I once maintained a reporting application that pulled data from a multi-application database. There were no constraints or integrity checks in the database or the applications people used to enter or edit data.

    One day in 2003, my contact at the customer called me to yell that the report listed records from 2005! I told her that the reporting program had no hard-coded dates in it and that the errors came from her database. I also gave her a single SQL query to run to prove it. I'd previously given her another small application to find and correct as many data errors as safely possible -- and there were plenty.

    Granted, calling any of the applications MVC is a real stretch. Still it is painfully obvious that putting business logic (you can't add a record with a date in the future) where other applications can't reuse it can cause plenty of trouble.

    Of course, if you know that you'll never ever access your data with any other application ever, go ahead.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2014-07-31 02:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls