473,516 Members | 3,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Code Organization ... Really need advice

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
Sep 9 '08 #1
0 708

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5901
by: Jo Vermeulen | last post by:
Hello, I was wondering if Java supports a feature of C# (or .NET in general), namely compiling code at runtime. This is nice for scripting purposes. Users can script the application in real programming languages (such as C#, VB.NET, ...). This is done using the System.CodeDom.Compiler namespace, if I recall correctly. ...
26
2911
by: Michael Strorm | last post by:
Hi! I posted a message a while back asking for project suggestions, and decided to go with the idea of creating an adventure game (although it was never intended to be a 'proper' game, rather an excuse to write- and learn- some C++). To cut a long story short, I wrote a fair chunk of it, but realised that it's... not very good. Okay, it's...
45
3557
by: Steven T. Hatton | last post by:
This is a purely *hypothetical* question. That means, it's /pretend/, CP. ;-) If you were forced at gunpoint to put all your code in classes, rather than in namespace scope (obviously classes themselves are an exception to this), and 'bootstrap' your program by instantiating a single application object in main(), would that place any...
171
7596
by: tshad | last post by:
I am just trying to decide whether to split my code and uses code behind. I did it with one of my pages and found it was quite a bit of trouble. I know that most people (and books and articles) like it because you can split the code from the design. That is logical. But if you are the only one working on the code, it seem a little...
1
1304
by: RayS | last post by:
I've begun a Python module to provide a complete interface to the Meade LX200 command set, and have searched for a style/development guide for Python Lib/site-packages type modules, but only saw guides for C-modules. I realize that I need to make some changes to follow http://www.python.org/doc/essays/styleguide.html better. Does anyone have...
15
4565
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to communicate with a MySQL database table on a web server, from inside of my company's Access-VBA application. I know VBA pretty well but have never...
0
1141
by: Eric | last post by:
We've got a fairly large legacy ASP site, consiting of one main website with a lot of sub-folders organized in a tree under the main site. We don't use IIS Application/Virtual directories other than the main website root directory (one big application with groups of pages located in sub-folders). I'd guess we have over 200 pages now and it's...
6
1309
by: Jeff Gardner | last post by:
Greetings: I am attempting to get conditional output based on POSTed form data. If the posted value is either the key or value of an array, $x=key and $q=foo. elseif it is neither key nor value(I tried || too) , $q=bar. Even though $x is properly assigned the new value, $q always ends up being bar. Abstractions aside, here's the code: ...
8
1291
by: Ramon F Herrera | last post by:
I have been reading the book "Thinking in C++", and frankly, I am getting sick and tired of the simplistic examples. I am ready to jump head first. Since we are talking generic, textbook type of programs, they will have to be GUI-less. -Ramon ps: Windows-specific code need not apply.
1
1077
by: shapper | last post by:
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
0
7273
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7574
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7547
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5712
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5106
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3252
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
487
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.