ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Frappe and MVC?


#1

After learn how frappe works and also how make applications in it, I have been interested in best coding pratices, like modulate my application as an MVC.

I know that python MVC is different from the common, so I ask you guys for help to show me how you modulate your own applications, where are the controllers, validations, functions etc…

Thanks in advance!


Which design pattern is followed by Frappe Developers building the awsome framework?
#2

@Leonardo_Augusto

Frappe is an MVC arquitecture!

JSON Doctypes are Models
Python DocType Classes are the Controllers
JS is the View

The difference is that frappe is not MVC using URL mapping, like django or other frameworks
What Frappe does, is use use hash mapping that is an standard in SPA (Single Page Applications) in MVC world

If you know django.

Frappe APP’s are the same of Django Apps.