How do I share function code between projects?Microsoft AZURE blob triggered function working intermittentlyAzure function app and SignalRCan we have two separate bin folders within a single Function App?Is it possible to disable AAD Auth on specific Azure functions?Best method for deploying Azure function app application settingsAzure Function Transforms During VSTS BuildHow do I configure a session cookie in Azure Functions?Deploying a precompiled f# function to Azure Functions v2Grant Access to a Shared Mailbox From an ApplicationReference external script in JavaScript Azure Function code

How to be diplomatic in refusing to write code that breaches the privacy of our users

What's the purpose of "true" in bash "if sudo true; then"

Coordinate position not precise

How was Earth single-handedly capable of creating 3 of the 4 gods of chaos?

How will losing mobility of one hand affect my career as a programmer?

If you attempt to grapple an opponent that you are hidden from, do they roll at disadvantage?

Lay out the Carpet

Is there a good way to store credentials outside of a password manager?

Can criminal fraud exist without damages?

Is a roofing delivery truck likely to crack my driveway slab?

Will it be accepted, if there is no ''Main Character" stereotype?

What are the ramifications of creating a homebrew world without an Astral Plane?

Why "be dealt cards" rather than "be dealing cards"?

Trouble understanding overseas colleagues

What't the meaning of this extra silence?

Is it correct to write "is not focus on"?

Was Spock the First Vulcan in Starfleet?

Ways to speed up user implemented RK4

What's a natural way to say that someone works somewhere (for a job)?

Can I use my Chinese passport to enter China after I acquired another citizenship?

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?

Can I Retrieve Email Addresses from BCC?

Are there any comparative studies done between Ashtavakra Gita and Buddhim?

The baby cries all morning



How do I share function code between projects?


Microsoft AZURE blob triggered function working intermittentlyAzure function app and SignalRCan we have two separate bin folders within a single Function App?Is it possible to disable AAD Auth on specific Azure functions?Best method for deploying Azure function app application settingsAzure Function Transforms During VSTS BuildHow do I configure a session cookie in Azure Functions?Deploying a precompiled f# function to Azure Functions v2Grant Access to a Shared Mailbox From an ApplicationReference external script in JavaScript Azure Function code













0















What I am building is a SaaS-software for multiple clients. It is mainly based on Azure Storage, Service Bus and Functions v2. It is now built so that every customer will have their own resource group. So all resources are duplicated for every customer. But every case is not identical so I can't directly share all code.



For example there will be different ways to integrate to it and different transformations and validations needed for each customer. Still most code will be identical or some code will be shared by some customers, but not all customers.



How should I build my solution so that I can pick specific functions and also specific versions of them to each customer solution? Without copying code.



For example:
Customer 1: Func1 version 1.0, Func2 version 1.0
Customer 2: Func1 version 1.0, Func2 version 1.1, Func3 1.0



I have many ideas, but the one I would like best is to collect all functions to one DLL and then configure what functions to deploy for each customer? Is it possible to do?



I could of course just disable the unwanted ones, but I don't want a solution where I deploy stuff not wanted and rely on disabling stuff and them staying disabled.



Or is there any other good ways to achieve this?










share|improve this question






















  • You could look into making the stuff real generic and putting it in Azure Artifacts as a NuGet package.

    – rickvdbosch
    Mar 8 at 10:12















0















What I am building is a SaaS-software for multiple clients. It is mainly based on Azure Storage, Service Bus and Functions v2. It is now built so that every customer will have their own resource group. So all resources are duplicated for every customer. But every case is not identical so I can't directly share all code.



For example there will be different ways to integrate to it and different transformations and validations needed for each customer. Still most code will be identical or some code will be shared by some customers, but not all customers.



How should I build my solution so that I can pick specific functions and also specific versions of them to each customer solution? Without copying code.



For example:
Customer 1: Func1 version 1.0, Func2 version 1.0
Customer 2: Func1 version 1.0, Func2 version 1.1, Func3 1.0



I have many ideas, but the one I would like best is to collect all functions to one DLL and then configure what functions to deploy for each customer? Is it possible to do?



I could of course just disable the unwanted ones, but I don't want a solution where I deploy stuff not wanted and rely on disabling stuff and them staying disabled.



Or is there any other good ways to achieve this?










share|improve this question






















  • You could look into making the stuff real generic and putting it in Azure Artifacts as a NuGet package.

    – rickvdbosch
    Mar 8 at 10:12













0












0








0








What I am building is a SaaS-software for multiple clients. It is mainly based on Azure Storage, Service Bus and Functions v2. It is now built so that every customer will have their own resource group. So all resources are duplicated for every customer. But every case is not identical so I can't directly share all code.



For example there will be different ways to integrate to it and different transformations and validations needed for each customer. Still most code will be identical or some code will be shared by some customers, but not all customers.



How should I build my solution so that I can pick specific functions and also specific versions of them to each customer solution? Without copying code.



For example:
Customer 1: Func1 version 1.0, Func2 version 1.0
Customer 2: Func1 version 1.0, Func2 version 1.1, Func3 1.0



I have many ideas, but the one I would like best is to collect all functions to one DLL and then configure what functions to deploy for each customer? Is it possible to do?



I could of course just disable the unwanted ones, but I don't want a solution where I deploy stuff not wanted and rely on disabling stuff and them staying disabled.



Or is there any other good ways to achieve this?










share|improve this question














What I am building is a SaaS-software for multiple clients. It is mainly based on Azure Storage, Service Bus and Functions v2. It is now built so that every customer will have their own resource group. So all resources are duplicated for every customer. But every case is not identical so I can't directly share all code.



For example there will be different ways to integrate to it and different transformations and validations needed for each customer. Still most code will be identical or some code will be shared by some customers, but not all customers.



How should I build my solution so that I can pick specific functions and also specific versions of them to each customer solution? Without copying code.



For example:
Customer 1: Func1 version 1.0, Func2 version 1.0
Customer 2: Func1 version 1.0, Func2 version 1.1, Func3 1.0



I have many ideas, but the one I would like best is to collect all functions to one DLL and then configure what functions to deploy for each customer? Is it possible to do?



I could of course just disable the unwanted ones, but I don't want a solution where I deploy stuff not wanted and rely on disabling stuff and them staying disabled.



Or is there any other good ways to achieve this?







azure-functions






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 8 at 10:07









SamiRSamiR

297




297












  • You could look into making the stuff real generic and putting it in Azure Artifacts as a NuGet package.

    – rickvdbosch
    Mar 8 at 10:12

















  • You could look into making the stuff real generic and putting it in Azure Artifacts as a NuGet package.

    – rickvdbosch
    Mar 8 at 10:12
















You could look into making the stuff real generic and putting it in Azure Artifacts as a NuGet package.

– rickvdbosch
Mar 8 at 10:12





You could look into making the stuff real generic and putting it in Azure Artifacts as a NuGet package.

– rickvdbosch
Mar 8 at 10:12












1 Answer
1






active

oldest

votes


















0














You could make one resource group with all the functions that have shared logic and from there call the specific logic functions based on the customer. Although this could be a drastic change to your architecture, this way you only need to host the extra customer specific logic and not duplicate all the time. Also for each customer, you can deploy the right version of the customer specific logic function.



For your example that would be:



Shared logic resource group:

Function 1 version 1.0



Customer 1 group:

Function 2 version 1.0



Customer 2 resource group:

Function 2 version 1.1

Function 3 version 1.0






share|improve this answer























  • Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers

    – SamiR
    Mar 12 at 12:36










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55060906%2fhow-do-i-share-function-code-between-projects%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














You could make one resource group with all the functions that have shared logic and from there call the specific logic functions based on the customer. Although this could be a drastic change to your architecture, this way you only need to host the extra customer specific logic and not duplicate all the time. Also for each customer, you can deploy the right version of the customer specific logic function.



For your example that would be:



Shared logic resource group:

Function 1 version 1.0



Customer 1 group:

Function 2 version 1.0



Customer 2 resource group:

Function 2 version 1.1

Function 3 version 1.0






share|improve this answer























  • Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers

    – SamiR
    Mar 12 at 12:36















0














You could make one resource group with all the functions that have shared logic and from there call the specific logic functions based on the customer. Although this could be a drastic change to your architecture, this way you only need to host the extra customer specific logic and not duplicate all the time. Also for each customer, you can deploy the right version of the customer specific logic function.



For your example that would be:



Shared logic resource group:

Function 1 version 1.0



Customer 1 group:

Function 2 version 1.0



Customer 2 resource group:

Function 2 version 1.1

Function 3 version 1.0






share|improve this answer























  • Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers

    – SamiR
    Mar 12 at 12:36













0












0








0







You could make one resource group with all the functions that have shared logic and from there call the specific logic functions based on the customer. Although this could be a drastic change to your architecture, this way you only need to host the extra customer specific logic and not duplicate all the time. Also for each customer, you can deploy the right version of the customer specific logic function.



For your example that would be:



Shared logic resource group:

Function 1 version 1.0



Customer 1 group:

Function 2 version 1.0



Customer 2 resource group:

Function 2 version 1.1

Function 3 version 1.0






share|improve this answer













You could make one resource group with all the functions that have shared logic and from there call the specific logic functions based on the customer. Although this could be a drastic change to your architecture, this way you only need to host the extra customer specific logic and not duplicate all the time. Also for each customer, you can deploy the right version of the customer specific logic function.



For your example that would be:



Shared logic resource group:

Function 1 version 1.0



Customer 1 group:

Function 2 version 1.0



Customer 2 resource group:

Function 2 version 1.1

Function 3 version 1.0







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 12 at 12:18









Mark FoppenMark Foppen

12




12












  • Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers

    – SamiR
    Mar 12 at 12:36

















  • Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers

    – SamiR
    Mar 12 at 12:36
















Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers

– SamiR
Mar 12 at 12:36





Thanks for the reply, but that doesn't really answer the question. It isn't really about resource groups but about sharing code. If there was only "shared by all", and then "used by one" functions, this would work. But what I have is X amount of functions with different versions, and I want to pick any subset of those to a customer deployment. Customers A, B and C might use SFTP integration and require function X, but Customers D, E might use a REST API and require function Y instead and Customer F might need version 1.1 of function Y. I could just copy code, but imagine 100 customers

– SamiR
Mar 12 at 12:36



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55060906%2fhow-do-i-share-function-code-between-projects%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived