Welcome to Paradise
Where Should the Logic Live?
For starters, let’s consider a hypothetical scenario pertaining to a web site for an insurance provider. To insure my new car, I must fill out an online application. The first portion of the application requires me to provide my name and address. The application will validate the data I enter before allowing me to move on to the next page. As developers, the question we face is: where should the business logic that checks the input data live?
There are seemingly endless ways to solve most problems in the web world, but for this scenario there are three common approaches. Let’s look at each from both the developer perspective relative to effort and the end user from the user experience perspective:
- Option 1: Put all of the business logic on server
- User: Slow experience due to the fact that every event that relies on logic to run requires a round trip to the server
- Developer: Medium effort.
- Option 3: Put core business logic on the server and the client, where the developer decides where the logic lives, allowing for the possibility of the logic living in both places
- Developer: Most difficult
- User: Very responsive application, provides a fast and seamless user experience (due to the fact that most business logic lives in the browser, requiring infrequent trips to the server and thereby reducing server traffic).
Yes it would.
Portability of Logic
With InRule, internal subject matter experts, regardless of their level of technical expertise, can author, maintain and modify business rules. While this model works great, we believe we can provide more value by delivering a meaningful/responsive user experience in the browser without significant developer involvement.
Alpha Bits: Not Just for Breakfast