Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it worth using 3-tier architecture for small(ish) applications

I'm working on a relatively small asp.net web application and am wondering if there is really a need to employ full n-tier architecture. For an idea of size; there are about 20 database tables.

In the past I have used a 2-tier approach where business logic and data access are grouped together into a single class library with was an asp.net web application forming the UI tier and this seemed to work OK.

Is there a threshold size or some rule of thumb where you should employ n-tier?

like image 720
Matthew Dresser Avatar asked Feb 05 '09 19:02

Matthew Dresser


1 Answers

It may be relatively small now but do you think it might grow in the future? Of your course you have to be pragmatic, but if you already have natural separations of concern within your single assembly then it's fairly easy to split that into two or more assemblies. If the classes themselves combine business logic and data access then you have more work on your hands. However, I'd argue that it's almost no more work to write your data access logic in one assembly and your business logic in the other, in parallel if required, than to write it all in one place in the first place.

like image 199
Adam Ralph Avatar answered Nov 09 '22 22:11

Adam Ralph