Which way is better to create a saml object?

Brent Putman putmanb at georgetown.edu
Sat Aug 4 16:01:50 EDT 2012


On 8/4/12 1:43 AM, Yaowen Tu wrote:
> I see this
> wiki: https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUsrManJavaCreateFromScratch
>
>
> I am wondering why the second way is not preferred. Seems that wiki is
> not explaining why. Or I missed anything?
>

The design uses a configuration registry approach so that calling code
isn't hardcoding the use of specific implementation classes (like the
builders).  If we decide to change anything about the implementation
classes, like the class/package names, the constructor args, etc (which
we can do "legally", since they aren't part of the supported API), your
code won't break when you upgrade library versions if you use the
configuration registry.  It's a common software design pattern.


More information about the dev mailing list