How to decide that multiple class library projects are required.http://forums.asp.net/t/1770241.aspx/1?How+to+decide+that+multiple+class+library+projects+are+required+Mon, 05 Mar 2012 14:11:55 -050017702414835307http://forums.asp.net/p/1770241/4835307.aspx/1?How+to+decide+that+multiple+class+library+projects+are+required+How to decide that multiple class library projects are required. <p>Hello Friends,</p> <p>I am asking more of a fundamental questions which might sound rather obvious. What is the logic to decide that we should create multiple class library projects in a solution?&nbsp;</p> <p>For e.g: I am planning to create a application for a client, which is like a ERP and would have multiple modules like Inventory, Purchase, Sales, Accounting, Manufacturing, CRM, etc. Now, there are two ways through which i can design the solution.</p> <p></p> <p>First is create a Solution in .NET and add class library project for business logic and website project for each of the module for UI.</p> <p></p> <p>Or&nbsp;</p> <p>Secondly, create multiple solutions for each of the module and each solution would have two project, one class libary for Business logic and one website project for pages.</p> <p></p> <p>Now, i am not sure which one is right and what are the deciding factors on which we decide whether to go with option 1 or 2. &nbsp;DO let me know if there are some better option as well.</p> <p></p> <p></p> 2012-02-16T07:21:59-05:004835601http://forums.asp.net/p/1770241/4835601.aspx/1?Re+How+to+decide+that+multiple+class+library+projects+are+required+Re: How to decide that multiple class library projects are required. <p>Good question</p> <p>We are splitting the project into many smaller projects, because</p> <ul> <li>Abstraction </li><li>Maintainable </li><li>Updatable </li><li>Error identification </li><li>Individual project can use in another solution </li></ul> <p>SOA kind of project can execute separate environment, so possible to reduce workload, for example if a project spitted into</p> <ol> <li>UI </li><li>BLL </li><li>DAL </li></ol> <p>All three, layer are executing individual system; when UI receive any request it send to the another system; logic verified and send to another DAL system; here workload of UI, BAL and DAL would be reduced; also DAL keep on changing their version, not necessary to outage on production (some time expect); can update easily. And most important is <strong>abstraction</strong>, necessary only we need to show; whoever working for BLL they no need to know how DAL build and connectivity.</p> <p>Hope you understand!!!</p> <p><span style="text-decoration:underline">Please have a look</span></p> <ul> <li><a href="http://www.4pm.com/articles/Organization_PM_Tiers.pdf">http://www.4pm.com/articles/Organization_PM_Tiers.pdf</a> </li><li><a href="http://www.mostlydevelopers.com/blog/post/2011/07/28/n-Tier-Architecture-Introduction-Part-1.aspx">http://www.mostlydevelopers.com/blog/post/2011/07/28/n-Tier-Architecture-Introduction-Part-1.aspx</a> </li><li><a href="http://shoutingwords.com/creating-3-tier-layered-application-using-c-sharp.html">http://shoutingwords.com/creating-3-tier-layered-application-using-c-sharp.html</a> </li></ul> <p>&nbsp;</p> 2012-02-16T09:35:12-05:004840069http://forums.asp.net/p/1770241/4840069.aspx/1?Re+How+to+decide+that+multiple+class+library+projects+are+required+Re: How to decide that multiple class library projects are required. <p></p> <blockquote><span class="icon-blockquote"></span> <h4>TusharDave</h4> I am planning to create a application for a client, which is like a ERP and would have multiple modules like Inventory, Purchase, Sales, Accounting, Manufacturing, CRM, etc.</blockquote> <p></p> <p>It soundls like you would like to use a traditional 3-layer UI-BLL-DAL architecture to design your system which is appropriate based on your description. It really is fine to have a&nbsp;<em>single&nbsp;</em>.NET solution that contains (3) different projects as displayed below:</p> <p>Solution -&gt; MyWebApp</p> <p>UI -&gt; MyCompany.MyWebApp.UI</p> <p>BLL -&gt; MyCompany.MyWebApp.BLL</p> <p>DAL -&gt; MyCompany.MyWebApp.DAL</p> <p>All of the different 'modules' you highlighted are really 'classes'. You should at a minimum have 1 class for each if the topics you listd (maybe more as you begine to lay out the design and how everything interacts).</p> <p>The only reason to refactor out any individual class into its own project or even solution is if you needed it across many applications and wanted to share it is a WCF service or some other reusable component (.dll). Otherwise having all of the logical layers (projects) within one solution should work just fine.</p> 2012-02-20T02:11:32-05:004864522http://forums.asp.net/p/1770241/4864522.aspx/1?Re+How+to+decide+that+multiple+class+library+projects+are+required+Re: How to decide that multiple class library projects are required. <p>Mastan Oli hit the nail on the head.</p> <p>Here's how we do it:</p> <p>Project.Web (UI)<br> Project.Controls (reusable .ascx controls, like GridView data)<br> Project.BusinessLogicLayer (code between UI/Controls to DataAccessLayer)<br> Project.BusinessObjectLayer (class object directly built from database tables)<br> Project.DataAccessLayer (code to access db)</p> <p>We modeled this from Spaanjaar's series:&nbsp; <a href="http://imar.spaanjaars.com/476/n-layered-web-applications-with-aspnet-35-part-1-general-introduction"> http://imar.spaanjaars.com/476/n-layered-web-applications-with-aspnet-35-part-1-general-introduction</a></p> 2012-03-05T14:11:55-05:00