AS.PNET 2.0, runtime modules Best Practices

I

Ing. Davide Piras

Hi there,
we are rewriting our .NET 1.1 web application with VS. 2005 and .NET 2.0, it
takes big work but we believe there is a point to do that... at least we
hope!

we believe that:

1) the coding and debugging support of VS 2005 is much better and useful
than in VS 2003, so, better debug, easier life for the developers :)

2) is it true that just using the 2.0 runtime instead of the 1.1 we gain
about 20% of speed performance more? (I've heard something like this in the
past in some forums).

my main concern is about our custom modules, let's call them "plug in":

we have the main application (in .NET 1.1) that uses some pages and the bin
directory for assemblies... we have some modules that are just installed
putting the .dll in the bin folder then some .aspx and .ascx objects in
other web application folders... there is an installer that load the
assemblies reading some module.config xml files... that's it.

Now, in .NET 2.0, I've seen that the web site (which was the web application
project in VS 2003), contains ALL the objects in the folder tree so i cannot
put some ascx and aspx in a subfolder and let only the module's assembly to
use them... because the web site will try to compile and use them at debug
and compile time...

which one is the best way to make plugin and runtime modules in VS 2005 .NET
2.0 ASPNET 2.0 web sites ?

Thanks a lot in advantage, regards Davide.
 
C

Cowboy \(Gregory A. Beamer\)

If you read the material, it sounds like ASP.NET 2.0 is a "complete code"
release methodology. Put your code in App_Code, put your pages and controls
with their code behind and run.

You can do this, but I find it unwise on so many levels. You can add
libraries to a site and you can place your modules in the same way as 1.1.
Depending on how you accomplish this, you might have a few code tweaks, but
once you figure it out for one, you will be fine across the board. And, if
you download the optional web applications projects and web deployment
projects, you can work 2.0 very much like 1.1, including single DLL compile
of site:

Web Application Projects:
http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx

Web Deployment Projects
http://msdn2.microsoft.com/en-us/asp.net/aa336619.aspx

To your questions

1) Debugging, unit testing, code metrics are all part of 2.0. There are also
additional controls, esp. for ASP.NET, so you will gain some speed, after a
short learning curve. If you adopt testing and metrics, you will find the
quality of your code also improves.
2) I have found simply placing a 1.1 assembly on a 2.0 site improves
performance. If it is recompiled in 2.0, there is a slightly higher bump,
esp. if you refactor the code with the new bits in 2.0 (generics comes to
mind).
 
I

Ing. Davide Piras

Hello Cowboy :)

I was reading here: http://forums.asp.net/thread/1332884.aspx
there are people that give good points to avoid using modules... so actually
now I'm a little lost...

Look, I heard about "Web Application Projects" and "Web Deployment Projects"
but since when I started rewriting our web application in .NET 2, and now I
should call it "Web Site" since there is not anymore any web app project,
I'm making efforts to rewrite it clean and rebuilding, refactoring
everything (more or less)... so I really don't want to downgrade the design
to .NET 1.1... sincerely I've not yet studied the key points and benefits of
single file assemblies brought us from .NET 2.0, but I want to take
advantage completely of VS 2005 and .NET 2.0 so I'd to figure out how to
rewrite global.asax, assembly info and some other points in the new
environment... but now that this is done, my team is happy and excited to
work in the new scenario....

so we have actually to figure out if split the project (like it was in .NET
1.1) main web site and some class libraries with aspx and ascx too or if
keep all the as*x in the main web site and abstract modules in class
libraries so we can decide site by site to install (or activate) some
modules or not...
1) Debugging, unit testing, code metrics are all part of 2.0. There are
also additional controls, esp. for ASP.NET, so you will gain some speed,
after a short learning curve. If you adopt testing and metrics, you will
find the quality of your code also improves.

I tried to run my web app in 2.0 few times but there were bad errors and
nothing was working... and you cannot debug in Vs 2003 if it runs under .NET
2.0...
2) I have found simply placing a 1.1 assembly on a 2.0 site improves
performance. If it is recompiled in 2.0, there is a slightly higher bump,
esp. if you refactor the code with the new bits in 2.0 (generics comes to
mind).

Actually we are doing this... and within generics the design is much
better... now you tell me the performance too, wow! :)

Davide.
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top