jasig-cas IRC Logs-2011-08-03
[06:59:43 CDT(-0500)] <fairwinds> apetro: gmorning. I must have been tired last night - don't know what I did to cause logging craziness but anyway all is cool. I am working on my erlang CAS2 client today
[08:58:56 CDT(-0500)] <fairwinds> apetro: would anyone be opposed to me creating some no args constructors for some of the object implemenations?
[08:59:42 CDT(-0500)] <apetro> what objects are we talking about?
[08:59:54 CDT(-0500)] <apetro> in general, you can write whatever local code you want.
[09:00:11 CDT(-0500)] <apetro> and you can propose any patch to CAS you want
[09:00:58 CDT(-0500)] <fairwinds> apetro: ImmutableAuthentication, SimplePrincipal are a couple of examples
[09:01:12 CDT(-0500)] <apetro> good code design depends on the details and context, of course, but in general, I personally can sympathize with using JavaBean properties rather than constructor arguments for legibility of Spring wiring.
[09:01:14 CDT(-0500)] <apetro> ah
[09:01:40 CDT(-0500)] <apetro> the problem with a no-arg constructor for ImmutableSplat is that, what with it being immutable, it can't thereafter be adjusted to something useful
[09:01:57 CDT(-0500)] <apetro> an Authentication with no state is useless, right?
[09:04:41 CDT(-0500)] <fairwinds> apetro: alternatively, what could I do in overlay
[09:05:01 CDT(-0500)] <apetro> you can't
[09:05:26 CDT(-0500)] <fairwinds> right, I guess that is what I figured
[09:05:29 CDT(-0500)] <apetro> attempting to override comes-with-CAS classes anywhere is the road to pain, suffering, and gnashing of teeth
[09:05:57 CDT(-0500)] <apetro> you can write your own implementations of CAS APIs
[09:06:03 CDT(-0500)] <fairwinds> apetro: have to avoid the gnashing of teeth especially
[09:06:12 CDT(-0500)] <apetro> you can fork CAS and then overlay on your fork
[09:06:21 CDT(-0500)] <apetro> you can fork cas and not bother with an overlay
[09:06:31 CDT(-0500)] <fairwinds> oh, god that sounds heavy
[09:06:44 CDT(-0500)] <apetro> but trying to depend upon CAS and then replace some of its classes, I predict that will be pretty painful.
[09:06:53 CDT(-0500)] <fairwinds> apetro, yikes
[09:07:17 CDT(-0500)] <apetro> my projects tend to temporarily result in things like MyLocalCentralAuthenticationServiceImpl to locally change something in the impl of that class
[09:07:24 CDT(-0500)] <apetro> and then wiring in the alternative impl via Spring
[09:07:40 CDT(-0500)] <apetro> maybe I'm just Doing It Wrong, but that's the pattern I'm on
[09:07:53 CDT(-0500)] <fairwinds> apetro: Ah, so that might not be that bad
[09:07:57 CDT(-0500)] <apetro> preferably then proposing the enhancement back into the CAS project so that on a future upgrade the local impl can be retired
[09:08:49 CDT(-0500)] <fairwinds> apetro: so that can happen in overlay since it is an alternative implementation is all
[09:08:57 CDT(-0500)] <apetro> indeed
[09:09:06 CDT(-0500)] <apetro> your overlay can replace whatever Spring XML configurations you need to
[09:09:12 CDT(-0500)] <apetro> wherein you can wire up whatever classes you want
[09:09:37 CDT(-0500)] <apetro> so, in particular, if you want an alternative impl of CentralAuthenticationService, you can write one, it implements CentralAuthenticationService, and then wire it in rather than the default
[09:09:42 CDT(-0500)] <fairwinds> apetro: right, I have been wiring away with my authenticator and ticket registries
[09:09:56 CDT(-0500)] <apetro> and tada! You've modified zero comes-with-CAS classes, but you nonetheless introduce your own versions / behavior / changes
[09:10:47 CDT(-0500)] <fairwinds> I am getting hang of beans and properties a bit. Have even got two initializing beans
[09:11:32 CDT(-0500)] <fairwinds> apetro: k, well this give me more hope that convincing changes to trunk
[09:11:43 CDT(-0500)] <fairwinds> which could take some time
[09:11:50 CDT(-0500)] <fairwinds> if they were even accepted
[09:14:29 CDT(-0500)] <fairwinds> apetro: you have been super helpful and I appreciate our dialog. I am learning quite a bit about CAS and some helpful things about java along the way
[09:15:18 CDT(-0500)] <apetro> glad I can help. CAS is worth discussing and I look forward to seeing some great patches and JIRAs for advancing CAS.
[09:16:40 CDT(-0500)] <fairwinds> apetro: cool, who knows maybe I may be able to be a CAS server dev some day
[09:23:39 CDT(-0500)] <fairwinds> apetro: It is interesting to me and I am doing these things with specific goals in mind. Everything I do is JSON in the end so I am really striving to make it all work with CAS.