Admin Methods


https://forum.kartris.com/Topic6790.aspx
Print Topic | Close Window

By Tiggywiggler - Fri 11 Nov 2016
In the source code we have front end methods and back end methods separated by the use of an underscore (_). For example

Front End Method
BasketBLL.AddNewBasketValue()

Back End Method
OptionsBLL._GetOptionGroupPage()

Apart from showing coder what the INTENTION is behind the method, are there are other concerns that would prevent someone using a Back End Method for a Front End use? For example, is there anything stopping me using OptionsBLL._GetOptionGroupPage() to display information to the end user?

Obviously we have to be careful about what is in the data and weather or not we are exposing some sensitive data, but beyond that was is the restriction. Examples of possible restrictions I can think may apply:

Security Context
If a method is shared and admin methods are less likely to be duplicated

Anything really?
By Paul - Wed 8 Feb 2017
Bit old question but hoping this helps.

It was really a convention we've had from a long time back. In the old days with our first ecommerce software, a classic asp cart, all the asp files were in the root because having everything there made it easier to share include files. To help distinguish the back end files from the front end ones, we used an underscore in front, because then the back ones all sorted together alphabetically.

While .NET makes it easier to have a separate Admin folder, and that makes it simpler to apply security from IIS on just the back end, or have separate rules in a web config for just the back end, we still kept the convention of using underscores for back end items. Similarly in SQL, we found doing this for sproc names also helped keep them separate. And the convention carried over into quite a lot of the coding too.

In most cases, there is nothing stopping you using a front end sproc on a back end task and vice versa, similarly with BLL functions and so on, though we've tended to keep them separate because often back end ones will work slightly differently especially in terms of (a) security (b) language handling (e.g. back end functions might link in to the user ID and assume an admin logged in, or may need to display all items regardless of the chosen language, whereas front end ones will typically only display items from the viewing language).
By Tiggywiggler - Mon 20 Feb 2017
Thank you for that mate. Your answer makes perfect sense. Marked as answer Smile