Sunday, October 13, 2013

Where to place this logic?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello everybody,

I have a slightly advanced question.
I just build an app which at some point goes through a lot of evaluation
methods to find a certain value in a heap of values.

I want to follow the fat model theory also because it makes methods
easier for unit tests.

Now my model shows a tendency to not only become fat, but obese and I
consider putting the advanced logic in another place. The question is:
What could that be?

Normally I would create models which would extend my obese model and
place the methods there so they are out of the way. But most of these
methods don't need direct dealing with the database so I could just put
them elsewhere shuffle data in and get the output out after they went
though this "black evaluation box".

Would a component be this place? Or a model without db table?
What would be the professional CakePHP way of doing this?

Thanky for any hints in advance as always!


Anja
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlJapNoACgkQbOdiIJzHNKFhRQCfUvyum1yGptJwp8gmVMSM/p/5
GCEAoIVWHP4q2aZhsZGLXbsGVucJ+1DW
=OcX6
-----END PGP SIGNATURE-----

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: