[04:43:36 EDT(-0400)] * Tuomaz (n=fredrik@kaffe.umdc.umu.se) has joined ##uportal
[09:41:24 EDT(-0400)] * jayshao (n=jayshao@jshao.rutgers.edu) has joined ##uportal
[09:46:15 EDT(-0400)] * EricDalquist (n=dalquist@bohemia.doit.wisc.edu) has joined ##uportal
[10:21:29 EDT(-0400)] * EricDalquist (n=EricDalq@dyn-0-104.uwnet.wisc.edu) has joined ##uportal
[10:40:26 EDT(-0400)] * EricDalquist (n=EricDalq@dyn-0-104.uwnet.wisc.edu) has joined ##uportal
[15:10:51 EDT(-0400)] <EricDalquist> hrm
[15:11:27 EDT(-0400)] <EricDalquist> so ... class A is responsible for crud type methods dealing with interface I
[15:12:00 EDT(-0400)] <EricDalquist> is it OK for class A to assume the impl of interface I on methods that pass I in as an argument?
[16:00:13 EDT(-0400)] <apetro_andreasde> of course not
[16:00:39 EDT(-0400)] <apetro_andreasde> unless A is going to be expicitly coupled to the implementation rather than to the I
[16:01:00 EDT(-0400)] <apetro_andreasde> but then it should be taking Impl as arguments rather than I if at all possible
[16:01:14 EDT(-0400)] <apetro_andreasde> maybe it's gotta take I as arguments because it implements interface I'
[16:01:41 EDT(-0400)] * esm (n=esm@asdf.dkc.jhu.edu) has joined ##uportal
[16:01:47 EDT(-0400)] <apetro_andreasde> but if you cannot imagine I having any implementation other than the one that you're using so that the DAO can CRUD it
[16:01:54 EDT(-0400)] <apetro_andreasde> then maybe I doesn't need to exist and you can just have the impl
[16:02:10 EDT(-0400)] <EricDalquist> hrm
[16:02:20 EDT(-0400)] <EricDalquist> so the more concrete example is
[16:02:38 EDT(-0400)] <esm> there is the question of how many implementations one would have in this concrete example
[16:04:06 EDT(-0400)] <EricDalquist> IPortletDefinitionRegistry has methods 'IPortletDefiniton getPortletDefinition(long)' and 'void storePortletDefinition(IPortletDefinition)'
[16:05:17 EDT(-0400)] <EricDalquist> the returned IPortletDefinition wraps a IPortletDefinitionTransfer
[16:06:22 EDT(-0400)] <EricDalquist> when storePortletDefinition is called
[16:08:06 EDT(-0400)] <EricDalquist> the registry needs to be able to provide a transfer object back to the dao
[16:12:11 EDT(-0400)] <EricDalquist> grr
[16:12:38 EDT(-0400)] <EricDalquist> as interesting as the dao/transfer/registry/domain architecture sounds
[16:12:48 EDT(-0400)] <EricDalquist> getting a design that works well has been a problem
[16:12:54 EDT(-0400)] <EricDalquist> getting the read side of it is easy
[16:13:00 EDT(-0400)] <EricDalquist> but persisting changing isn't
[16:14:00 EDT(-0400)] <apetro_andreasde> sure
[16:14:18 EDT(-0400)] <apetro_andreasde> is a viable approach to build something that works, and refactor towards more ideal interface-happy architecture later?
[16:15:42 EDT(-0400)] <EricDalquist> yeah
[16:15:51 EDT(-0400)] <EricDalquist> I think that is going to be the casting approach
[16:16:02 EDT(-0400)] <EricDalquist> theoretically the registry is the only code that should be creating the impls
[16:16:23 EDT(-0400)] <esm> can we throw in a unit test or two which documents that behavior? If you want I can create them
[16:16:43 EDT(-0400)] <EricDalquist> yeah when I get to that point I will
[16:16:51 EDT(-0400)] <esm> ok no problem
[16:17:25 EDT(-0400)] <apetro_andreasde> I'm a fan of instanceof checks at the top of the methods, checking the arguments
[16:17:41 EDT(-0400)] <apetro_andreasde> and having them throw and articulate IllegalArgumentException in the case where the argument isn't of the required type
[16:17:55 EDT(-0400)] <EricDalquist> typ
[16:17:58 EDT(-0400)] <EricDalquist> yup*
[16:18:06 EDT(-0400)] <apetro_andreasde> I do wonder if the interface is actually helping, if it's not actually true that it's being implemented
[16:18:39 EDT(-0400)] <apetro_andreasde> would it be such a terrible sin to do away with IRegistryBlahBlah and just have the impl, with the method arguments strongly typed to the impls that they really require?
[16:18:51 EDT(-0400)] <apetro_andreasde> I suppose that makes calling it a pain, where callers have the interfaces and not impls handy
[16:19:18 EDT(-0400)] <apetro_andreasde> but then take it further, and do away with the interface that's not being multiply implemented anyway
[16:19:20 EDT(-0400)] <EricDalquist> well there are multiple impls of each interface
[16:19:24 EDT(-0400)] <apetro_andreasde> maybe things just get simpler
[16:19:28 EDT(-0400)] <EricDalquist> but the registry makes some decisions on which one you get
[16:19:45 EDT(-0400)] <apetro_andreasde> ah
[16:19:48 EDT(-0400)] <apetro_andreasde> k
[16:19:51 EDT(-0400)] <apetro_andreasde> sounds like you have it covered
[16:19:56 EDT(-0400)] <apetro_andreasde> goes back to day job
[16:20:12 EDT(-0400)] <EricDalquist> thanks for the input
[16:20:54 EDT(-0400)] <esm>
[16:31:59 EDT(-0400)] * EricDalquis1 (n=dalquist@bohemia.doit.wisc.edu) has joined ##uportal
[18:38:23 EDT(-0400)] * EricDalquist (n=EricDalq@adsl-75-42-233-200.dsl.mdsnwi.sbcglobal.net) has joined ##uportal
Page Comparison
General
Content
Integrations