Base solution for your next web application
Open Closed

Ways to customize the look and features available within my application. #6788


User avatar
0
commondesk created

**Issue 1: **

In the past, i asked some of my developers to remove features in the portal. For example, the language drop down and the recaptcha feature.

This worked fine until I asked them to upgrade to the latest template. Apparently, they commented out lines in the templates to remove the features I requested. In all, I found that they made over 70 changes to the templates. This results in a lot of work and testing, every time we want to upgrade.

So these changes are of two types, ones that are specific to my application and ones that are general. I would put the language dropdown in the general category.

In the case of recaptch, there is ngIf="useCaptcha" in register.coponent.html, and a typeScript method that calls 'App.UserManagement.useCaptchaOnRegistration'.

I thought this might be an undocumented pattern and I searched for "App.UserManagement". I found very few features settings to use.

I can’t find any documentation for this or any references as to best practices for enabling or disabling features in the portal.

Q: Is there any documentation on this? What is the recommended way to make modifications to template pages that will be updated?

Issues 2: I also see that some features are simply hidden from the use through the use of changes to style sheets. For example in the AppUiCusomizationService.ts, various styles are enabled when isLeftMenu() is true or false.

Again, i can’t find any documentation on this and im not sure how to use it.

Q: is this usable by end users or is it an internal feature?

Issues 3: Another issue is, how to add new modules to the system. We found that since we were adding many new pages, it would best to have these pages be located outside of the app, admin or main directory’s. This way we could just copy over one directory that contains all of the pages and a routing-module for these company-specific routes.

In addition, we created another directory that’s outside of the app folder for pages that do not need the branding and left side menus. So for these two changes we just need to copy over new directory and add a new path in the root-routing-module.ts and the app-routing-module.ts. But again, two more changes to make every time.

Q: We're not experienced angular developers. So i ask, is there a better way to do this?

In general, with new versions of template coming out every few weeks, it's very difficult to customize the portal, for the needs of my customers, when I don’t know how the system supports customization of existing controls.

I hope im wrong and there is a set of techniques that i'm unaware of.

I have some ideas for how this might be implemented if it does not exist.

Thanks


12 Answer(s)
  • User Avatar
    0
    commondesk created

    I found that this sort of addresses #3

    https://medium.com/@shairez/angular-routing-a-better-pattern-for-large-scale-apps-f2890c952a18

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    For issue #1, we actually don't have a good suggestion because AspNet Zero is mainly designed for project startups. If you don't modify the AspNet Zero's code or make minimal modifications, updating your solution might be easier. But in your case, it is a bit hard to update your solution to latest version.

    Or you can update the parts you want manually by looking at the commits we made.

    For issue #2, you can check classes under https://github.com/aspnetzero/aspnet-zero-core/tree/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Core/UiCustomization/Metronic

    For issue #3, unfortunately we don't have a documen for that but you can check the app module or the main module to add your new module and pages to that module. You can also check Angular's documentation.

  • User Avatar
    0
    commondesk created

    #1 Im not very experienced with git, but i beleve this is how i could accomplish my goals using git.

    If each release of your template we could

    • use git format-patch to extract the changes betwen subsequent releases of your templates
    • fork our library
    • apply the output of your format-patch to our code

    But this all would start by generating the patch files. Im not sure if i can generate a patch file from your repo. Im going to investigate this.

    If anyone has done this PLEASE let me know. As I said, i'm a nube when it comes to git.

    #2 i'm locked out of this, can you approve my account @mbalsam-refind to view these links.

    #3 Dont get me wrong, i really like all of the new features and improvements you're making. I also like the fact that you just reworked your documentation. But in my humble opinion, as a company, you need to invest more time in documentation.

    Example, i spent 1/2 a day and rewrote your documentation on how to run aspnetzero on a mac, but for Ubuntu, where there is no Visual Studio for Mac. I had to review three different documents. I made a separate page on our internal wiki. As a customer, I should never have to do that. Agree?

    I have a few suggestions as to how you can make this process easier. Let me know if your interested, or i guess i will need to implement them on my own. If your not the decision maker please send me their contact info.

    But i think you should consider this. You say "AspNet Zero is mainly designed for project startups", but if these "project startups" are successful they will have the same problems as i just listed.

    Your sort of telling me, well "WHEN" you move beyond the "startups phase", Aspnetzero is NOT for you.

    I don't think you want to tell me that, but it is what you're telling me.

  • User Avatar
    0
    commondesk created

    It would go something like this

    https://stackoverflow.com/questions/6658313/generate-a-git-patch-for-a-specific-commit

    You would to this

    git format-patch -1 HEAD

    And then publish the patch file along with the commit.

    We would download the patches and apply them like this

    git am < file.patch

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @commondesk

    I couldn't understand how that works, I will look into that.

  • User Avatar
    0
    commondesk created

    One way it might work is:

    You will need to create patch files (delta's) that represent the differences beween each of your template releases. This can be easily automated by git. If you have 100 files and only 5 are changed, git will detect this and generate 5 patch files. I'm also learning about git, but its possible that the developer could do this step.

    When each developer wants to upgrade to the next release of the template we will apply those patch files to our modifyed template files. Yes there will be merge conflicts as is expected in all version control systems. But these merge issues will be specific to each customers changes and the developer will be expected to support it.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I think you can achieve something like that using one of the approaches below:

    1. https://github.com/aspnetzero/aspnet-zero/issues/96 2. https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=2486#p5511

    What do you think ?

  • User Avatar
    0
    commondesk created

    i'm locked out of this, can you approve my account @mbalsam-refind to view these links.

  • User Avatar
    0
    aaron created
    Support Team

    To access the ASP<span></span>.NET Zero private GitHub repositories, invite yourself to become a member of the ASP<span></span>.NET Zero organization using your GitHub username: https://aspnetzero.com/LicenseManagement

  • User Avatar
    0
    commondesk created

    Were working on your above listed approach and will give feedback in a few days.

  • User Avatar
    0
    BobIngham created

    Issue #3 - the linked document may help. It's some notes I made when starting out with Zero over a year ago. adding a module to Angular Issue #1 - this is where I started from, I recommend using Visual Studio for the merge process and not Visual Code. Thanks to @jmhinnen. ABP + Module Zero + ASP.NET Zero

  • User Avatar
    0
    ismcagdas created
    Support Team

    Please open another issue if you are still facing any problems.