Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I recently experienced the exact same at work. Lots of ad-hoc code that needed to be structured and organised.</p> <p>Its real hard at first, since there is so much. I think the best advice I could give is to just <strong>invest time in it</strong> on the wind down on a Friday afternoon, for a couple of weeks I would just pick an app/chunk of code, examine what was there, think about what we could make generic, copy it, put it into the new library wherever I thought it should be. Once I had all the code within an application migrated, I would then work on refactoring the application to work from the common framework.. This sometimes caused problems that needed to be fixed, but so long as your thorough it shouldn't be too big a deal.</p> <p>Piece by piece, thats the only way to do it.</p> <p>In terms of structure, I tried to kind of mimic the MS namespacing since for the most part its pretty logical (e.g. <em>Company.Data</em> , <em>Company.Web</em> , <em>Company.Web.UI</em> and so on.</p> <p>One of the major benefits is probably the amount of code dupe removed. Yeah a little refactoring was required in the apps, but the code base is a lot leaner, and in many ways "smarter".</p> <p>Another thing I noticed is that I would often have problems trying to figure out <em>where</em> to put stuff (in terms of namespacing) since I wasn't sure what it belonged to. Now this <strong>really</strong> concerned me, I viewed it as such a bad smell. Since the re-org everything now falls in to space much more nicely. And with the (now very small amount) of application specfic code, they get put into <em>Company.Applications.ApplicationName</em> This helps me really think about business objects a lot more since I dont want too much within this namespace, so I come up with more flexible designs.</p> <p>Sorry for the long post.. It's kind of rambling!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload