国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
Directory Structure For Projects
Directory Structure For Projects

That last part in the title is to indicate that for me, this is something that has changed several times over the past year with a change happening even within the last month.

Let me stress the fact that I am a big automated build junkie, and am not really even a fan of compiling from within studio. To that end I do the majority of my work using studio + ReSharper as the editor, and NAnt (currently) as the compile/test tool coupled with FinalBuilder as my deployment tool.

Here is a snapshot of a root directory of one of my current projects:

Let’s break each of these items down so that there is a bit of explanation behind each one. Don’t worry about the .svn folder or the folders with underscores in front of them.

The config dir

This directory contains all of the files related to the configuration of the application. Things that I typically put in this directory are:

  • app.config file template (if you are not sure of the concept of file templates check out my NAnt starter series).
  • NHibernate mapping files (typically placed in a folder called mapping)
  • Log4Net config file template
  • Boo file template to configure Windsor

The docs dir

This directory should be fairly self explanatory, as it contains documentation artifacts related to the project. These can be things like stories, diagrams etc.

The lib dir

This directory contains all of the third party libraries that will need to be deployed to the client/server machine. Keep in mind that 3rd party libraries could also be app specific versions of in house libraries that you share between projects.

The src dir

This directory contains all of the code related artifacts that belong to the project. This application usually consists of the following 2 root directories:

  • app – Contains all of the code that will be compilable units that get deployed to production.

 

  • test – Contains all of the code that is related to testing the code that will get deployed.

I often break the test directory down into different subdirectories to clearly identify the types of tests that are contained:

  • unit
  • integration
  • ui

The src directory is organized in this structure so that I can quickly choose to ignore/include files that I want when I am compiling for either test or deployment.

The tools dir

This directory contains all of the supporting third party libraries that are there to serve the purposes of build automation, testing etc. Libraries that you might expect to find in here are:

  • NAnt
  • MBUnit/NUnit
  • NCover
  • NCoverExplorer
  • RhinoMocks

These libraries are essential during the build process, but they do not need to be present on the deployment machine as they are there to support the needs of automating and testing the application.

The local.properties.xml file

This file is there to account for the differences in individual machine configurations without cluttering the build file with knowledge of each specific developers machine in a team environment. Machine specific settings are kept in this file that each developer maintains their own copy of, and the settings in the file get leveraged during the build process to carry out the build automation tasks on each developers machine.

You will also note, that in the above diagram, I place my solution file right at the root so that it is quickly accessible and can be opened right from the checkout unit.

As you can imagine this physical folder structure does not correlate to what you would see in studio, as unfortunately, studio comes up with its own way to view your world.

In a latter post I’ll talk about how I have abandoned the notion of multiple projects inside of studio, in place of trusting developers to follow correct layer separation. This can be done, because once you stop using Studio as your build engine, a world of possibilities open up to how you go about laying out the physical code in your code base.

Why

The purpose for having this structure that I have outlined above is to have a completely atomic unit for your project. The goal being that someone new to the team, with a fresh install of the .Net framework (not even studio), should be able to check out the above project, make the appropriate machine specific changes to the local.properties.xml file, and run build.bat to compile and test the application. One of the directories that you don’t see in the image above, that is usually present on other apps that I write is the sql directory. As you can imagine, this directory contains all of the sql artifacts related to the project. Again, if a new developer checks out for the first time and tries to build/test, if there are databases to be created, they will be created, and then the code will compile and test.

Again, once you introduce the concept of build automation whether it be with NAnt, Rake etc, it opens the door and your mind to different possibilities with regards to how you go about laying out your project. No longer is your deployment model constrained to how you build your x number of projects in studio. You could have one physical project with 15 different folders that convey different namespaces/layers of the application (which you would originally have been using separate projects for) and you could choose in your build script to compile folders 1 – 5 into one assembly 6 -8 into another assembly etc. It is completely up to you.

There are so many other things that you can do when you start using this type of structure.

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Best Practices for Organizing Projects
Getting To Know Alloy (Part One)
Türchen 16: Magento is not Zend Framework ? Magento Blog für Entwickler und eCommerce
FreeRTOS
Package Cloud Workloads with TOSCA Cloud Service Archive
Summer of Code Scala Projects
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服