Frappe
Products
Framework
DocType
Frappe
Products
Insights
features
DocType
Crafting each object in your application from scratch can feel like redoing the same puzzle over and over. All complex systems are built with simple building blocks, and the basic building block of Frappe Framework is a DocType. It is the model+view+controller for your application.
A DocType not only manages your schema, but also other information about how your data behaves in the system. This is called "metadata". Since this metadata is also stored in a database table, it makes it easy to change it on the fly without writing code. Changing the metadata will change the schema and the user interface automatically.
1.
Modules and controller
2.
Object Relational Model
3.
Customizing DocType
4.
Virtual DocType
5.
Permissions
Modules and controller
Frappe Framework’s philosophy of standardised building blocks leads to “Convention > Configuration > Code”. Every DocType you create automatically follows a set of conventions, so you don’t need to worry about wiring things up manually.
A DocType always belongs to a module, neatly organising related models and their respective code files. This structure simplifies everything from development to maintenance. The controller file for each DocType, a Python class extending from frappe.model.Document, handles all the heavy lifting — loading, parsing, and saving data.
With these conventions in place, you can focus on customising where it counts. Add custom methods, use controller hooks, or even override predefined document methods to tailor your app’s behavior to your needs.
Object Relational Model
Frappe’s built-in ORM converts database tables into Python classes, simplifying data manipulation. Instead of crafting complex SQL, you interact with objects in Python. This means less time debugging queries and more time building features. Dive into your data with ease and skip the SQL headaches.
Customizing DocType
Need to add a new field, reorder existing ones, or tweak metadata and configurations? It’s all at your fingertips. Just make the changes directly in the UI—no code, no redeployment, no hassle. With Frappe Framework, you can customize things on the fly, even after deployment. No more waiting around for a new app version just to tweak a field.
Virtual DocType
Working with external data sources often means dealing with the headache of integrating and managing multiple systems. With Virtual DocType, you can link your external data source directly to Framework. Developers get the power to interface with their own databases, while using a ready-made UI and out-of-the-box CRUD features. It’s like getting a custom-built interface for your external data source without the usual coding chaos.
Permissions
For each DocType, you can set precise role-based permissions, defining who can read, write, create, delete, export, or print data records. It’s like giving everyone in your team just the right keys they need — no more, no less.
Know more about users and permissions
next feature
Desk UI
Read next: Upgrade