Our customer wants to unify his ordering system, so that all of his end-customers can use one single website to place orders. The planned site will use web services to place the order in one of several production systems.

The production systems have a lot of different orderable services, that need different information when ordered. Some need the end-user's name; others will need a date until the service has to be provided; some need the location where something will be delivered to; others need a pick-up location.

The new site will be build, so that all necessary information will always be delivered. The site is build by another department, while I'm task with the creation of a webservice, that can be used by a number of different production systems.

The production systems need specific information (e-Mail Addresses to send Notification, Locations to send people to, Dates and Times at which something is available). Let's imagine a system to help the customer service of a washing machine company: Send a notifications to the given users e-mail address, that the repair will be performed in his house at a given date, which is automatically assigned by the production system. Another E-Mail will be send to the actual worker, with the location given in the address and the date he has to perform the work.

Another system might only need the location of the customer, as it will only send out a package with a replacement part.

There are a lot off different service types and continuing work on the systems. Fields are added to the process every couple of month, to support some kind of new business case.

What would be the best way to model the different types of fields? Should there be a different class of order for each of the different types of service (DeliveryOrder, PickupOrder etc.)? Or should we use an ontology of some kind (Order with an array of fields, each order needing different fields in the array, which are identified by a FieldTypeID)?

  • I think the real question here is whether you need to ask the user for all of this information or infer it somehow, and if so what UX/logic to use. But for the code design part, we'll probably need more detail to figure out whether a class hierarchy or an associative array or some other technique is appropriate. In particular: Is there any business logic associated with these hypothetical service types, or are you just shuffling opaque data around? How often do you expect the required information to change? Is it information you can guarantee you always have or will its reliability vary? – Ixrec Feb 13 '16 at 20:10
  • Thanks for the comment, I tried to edit your questions in. In essence: We can guarantee all information are present, as we can demand them from the new web site and there is business logic associated to the data entered. – RobMMurdock Feb 13 '16 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.