Business logic: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 1: Line 1:
{{Wikipedia|Business logic}} {{Academy|37|Business Logic}}
{{Wikipedia|Business logic}} {{Academy|37|Business Logic}}
Business logic is a part of program or application, essentially a set of business rules and workflows that direct the interaction between user interface and data.
Business logic is a part of a program or application, essentially a set of business rules and workflows that direct the interaction between user interface and data. The Resco platform comes with a strong focus on mobility and comes with powerful options for client-side business logic. On the server side, Dynamics and Salesforce come with their own business logic; and so does Resco Cloud.


== Examples ==
== Examples ==
Line 12: Line 12:
* Find out how many appointments are associated to an account
* Find out how many appointments are associated to an account


== Levels of business logic in Resco Mobile CRM ==
== Client-side business logic (Resco Mobile CRM) ==
 
[[Resco mobile apps]] come with several levels of business logic.
* Built-in / hard-coded
* Built-in / hard-coded
* Reused server-side logic
* Reused server-side logic
* Rules (Form, View, Calendar, Map, …)
* No-code logic using rules (Form, View, Calendar, Map, …)
* JavaScript
* JavaScript logic using Resco JavaScript Bridge


== Rules ==
=== Rules ===


Rules are scripts that run directly in the mobile application. They offer a way for setting up business logic using [[Woodford]]. Rules can be placed on multiple [[user interface components]]:
Rules are scripts that run directly in the mobile application. They offer a way for setting up business logic using [[Woodford]]. Rules can be placed on multiple [[user interface components]]:
Line 29: Line 31:
We are continuously adding rules support to UI components. See [[Rules editor]] for more information about rules.
We are continuously adding rules support to UI components. See [[Rules editor]] for more information about rules.


=== Scripting language ===
==== Scripting language ====
[[File:Sample rule.png|thumb|right|300px|Sample rule]]  
[[File:Sample rule.png|thumb|right|300px|Sample rule]]  
Rules are formed in a simple scripting language. Essentially, you combine '''conditions''' and '''steps'''.
Rules are formed in a simple scripting language. Essentially, you combine '''conditions''' and '''steps'''.
Line 55: Line 57:
You don't write scripts, you build them using buttons and selecting values from a drop-down menu. Use the [[dot notation]] to work with entity fields or object properties.
You don't write scripts, you build them using buttons and selecting values from a drop-down menu. Use the [[dot notation]] to work with entity fields or object properties.


=== Objects in rules ===
==== Objects in rules ====


Rules allow you to evaluate and modify parameters of various objects:
Rules allow you to evaluate and modify parameters of various objects:
Line 66: Line 68:
* Specialties
* Specialties


=== Form rules ===
==== Form rules ====


Form rules describe sequences of steps that are executed on form-related events. They allow you to for example to customize edit form user interface (hide or disable fields, assign values, etc.). Here are some of the events available for forms:
Form rules describe sequences of steps that are executed on form-related events. They allow you to for example to customize edit form user interface (hide or disable fields, assign values, etc.). Here are some of the events available for forms:
Line 76: Line 78:
; On Execute: Define the actions that the command performs.
; On Execute: Define the actions that the command performs.


=== View rules ===
==== View rules ====
These are some of the events that trigger rule execution for views.
These are some of the events that trigger rule execution for views.
; [[View#Row_scripts|Row Script]]: Define conditions when a specific row design should be used.
; [[View#Row_scripts|Row Script]]: Define conditions when a specific row design should be used.
; On Save, On Change: These events are used in conjunction with [[View#Editable_field|editable lists]], where they play similar role as on the form.
; On Save, On Change: These events are used in conjunction with [[View#Editable_field|editable lists]], where they play a similar role as on the form.
; Button Click: Executed when a row button is clicked.
; Button Click: Executed when a row button is clicked.
; Cell Click: Executed when an editable or clickable cell is clicked.
; Cell Click: Executed when an editable or clickable cell is clicked.


== JavaScript ==
=== JavaScript ===


[[Resco JavaScript Bridge]], or JSBridge.js, is a component provided by Resco that allows the scripts in the HTML frame to interact with Resco mobile apps. You can interact with the user interface, with data, and perform additional actions. Script files need to be included in the project using the [[Offline_HTML#Resco_JavaScript_Bridge|Offline HTML]] section of Woodford.
[[Resco JavaScript Bridge]], or JSBridge.js, is a component provided by Resco that allows the scripts in the HTML frame to interact with Resco mobile apps. You can interact with the user interface, with data, and perform additional actions. Script files need to be included in the project using the [[Offline_HTML#Resco_JavaScript_Bridge|Offline HTML]] section of Woodford.
Line 89: Line 91:
Rules and JavaScript can even be combined, see [[Execute JavaScript from rules]] for more information.
Rules and JavaScript can even be combined, see [[Execute JavaScript from rules]] for more information.


== Server-side business logic ==
== Server-side business logic (Resco Cloud) ==


For some business logic scenarios, client-side implementation on the mobile device is not suitable. For these cases, we recommend using processes and workflows running on the server instead. Each backend server has its own specifics. On [[Resco Cloud]], server-side business logic is managed using the [[Admin Console]] under [[Admin_Console#Processes|Processes]].
For some business logic scenarios, client-side implementation on the mobile device is not suitable. For these cases, we recommend using processes and plugins running on the server instead. Each backend server has its own specifics. On [[Resco Cloud]], server-side business logic is managed using the [[Admin Console]] under [[Admin_Console#Processes|Processes]]. The following options are available:
* [[Server processes|Processes]]: low-code option using a scripting language similar to the one used in the [[Rules editor]].
* [[Plug-in assemblies|Plugins]]: write custom C# code that can be launched from the processes.


== See also ==
== See also ==

Navigation menu