c#


Namespace within a project or separate project


I'm trying to read about best practices in C# development. I came across people creating different class library projects within a solution. I have been developing solutions for C# but never create separate projects for my classes. Though, some of my projects were small. To separate my namespaces, I normally create folders. Are there any good reason why I should create a separate project for my class modules?
Reason to create a separate project:
When we create a project of type Class Library, after the build the MSbuild process spits out an assembly/ dynamic linked library or .DLL file. This .dll file can be referenced in any project in the same or other solution. This supports the code reusability.
A general rule of thumb for a web based (ASP.Net MVC) solution structure is given as below:
Create a Domain Model project (Class Library project type)
Create a Data Access Layer (Class Library project type)
Create a Service Layer project (Class Library project type)
Create a UI Layer project (ASP.Net MVC project type)
Create the unit test projects (Class Library project type) for each project listed above.
Hope this helps.

Related Links

RijndaelManaged encrypt replacement of Enterprise Library
Error In DATABASE RESTORE
Click-Once or MSI Install
Use of Nullable Type in method gives error
MVC 5 - The type arguments for method “…” cannot be inferred from the usage. Try specifying the type arguments explicitly
Invalid attempt to read data when no data is present when getting all values from a row in a SQL Server table
DbContext Set method
Sitecore Multiline Text field, convert string to html
Async using Microsoft.Bcl.Async on .net 4.0 in Visual Studion 2012
Speeding up Parallel.ForEach iterating through datatable and rendering crystal report as byte stream
The Name 'CommonFolderQuery' does not exist in current context
caching a page with data from database asp.net
Web API 2 - restful service - URL encoded
Can't print out text from textbox with threads.
Detect slow running SQL query in C# code behind
Animating BorderBrush from DynamicResource animates everything using that brush

Categories

HOME
redux
macros
sql-server-2014
gsm
azure-eventhub
abc
boxplot
watson-iot
crm
crash
sms
xss
ms-access-2010
gnuradio
markdown
scapy
genexus
ionic-native
angularjs-ng-repeat
spring-data-solr
ndepend
dynamics-crm-2011
virtualenv
captcha
eclipse-orion
tag-cloud
hl7-fhir
connectiq
ps
jira-zephyr
pixels
continuous-fourier
stack-trace
osgi-bundle
paper-trail-gem
ios9
schedule
storefront
favorites
jsonapi-resources
matlab-compiler
certbot
outlook-2010
server-side-swift
icu
wicket-tester
vertical-alignment
file-descriptor
glide-image-library
flume-ng
superclass
smooth-streaming
synchronized
ocamlbuild
spring-webflow-2
spring-data-commons
django-tables2
jenkins-docker
htop
r-commander
boost-regex
programming-pearls
totalview
iban
pyautogui
blackberry-webworks
eclipse-mars
x12
networkstream
deck.js
vitamio
salesforce-service-cloud
video-embedding
firefox-os
app-data
notice
textblob
android-filterable
p4python
targetprocess
google-experiments
numerical-recipes
crystal-reports-7
iphone-6
kss
lwuit
famous-engine
oxygenxml
switchpreference
email-headers
kernel-density
friendly-url
coinbase-php
architectural-patterns
volatility
netzke
shapado
aspmenu-control
reflexil
jqueryi-ui-buttonset
visual-leak-detector
zend-validate
opendir
activescaffold
coderush-xpress
onresize
unauthorized
managed-code
cross-cutting-concerns

Resources

Encrypt Message