# Code Separation from Config

> Best practices for keeping logic code separate from UI configuration files.

Source: https://docs.apimaker.dev/v1/extensions/ui_maker/code_separation_from_config.html

!!! deprecated "UI Maker is deprecated"
    UI Maker is kept for the projects which use it and will be removed in API Maker v4. New admin screens are better built with any frontend framework on top of the [generated APIs](/v1/docs/apis-all/overview.html).

👉 By using this feature we can make config file small and more managable.<br/>

## Call function from main file.

![2Ffirst_name_blur_from_main_file](/v1/extensions/img/first_name_blur_from_main_file.png)
<br/>

```typescript
let dbMasterConfig: T.IDBMasterConfig = {
    form: {
        fields: [
            [{ // field
                label: 'First Name',
                control: T.EDBMasterFormControl.input,
                path: 'name',
                inputTextSettings: {
                    jsCode: [{
                        appendTo: T.EDBMasterInputTextAppendTo.blur,
                        code: `userUtils.Main.first_name_blur`, // 👈 Call function like this.
                    }],
                }
            }]
        ]
    }
};

```

## Call function from common utilities

👉 These functions are common across UI Pages, you can call them from any page.<br/>
👉 You can click on this icon to open page to manage common utilities.<br/>

![2Ffirst_name_blur_from_main_file](/v1/extensions/img/common_utility_navigation.png)
<br/>

![2Ffirst_name_blur_from_main_file](/v1/extensions/img/general_utils_name.png)
<br/>

![2Ffirst_name_blur_from_main_file](/v1/extensions/img/general_utils_print.png)
<br/>
<br/>

```typescript
let dbMasterConfig: T.IDBMasterConfig = {
    form: {
        fields: [
            [{ // field
                label: 'First Name',
                control: T.EDBMasterFormControl.input,
                path: 'name',
                inputTextSettings: {
                    jsCode: [{
                        appendTo: T.EDBMasterInputTextAppendTo.blur,
                        code: `userUtils.GeneralUtils.printTodayInConsole`, // 👈 Call function like this.
                    }],
                }
            }]
        ]
    }
};

```
