Base solution for your next web application
Open Closed

3 Tier Architecture #3974


User avatar
0
verrrrrrrrrrrrrdi created

Hello,

Can you guide me to deploy aspnet zero solution on 3 tier architecture (Frontend Server & Backend Server)? How to split layer web to frontend server and other layer to backend server?

Do you have a complete tutorial to make this happen? Please help...


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

    Hi @Verrrrrrrrrrrrrdi,

    Only ASP.NET Core & Angular 4 version supports this, are you using this version ? If so, angular client (front end) & host app (server side) can be published seperately, see <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide-Angular#deployment">https://aspnetzero.com/Documents/Develo ... deployment</a>

    Thanks.

  • User Avatar
    0
    verrrrrrrrrrrrrdi created

    Hi @ismcagdas,

    I'm uisng asp.net mvc + Angular JS. So i can't separate front end and server side using this version? please help me.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Verrrrrrrrrrrrrdi,

    It might be possible but It will require a lot of work. Also, there might be some unexpected problems while doing this, so if you haven't develop so much pages, it will be easier to move to Angular 2 if you have knowledge of Angular 2.

  • User Avatar
    0
    verrrrrrrrrrrrrdi created

    Hi @ismcagdas,

    Can you give me a guidance ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Verrrrrrrrrrrrrdi,

    Do you want to move angular2 or change the angularJs version.

    If you want to angular2, then it will be easier. You can create a new template with same name and then you can move your cshtml/js files for your views into new AngularUI project. cshtml files will be html. You need to replace server side codes with client side versions. For example instead of "@L()" helper, you need to use "{l('LocalizableText')}".

    If you want to modify angularJs app, you need to first change cshtml files to html in this file <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Web/App/app.js">https://github.com/aspnetzero/aspnet-ze ... App/app.js</a>. Then you need to replace server side codes with client side versions (like localization, setting etc). You also need to do same thing for modals as well.

    But as you can understand it's not possible to explain it with all steps here. It's a hard thing to do, so we didn't do it for AngularJS version :).

    Thanks,

  • User Avatar
    0
    verrrrrrrrrrrrrdi created

    Hi @ismcagdas,

    I dont want to move my existing project to .net core & angularjs version, it will be take a lot of effort and time. I want to separate my existing version (.net mvc + angular) to 3 tier architecture. Also, i dont understand for this point server side codes with client side versions (like localization, setting etc) Can you make a documentation to explain all step to separate my existing version and send to my email? Please advise...

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Can you make a documentation to explain all step to separate my existing version and send to my email?

    We cannot do that, it is outside of AspNet Zero's support scope.

    server side codes with client side versions (like localization, setting etc)

    Currently, ASP.NET MVC 5.x and AngularJs version uses cshtml files for views and it is rendered on the server side. For example you can use code blokcs like @L("MyText") and it localizes MyText on the server side.

    You need to get all localizations via ajax request on your angular app's startup and then you need to localize your texts on the client side. You can check our angular2 version to understand it better.