I am a web developer working a web site/system in a very small company and in the angular controller there are statements like this..
if ((cover.coverPK == 6 || cover.coverPK == 8 || cover.coverPK == 10 || cover.coverPK == 4) && cover.coverDetailsCompleted > 0) { etc etc
Now these coverPKs are the SQL primary IDs to identify different insurance covers.. surely it is bad design to reference IDs like this on the front end, and a new developer joining will have no idea what the 6 is supposed to mean? unless they do a lookup in SQL.
Also, database IDs can change? which will break this code.
Thanks
Aucun commentaire:
Enregistrer un commentaire