How can I reuse a grails application (Code and Data) by other grails applications? - grails

I have a grails Application
http://partner.strotmann.org
https://github.com/pstrotmann/partnerForFree
managing partner Information like persons, organizations, their resp. adresses, bank data and communication data (email, phone, ..)
As this Application is important for other applications in a company e.g. sales, marketing, human resources etc., it should be reused by those applications with no data redundance and as less code redundance as possible.
My first approach is Rest Webservice, that I implemented for a small production planning system, that just needed the name of the customer.
Is there a more grails like approach ?

For my needs a solution with rest Webservice will do.
First I wrote
https://github.com/pstrotmann/partnerAdapter
that encapsulates rest logic for the applications.
Using that adapter I wrote two simple examples:
http://sale.strotmann.org for English users
http://purchase.strotmann.org for German users
and deployed them on a server residing on a cloud other than partner. You can record orders and purchases and link them to a partner, that can be selected from the partnersystem. The link back from partner to sale and purchase is implemented as roles in the partner system.
Click the links and try.
peter
Dortmund, Germany

Related

Which Archimate element should I use to model a shop

I'm in the process of creating various archimate models for my organization. We offer financial services. Customers can do most of the things they require using the online portal and the mobile app.
But we also have branch offices where customers can go to get personal attention. They can get personal advice, they can ask representatives for operational tasks, or they can go to a public workstation there and do it themselves using the online portal, potentially with some assistance.
How should I model such a branch office in Archimate? Is it an Actor? Or a Business Service? Or a Business Interface? Or maybe a Product? Or just a Location? It's also a thing that's designed around a specific concept, and we have different concepts, each with a unique setup and capabilities.
You can compare such a branch office with a retail shop, or a post office. It's more than an internal element, because this is a point of contact with your customer. But what kind of element best describes it?
You can use different type of elements to model a branch office:
If you use physical elements, the branch can be a "Facility".
But probably it fits more with a "Location" that can aggregate "Resources" (Strategy Elements) o "Business Roles" that can realize "Business Services".
Consider this image, the customer is served various services (like personal advice) at (or aggregated in) a location assigned to the physical facility. Hope this answers your doubt.

What Intent to be used for Sirikit for ecommerce application

I am developing an E-Commerce application.
I want to integrate Sirikit with the app.
Sample Instructions i want to give is in the following format
Buy |Something| from |App Name|
I did everything but i am confused which Domain or Intent to choose. Would be great if someone could guide me.
The only domain that seems suitable for your needs is the Payment domain.
As its documentation states, the Payment domain can be used for bill payment to any vendors, so it seems like a good candidate for an eCommerce application. Specifically, you should be using the INPayBillIntent as this is the intent that should be used to facilitate a financial transaction between an individual (your user) and an entity (the seller of your eCommerce product).
Even this intent won't exactly match your use case, so most probably you won't be able to use the phrase "Buy |Something| from |App Name|", but this is as close as you can get with the currently available intent domains.

White labelling Enterprise iOS application

I had developed 3 applications for my client. Now he wants to distribute it to other organizations (doing same business). Other firms will have minor data and image set changes, other functionalities are same. What is the best approach for distributing this 3 application with the other firms?
1) One solution I think is to upload this 3 application to each firms apple enterprise account.
Prons:
UI and functionality can be changed for each apps depends on business
changes.
Will have different server and APIs. So data security can be increased.
Cons:
Need to maintain different source codes.
As firms number increases applications also increases, which can be a form of spamming appStore
with similar applications.
2) Another solution is to upload this 3 application to one account and is distributed among other firms. Need to check any legal issue in doing this. By this server will maintain different database for different Companies and user registered with this company will link to the corresponding database. All other calculation and logic will be handled by the server. iOS application switches image set w.r.t company.
Can I do this by any other approach or which one is the best one. The main idea is to give a contract to another firm by creating a set of users having an extendable validity date and this is maintained by my client.
Thanks in advance and any thought on this is appreciable.
The best solution to this is Volume Purchase Program for Business
provided by Apple. It provides you with a functionality called Custom B2B apps for iOS. You can read the details in this document.

Can we use Oauth for our application?

I have a question about a project we are creating. Here are some basic use cases:
A user can register and edit their company details (and other details) online
A user is member of one or more user groups (a user group is a company)
Data groups can contain multiple companies (eg. a group called 'Amsterdam' contains all companies from Amsterdam)
The data that is stored in the database can be used for touchscreens to show visitors these details (eg. company details from 'Amsterdam' and 'The Hague'). So some use cases can be defined as:
A touchscreen can download data from one or more datagroups
Api keys are defined at the user group not at the user, if a user is fired they shouldn't be able to get the data anymore
But now the biggest question.
Can we use Oauth (which version I don't care) to download the data to the touchscreens AND can we use Oauth so that users can login to the online controlpanel?
Can we write the controlpanel as an Oauth application to the datastore backend? Or does the control panel need to be an Oauth independent application so users can create applications or we (as administrators) can create new applications for each touchscreen?
I have already read some about Oauth and I understand the basic principles, but I don't know if it is the best solution for the above use cases.

Securing web application on the data access level

Please consider the following setup:
Multi-tenant webapp.
Tenants create company accounts and company accounts have user accounts under them.
Users have roles, there's a special role "Owner" (the user who created the company account).
I'd like to have users to edit other user accounts (some admin tasks), but two conditions must be met:
Noone may edit owner's data (except for owner, when he's editing his own profile, and own profile editing is the same user editing).
Users may access user data and edit users only within their company account.
The app uses MVC architecture. Currently I check for those two conditions in the web layer and it works for me, but I have some concerns. If I go with some sort of API or some other type of data consumer, I may "forget" to re-inforce these conditions. Also, there will be other objects in the app with similar functionality requirements and which will have similar restrictions on them, so it's better for me to come up with some sort of pattern which will enforce my restrictions on data access level.
Could anyone recommend some approach worth looking into?
Thanks!
I beleive aspects or interceptors should be able to help you. If you work with objects you should be able to intercept requests containing your business data and check wether your user is allowed to work on it. The interceptor could then stop or proceed the execution.

Resources