Base solution for your next web application
Open Closed

AbpModules and best practices/suggestions #9021


User avatar
0
atideveloper created

We have decided to move our code into separate AbpModules so that we can make minimal updates to the orignal ASP.NET Zero code. The idea behind this is to make it easier to get updates to ASP.NET Zero in the future. What we are running into is a circular reference being introduced between our AbpModule and the original .Core project. So that got me thinking maybe we are not using it quite right, or we just have a hard decision to make in terms of how we organize our source.

When creating a product with ASP.NET Zero what is the best or recomended practice when it comes to adding our own code. Should we add it to the orignal projects or should we create separate AbpModules and hook those into the original solution? It seems like if we start adding a lot of code to the original projects then it will eventually become impossible to pull in updates. I have seen some posts about how to use branching to help with getting updates to ASP.NET Zero but I am not sure if that will work for us and it seems like it will still result in a lot of conflicts and merge issues (which is expected if we are adding/removing/changing the original source.)

So, I am just trying to get a feel for what the normal/suggested usage of ASP.NET Zero is. Should we just think of it as only a starting point or initial code base, add our own code and make changes to it however we want, and not really upgrad to newer releases in the future? Or should we try to keep our code separated out of the original source so that we can more easily update it later?

I just want to make sure we start our new product in a way that works well with the frameworks we are using and gives us the best chance at being successful with it in the long term. The product we are making is not going to be a small, one-off, application but rather a large enterprise solution that we will be adding features to over many years to come.

Thanks!


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    When creating a product with ASP.NET Zero what is the best or recomended practice when it comes to adding our own code. Should we add it to the orignal projects or should we create separate AbpModules and hook those into the original solution?

    We don't have a suggestion about this. Most of AspNet Zero users directly using the provided template but few others are creating a structure like you suggested. For upgrading an AspNet Zero solution to latest version, you can follow an approach like this https://docs.aspnetzero.com/en/common/latest/Version-Updating.

    You can also try to create a new structure with separate modules but it might take more time.

  • User Avatar
    0
    atideveloper created

    Thanks for the information.

    When you say most users directly use the provided template, do you mean they just add code to the modules that come with the default solution instead of adding new modules? Just want to make sure I understand what you are saying.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @atideveloper

    Yes, that's correct. And they use GIT to merge our changes into their project.

  • User Avatar
    0
    atideveloper created

    Thanks!

    We are currently using a local TFS server right now so maybe GIT would be better - something for us to consider later. I will move our source strucure towards how ASP.NET Zero is more typically used since that will have the least issues it sounds like.