<p>Craft gives you the 'best of both worlds' in this regard with the <a href="https://craftcms.com/docs/3.x/project-config.html" rel="nofollow noreferrer">project config</a>. You can just create fields, sections and entry types through the interface. Every change you make is automatically saved to a declarative config in the form of YAML files in your <code>config</code> folder. Then you can commit the project config directory to git, deploy those in your other environments and use <a href="https://craftcms.com/docs/3.x/console-commands.html#project-config" rel="nofollow noreferrer">console commands</a> to apply the configuration.</p>
<p>You can read more here:</p>
<ul>
<li><a href="https://craftcms.com/docs/3.x/project-config.html" rel="nofollow noreferrer">Craft documentation on Project Config</a></li>
<li><a href="https://craftcms.com/knowledge-base/deployment-best-practices" rel="nofollow noreferrer">Deployment Best Practices in the Knowledge Base</a></li>
</ul>

CC BY-SA 4.0
2022-01-26T11:54:46.677Z
Great resources thank you.
BrokenCode
CC BY-SA 4.0
2022-01-26T10:20:48.380Z
2022-01-26T10:20:48.380Z
MoritzLost
<p>so I am new to Craft CMS, and would like to understand the Craft developer workflow.</p>
<p>Currently I have been developing on EpiServer using C# in Visual Studio. We have a dev, staging and production environment hosted on Azure.</p>
<p>My current workflow is that when I need new fields or properties, I create them in code. Then I can build html/javascript/etc features that use these fields. And push them through GIT to the development server and from there through Azure deploy the changes to staging and then to production.</p>
<p>Is something similar possible with Craft? I mean is there a &quot;Craft way&quot; of creating fields through code? So that one can push these changes to staging for example and have the fields and html/js/css appear there for testing and then push them on to production?</p>

<craft3><field>
The craft way of creating fields through code?
# The craft way of creating fields through code?

(Asked by: username_0 on 2022-01-26)

so I am new to Craft CMS, and would like to understand the Craft developer workflow.

Currently I have been developing on EpiServer using C# in Visual Studio. We have a dev, staging and production environment hosted on Azure.

My current workflow is that when I need new fields or properties, I create them in code. Then I can build html/javascript/etc features that use these fields. And push them through GIT to the development server and from there through Azure deploy the changes to staging and then to production.

Is something similar possible with Craft? I mean is there a "Craft way" of creating fields through code? So that one can push these changes to staging for example and have the fields and html/js/css appear there for testing and then push them on to production?

**Tags:** craft3, field

---

## 1 answers

### Answer by username_1 on 2022-01-26. Score: 3 | Accepted answer

Craft gives you the 'best of both worlds' in this regard with the [project config](https://craftcms.com/docs/3.x/project-config.html). You can just create fields, sections and entry types through the interface. Every change you make is automatically saved to a declarative config in the form of YAML files in your `config` folder. Then you can commit the project config directory to git, deploy those in your other environments and use [console commands](https://craftcms.com/docs/3.x/console-commands.html#project-config) to apply the configuration.

You can read more here:

* [Craft documentation on Project Config](https://craftcms.com/docs/3.x/project-config.html)
* [Deployment Best Practices in the Knowledge Base](https://craftcms.com/knowledge-base/deployment-best-practices)

> **Comments:**
> **username_0**: Great resources thank you.  

---

