dimanche 22 février 2015

Trouble with developing product order creation on a Spring/AngularJS application

I'm currently developing an order management system. The systems back-end is developed using the Spring Framework and the front-end is developed using AngularJS. I'm having some trouble with correctly programming the order creation. The orders are pretty complex. Involving multiple parts: – Products – Custom text (this can be added on the product during production) – Specific location (these locations are in the database and there should be a possibility to add extra info on the order)


Currently I'm building the order up in Angular and send it to the server as one object. The calculations of the order are done in AngularJS to be displayed on the front-end. The object send to the server does not include these results. final calculations are done on the back-end. So yes the Angular calc are just for show.


Now this is where my problem is. (if it even is a problem, I'm not completely sure.) It should never happen that the price is different on the front-end than after saving the order.


Could someone give me some advice on how to properly implement this.


Do you think it's a good idea to create the order using Angular and then send it as a complete object to save it in the DB? Or should I just create a blank order and add products using calls to the server?


Maybe some other suggestions?


Help is greatly appreciated


Aucun commentaire:

Enregistrer un commentaire