mardi 29 janvier 2019

How to map "real-world" processes to classes in OOP?

I tried to search SO and Google about this, but I didnt find anything really relevant.

When we are talking about OOP principles of design and programming we are using objects like cars, peoples (employees and clients) and ofcourse shapes (square and triangular).

But what about processes? How to model it? For example, I have system that processes electronic documents from other systems, makes correlations and all interoperability stuff. It's obvious to create classes for electronic documents. But what about system itself? How should I model it? Like a single big class (with name EDProcessing for example) with properties for db-connections (or EF objects) and different electronic documents? Or as static class (module) with methods that create db-objects every time they called?

Another example is the system that watching for real-world process like fueling and make all equations and data-processing for it. How should I define it?

Aucun commentaire:

Enregistrer un commentaire