Professional Web Applications Themes

Best Practices - solution - namespaces - classes - ASP.NET General

I would say that the projects should be divided logically into reusable units, not too big, not too small. Most times, most of your projects are built into a class library, which is a .dll that someone else can use in their project, or know is in the GAC, etc. You want to structure them logically, whatever makes the most sense. Most often you'll have a security library (project/dll), data access library, etc., as these are components most other projects need, and is the logical unit they'd borrow at. Then all you have left are the actual projects that are ...

  1. #1

    Default Re: Best Practices - solution - namespaces - classes

    I would say that the projects should be divided logically into reusable
    units, not too big, not too small. Most times, most of your projects are
    built into a class library, which is a .dll that someone else can use in
    their project, or know is in the GAC, etc. You want to structure them
    logically, whatever makes the most sense. Most often you'll have a security
    library (project/dll), data access library, etc., as these are components
    most other projects need, and is the logical unit they'd borrow at.

    Then all you have left are the actual projects that are your applications.
    They use these class libraries you've already built.

    My opinion is that there should only be one class per file. It's an old
    habit from Java, and makes it easier to navigate thru your code.

    And yes, everything should go into a namespace, which can also be set at the
    project level. But I recommend another old Java habit, of having all
    namespaces start with your company's internet domain name backwards...if you
    are company ABC at abc.com (just pretend :-) ), then all packages from your
    company should be named

    com.abc.security
    com.abc.apps.app1
    com.abc.....

    etc. This way, if you ever distribute your library, you're almost assured
    it will have a unique namespace. Don't know if this practice ever caught on
    in .NET, but it was the way we did it when I used to do Java....

    HTH, just some ideas....

    --
    Craig Deelsnyder
    Microsoft MVP - ASP/ASP.NET


    "Vincent V" <vincentv-n0-5pam-optushome.com.au> wrote in message
    news:OXKtjNbWDHA.3232tk2msftngp13.phx.gbl...
    > Hey i am just starting a new project
    > and from the start i want to make sure my app is as Object Orientated as
    > possible
    >
    > I have a couple of questions in relation to this
    >
    > Question 1:
    > Should i Struction my solution in numerous projects ie
    > 1. Webpage Files(ui)
    > 2. Classes
    > 3. Web Services
    > 4. Mobile Pages
    >
    > Question 2:
    > How should i structure my classes
    > Should i have many .vb class files with one Class in each vbfile
    > Should i put many related Classes in one vbfile
    > Should i structure all my class files into namespaces
    >
    > Question 3:
    > Any one have any good info related to .net best practices(apart from the
    ms
    > practice docs)
    > ANy one have any info on best css practices
    >
    > Thanks
    >
    >
    >

    Craig Deelsnyder Guest

  2. #2

    Default Best Practices - solution - namespaces - classes

    Hey i am just starting a new project
    and from the start i want to make sure my app is as Object Orientated as
    possible

    I have a couple of questions in relation to this

    Question 1:
    Should i Struction my solution in numerous projects ie
    1. Webpage Files(ui)
    2. Classes
    3. Web Services
    4. Mobile Pages

    Question 2:
    How should i structure my classes
    Should i have many .vb class files with one Class in each vbfile
    Should i put many related Classes in one vbfile
    Should i structure all my class files into namespaces

    Question 3:
    Any one have any good info related to .net best practices(apart from the ms
    practice docs)
    ANy one have any info on best css practices

    Thanks



    Vincent V Guest

Similar Threads

  1. Web services and namespaces
    By Erik Cruz in forum ASP.NET Web Services
    Replies: 4
    Last Post: August 13th, 07:50 PM
  2. DataGrid dataProvider XML with Namespaces,
    By dan19460 in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: April 21st, 08:28 PM
  3. How does a DLL change namespaces?
    By Bruce W...1 in forum ASP.NET Web Services
    Replies: 3
    Last Post: December 1st, 09:00 PM
  4. RubyDotNet r4 and namespaces
    By James Britt in forum Ruby
    Replies: 4
    Last Post: September 27th, 02:29 PM
  5. Duplicate Namespaces
    By Garret in forum ASP.NET Web Services
    Replies: 0
    Last Post: August 25th, 12:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139