My 2c:

Generated files should, in theory, never be edited. They should be
regenerated as fit, OR, the generator should be altered to fix the
bugs/issues. Which means that yes, human edited files should be small
and generated files can go to whatever size they want. If you take a
hint from VS that would mean making the generated code partial AND
placing it in a 'generated' region.

e.g. In Form1.Designer.cs

partial class Form1
{
  public void Dispose(bool disposing)
  {
      //...
  }

  #region Windows Forms Designer Generated Code
  public void InitializeComponent()
  {
    //...
  }
  #endregion
}

Note that generated stubs should be in a abstract class and should be
overriden to ensure that changes are not lost on a re-generate.

This is just my 2c based on current practices.

On 07/04/2008, grover <[EMAIL PROTECTED]> wrote:
>
> I do have a problem with big source files. They usually become cluddered and
> you loose the big picture. I really love the partial feature and try to use
> it a lot to group things together, my naming scheme is ussually
> <classname>.<feature>.cs or alike. Classical coding guidelines were very
> strict about this, due to printing issues (e.g. few pages, max 80 chars per
> line). I still try to keep my files printable. So my why's are:
>
> - Easier to grasp, if things are placed together and not spread accross a
> large file (even though a lot of this can be achieved by smart use of
> #regions)
> - Printing, even though that's done rarely today.
>
> grover
> ________________________________
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Im Auftrag von Mircea-Cristian Racasan
> Gesendet: Montag, 7. April 2008 05:33
> An: sharpos-developers@lists.sourceforge.net
> Betreff: Re: [SharpOS Developers] Big Source Files
>
>
> The questions were rather "if" and "why" than "how".
>
> Chriss.
>
>
> 2008/4/7, grover <[EMAIL PROTECTED]>:
> > Use the partial feature in C# and group things, which belong together.
> >
> > Michael (aka grover)
> > ________________________________
> >
> > Von: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> Im Auftrag von
> > Mircea-Cristian Racasan
> > Gesendet: Montag, 7. April 2008 00:42
> > An: sharpos-developers@lists.sourceforge.net
> > Betreff: [SharpOS Developers] Big Source Files
> >
> >
> >
> > Hi
> >
> > As I am working on improving the x86 encoding towards JIT and so on and as
> > there were some rantings about the huge generated files, I want to ask you
> > guys if you want like many many small files or only one big file as is now
> > for the generated stuff?
> >
> > Chriss.
> >
> >
> >
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> > Register now and save $200. Hurry, offer ends at 11:59 p.m.,
> > Monday, April 7! Use priority code J8TLD2.
> >
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> > _______________________________________________
> > SharpOS-Developers mailing list
> > SharpOS-Developers@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/sharpos-developers
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Register now and save $200. Hurry, offer ends at 11:59 p.m.,
> Monday, April 7! Use priority code J8TLD2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> SharpOS-Developers mailing list
> SharpOS-Developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sharpos-developers
>
>


-- 
Jonathan

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
SharpOS-Developers mailing list
SharpOS-Developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sharpos-developers

Reply via email to