Doubts of systems architecture

Asked

Viewed 45 times

0

Good afternoon, I have to change the company’s system here, and it’s gonna get more complex. We are a builder every work we work is previously budgeted, when the buyer will add an order, the system has to check if there is a purchase requisition made by the staff of the work with this material, then the system has to check that the material is in the budget, and then check that the unit values are not higher in the order than in the budget, then check the same thing for the total value... each material that the buyer adds umd access in the database, loading a budget list and doing the validations, would it have to be that way? What strategy would you use to solve this?

  • I didn’t quite understand your question and what you want, you could edit it and clarify a little more?

1 answer

1

If you don’t want to make multiple requests to the database, which I honestly don’t think is a problem when the methods are well implemented, and the return of queries doesn’t have a lot of data, then you can take another approach. Being implement a database Procedure, where you implement all your business rules that you cited above.

However, this is not a practice of putting business rules within the database is not very well accepted in front of most developed Patterns applied in the market, however rarely is the only solution.

Now if you don’t want to leave it inside the database, and don’t want to make too many accesses to the database in your application layer, then you might consider implementing some kind of asynchronous service, and you could use a webservice for that. But you will have to evaluate the impact very well because it can impact on the usability of the software.

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.