Re: Half user config and half client prog implemented




"H. S. Lahman" <h.lahman@xxxxxxxxxxx> wrote in message
news:0SFah.8438$gJ1.2417@xxxxxxxxxxx
Responding to Visionset...

I have a Leave type that represents a kind of employee leave (eg holiday,
sick etc)
The app I'm writing may end up at any company, so I need to have the
leave types configurable throught the app. I'll do this for simple types
that just require a unique labeling. But other types maybe more complex
and require some bespoke algorithm on a per company basis. So I'll
implement an interface for each of these special types.

Could you put some more words around the application problem? I am having
a hard time envisioning any sort of "employee leave" abstraction that
could not be fully configured by supplying values for a fixed set of
knowledge attributes.


Yeah sorry about that, it was a little terse!

Okay so, the leave types are just a simple enumeration. But I need to know
about them in the app code in order to do the right thing. Often this will
just be to prevent clashes, if it is a company holiday then it can't also be
sick leave. But when it comes to annual entitlement or some special kind of
compulsory company leave, then special rules will apply such as imposing an
'overdraft limit' or allowing an administrator to configure the company
holidays. So usually a generic leave processor class will just prevent
clashes but sometimes it needs to do more. And these extra algortihms I'd
like to be simply configurable after the main product is established. So I
need some way to tie leave types to the code that regulates them.

--
Mike W


.



Relevant Pages