Some times we have to work independently on a particular layer with in multi layered project, For example working on a typical business layer with out knowing how the service layer provides its features to a consumer.
Basically in such layered architecture a developer cannot expect each and every argument (parameter) received is up to the requirement. so each and every time we have to check all the boundary conditions to make sure my own code works perfectly with out running in to any trouble.
Let me take the following example;
Through out the code until last few lines this NewUserRegistration Method checks for any faults in in coming parameters even though this looks an overhead believe me its going to save lots of user time when the code beings to consume by other layers.
As a software developer we cannot guarantee what might happen between the layers; if the system scales up your layer might be running as an isolated tier which has been exposed to multiple other consumers. So as said in your method you must guarantee that inputs are properly validated before process them. This approach saved a lots of developer time when it comes to QA and Developer testing.
Basically in such layered architecture a developer cannot expect each and every argument (parameter) received is up to the requirement. so each and every time we have to check all the boundary conditions to make sure my own code works perfectly with out running in to any trouble.
Let me take the following example;
Through out the code until last few lines this NewUserRegistration Method checks for any faults in in coming parameters even though this looks an overhead believe me its going to save lots of user time when the code beings to consume by other layers.
As a software developer we cannot guarantee what might happen between the layers; if the system scales up your layer might be running as an isolated tier which has been exposed to multiple other consumers. So as said in your method you must guarantee that inputs are properly validated before process them. This approach saved a lots of developer time when it comes to QA and Developer testing.
Techtalkz: Writing Traceable Code >>>>> Download Now
ReplyDelete>>>>> Download Full
Techtalkz: Writing Traceable Code >>>>> Download LINK
>>>>> Download Now
Techtalkz: Writing Traceable Code >>>>> Download Full
>>>>> Download LINK