CBV vs FBV which one better for Complex web applications

CBV vs FBV which one better for Complex web applications
print('Write your honest opinion based on your experience")

It’s not a decision of “better” or “worse”. They are choices to be made - potentially on a view-by-view basis.

Some applications lend themselves to working extremely well with ClassBased views, some don’t.

There’s also nothing that prevents you from mixing the two within an application.

Ok in this case I should learn both of them. Am I right? or it is better to choose one of them

My opinion is that you do need to understand FBVs in order for CBVs to make sense.

I always suggest people learn from either / both of the Official Django Tutorial and the Django Girls Tutorial.

The official tutorial will introduce you to FBVs before introducing CBVs.

1 Like