Language for processing business rules

Asked

Viewed 89 times

1

I am architecting a new project in C# and one of the needs is that module does mathematical calculations on values that I will have in the database.

This module needs to share these rules with another Mobile project being synchronized in case the rules change.

I ask for suggestions with some technique or languages that can be used as scripts which can run between platforms.

At first I thought about Javascript, because it can be processed by the C# module and Mobile using the views navigation (e.g. Android Webview, iOS Uiwebkit).

  • 1

    Do you know SOA architecture? Try creating a Restful API to serve both applications using the same back-end where you’ll centralize business rules, and in front-end (mobile and desktop) applications. I suggest the article: http://www.ciceroednilson.com.br/criando-um-servico-restful-com-web-api-em-c/

  • I forgot to comment, we are doing this way because one of the requirements of the project is that the Mobile work Offline, for difficulties of connection in the place of those who will operate it.

  • You’re thinking in terms of technology, when you really need to think in terms of architecture.Your problem isn’t language. EX.: https://www.mulesoft.com/resources/api/microservices-vs-monolithic

2 answers

2


If you need something on the server and mobile you can use Xamarin and stay in the C#.

I don’t think I really need a language of script, but if you really need to, you can C# itself as script? This is achieved through the .NET Compiler Platform.

If you need it to be web, you cannot escape Javascript. You can at most use a language that runs on top of JS. It can be Typescript or even even the C#, although then the result may not be very good and probably need adjustments.

Another alternative is to leave everything on the server and the client only request the server processing. This has advantages and disadvantages. You have to see if it suits you.

  • We’re using Xamarin for Mobile, and we have experience with Roslyn on Desktop projects, but I don’t know how they look for Mobile platforms on top of Mono. Good as it was commented and was already one of our alternatives, I will do some tests to see if revenge. Thank you

  • Mobile is to use Xamarin, point.

0

Well, for unique business rules needs for all of the Developers that you can access, I would recommend that you create a Webapi and all devices call such an API. This way, once the business rule is changed, it becomes transparent to all client devices.

  • I forgot to comment, we are doing this way because one of the requirements of the project is that the Mobile work Offline, for difficulties of connection in the place of those who will operate it.

  • Edit the main question and add the la requirements.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.