Is it a good idea to implement business logic on the client side with JavaScript?
What kind of logic should be there? Validation Logic? Related to GUI?
What would you do if the same logic want to be used in another application (exposed) implementing it in JavaScript would mean you can't reuse that logic.
On the other hand having all logic on the server side would mean more requests to the server.
What do you think?
The biggest and most obvious difference between the two is that thin clients rely on a network connection for computing and don't do much processing on the hardware itself. Thick clients don't need the constant network connection and can do much of the processing for client/server applications.
Business logic contains business rules. Application logic (and presentation logic) can be implemented on client-side. Business logic only on server-side. Thank you for answering a question on stack exchange!
They are more secure than thick client systems when it comes to security threats. In Thin clients the system management is much easier as there are centralized servers. With the help of centralization, there is optimization of hardware and maintenance of software is also comparatively easier.
Kinvey Business Logic is a node. js code execution runtime that allows you to customize the behavior of requests to your backend by providing a means to implement server-side business logic.
One should never ever trust the client. Thus, any validation you do on the client side with JavaScript can only be to improve user convenience and usability. You always have to validate incoming data on your server later to make sure nobody injects data etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With