Code Organization ... Really need advice

S

shapper

Hello,

Lately I have been working with ASP.NET MVC and C#.

I have been building a lot of code and I am struggling to find a good
way to organize it.

I am posting some of the code I have been building:

HTML Helpers
Create new HTML MVC Helpers.
These helpers are used on various projects I am working on.

Example: Html.ToolTip

Papers
Classes that wrap Model (Linq to SQL) classes to add extra
properties and functionality.

Example: PostPaper, TagPaper, ...

ViewData
Classes that contains objects to pass from View to Controller and
vice versa.
These classes are local to the project. But because of similarity I
might use similar in other projects.

Example: PostViewData might contain: List<Post>, Post,
BlogStatistics, ...

Extra Functionallity
Classes that I use to extend some System object functionality.

Example 1: PagedList extends List functionally.
Example 2: SlideShowPro (Contains methods that mantain XML files
for SlideShowPro Flas component)

Assets
Class that contains methods that retrieve some kind of data.

Example: GetCountries returns a SelectList for use in DropDownList
on my project.

I am having some problems with code organization in namespaces.

And, for example, should I add PagedList to a namespace and class of
my own or added it System.Collections.Extension ...

When should I keep something on my namespace or added it to a System
namespace?

Any suggestions would be great.

This is getting confusing.

Thanks,
Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top