The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

classes/asp/php

The discussion at hand is about .NET, not ASP. ASP.NET most certainly has include, in fact on a much higher level than PHP does, as you can have classes and superclasses and simply inherit from one to another, cascading down through your application (web or otherwise).

In fact, you could (and we do) have a few base superclasses which you simply import into every web or real application, and allows those to function. Thus, we only maintain a few sets of superclasses instead of a variety of sites

Much better than paltry include();

And you're suggesting that you can't have classes which inherit from other classes in PHP? I have classes that inherit in PHP *and* I can arbitrarily include code from external files and have it fit in, and it'll be treated as if it was in that location in the original file. All I see in ASP.NET is server.execute() methods which aren't the same thing because the currently scoped variables aren't available to the server.execute()d file. Perhaps I'm just plain wrong about this?

Re: classes/asp/php

Originally posted by mgkimsal And you're suggesting that you can't have classes which inherit from other classes in PHP? I have classes that inherit in PHP *and* I can arbitrarily include code from external files and have it fit in, and it'll be treated as if it was in that location in the original file. All I see in ASP.NET is server.execute() methods which aren't the same thing because the currently scoped variables aren't available to the server.execute()d file. Perhaps I'm just plain wrong about this?

It seems like you are once again confusing ASP with ASP.NET. server.execute lies firmly in ASP land. Not ASP.NET. They are completely separate and completely different.

PHP may allow for classes, "inheritance" (though not in the real term, as has already been discussed), etc, but it isn't the same as in .NET, just like it's not the same as in C++.

PHP
+ Runs on all platforms and is free
+- GUI editors
- PHP classes are dubious at this time

Otherwise, these two technologies cannot be told apart.

I personally reject Jeremies line that .NET is better for large web projects (note I stress web because .NET is not just for web development). I think this is a result of his having worked in a primarily MS enterprise environment for so long, where there's a group of (Visual?) C++ and (Visual J++?) Java developers who are used to developing the MS way, so of course they're going to be fast.

But the point is, it depends only on the developers involved, not the techologies involved here. There is no technical or practical reason why ASP.NET is more suited to enterprise apps than PHP.

In fact PHP is regarded as a very serious technology for web development, by companies like IBM, who make less noise about what they do such as using PHP with DB2

PHP
+ Runs on all platforms and is free
+- GUI editors
- PHP classes are dubious at this time

.NET currently runs only on MS platforms, however it's been mentioned time and again that that is only a matter of time. Once again, to say "PHP classes are dubious at this time" and then to not allow for the future of .NET is two-faced.

Your evaluation of GUI editors seems to try and put the ones available for .NET and the ones available for PHP as being the same in terms of power, rapid application devleopment, etc. We both know that's just not true. You don't write desktop apps by hand, and you can easily write ASP.NET web apps with just notepad.

As far as why I believe PHP is not suited to enterprise development, the reason is quite simple: it isn't.

You can program PHP with Enterprise in mind, scalability in mind, cross-application development in mind, etc, but that is not what it's designed for. You can't on one hand say "it's for quick and dirty hack sites" and on the other get offended when I say it's not for enterprise level stuff.

For the record, I'm not just used to doing enterprise development in an MS environment. In fact, I started leading a Delphi/Interbase team, quite happily in fact. It was the savings (yes, savings, MASSIVE savings) of going the MS way, as well as better speed of development, tools and support that led me to MS.

So, no, I will not (again) stand by and let you say .NET is more expensive than PHP. I can't. We've disproven it time and time again. You can start developing .NET today for free. Nobody will ever force you to pay for it. In fact, many of the tools are even Open Source.

confused?

It seems like you are once again confusing ASP with ASP.NET. server.execute lies firmly in ASP land. Not ASP.NET. They are completely separate and completely different.

So I'm confused. I specifically said that I may be totally wrong. You've simply told me ASP (only the 3 version) has server.execute. I've been trying to find actual 'include' functionality in ASP.NET - closest I could find was - damn I can't remember the term. Something like registering a file in a tag, then referencing the tag later and having it include the file - example used was for 'header/footer' scenario.

That's the closest I can find. Can you point me to something in ASP.NET which is actual 'include' functionality (if this isn't what you meant)?. Or please explain (or point me to URLs which explain) how powerful ASP.NET is in this regard, subsequently doing away with the need for 'include' functionality. It may be a case of 'you don't miss what you never had', as many of my ASP friends simply had no idea how simple your life could be with a powerful include() function. Sure, I may be missing some other things too from ASP.NET, but I'm not having any luck people showing me real examples.

The point with +- GUI editors was some people love em, others hate em: with PHP there is no solid GUI editor at this time - some might say that's a good thing (I quiver at the thought of Visual PHP).

.NET currently runs only on MS platforms, however it's been mentioned time and again that that is only a matter of time. Once again, to say "PHP classes are dubious at this time" and then to not allow for the future of .NET is two-faced.

I strongly disbelieve that .NET will ever run well on other platforms. What I see is an equivalent to Chillisoft - something you'd never run enterprise applications on. The only way .NET will ever reach other platforms in an acceptable form is if Microsoft put it there. So if you're writing and selling web applications, it doesn't make sense to write them for the .NET framework, as the majority of your customers won't be able to use them, their platform typically being Apache/Unix.

Meanwhile there are a number of good looking projects that could deliver a .NET like set of classes for PHP within a year or two. For starters, try http://www.extremephp.org. If the PHP group did a ground up review of PEAR , it could easily excel what MS has produced for the web.

As far as why I believe PHP is not suited to enterprise development, the reason is quite simple: it isn't.

You'll need to back up "it isn't" with some hard facts. And I think you're going to have a real hard time finding them. In the web environment, ASP.NET has exactly no edge over PHP. For developing desktop apps, that's a different story I agree, but that's why I'm stressing web.

You can program PHP with Enterprise in mind, scalability in mind, cross-application development in mind, etc, but that is not what it's designed for. You can't on one hand say "it's for quick and dirty hack sites" and on the other get offended when I say it's not for enterprise level stuff.

PHP is not designed for any particular environment - it's a programming language which makes no constaints on what you use it for. And I can say it's good for "quick and dirty" hack sites because it's good at that as well as Enterprise level OO sites - that's because those magic words "scalability" and "portability" both apply to PHP.

PHP's role while MS and SUN battle it out with .NET and J2EE is to act as the nice middle man - can run anywhere, connect to anything, do everything.

Here's some companies that think PHP is enterprise and are using it (remember you wont always see the .php extension);

Siemens (backing ezPublish and promoting PHP as a solution to their customers)

Originally posted by Jeremy W. You can't on one hand say "it's for quick and dirty hack sites" and on the other get offended when I say it's not for enterprise level stuff.

Are you saying that a language can't be used for both?

EDIT:

What I see, is that you're coming from the side of - "I have a large team of MS product schooled developers and so I find MS tools to be the most productive in my environment". And that's fine, but it doesn't nessessarily mean that the same holds for everyone. Not every developer needs (or wants) the class libraries in .NET. Some people want to sell their products and as such want maximum available coverage for their products to work in.

Perhaps it should be "10 reason why I use .NET over php in my enterprise level application and delpoyment development environment".

Originally posted by HarryF I strongly disbelieve that .NET will ever run well on other platforms. What I see is an equivalent to Chillisoft - something you'd never run enterprise applications on. The only way .NET will ever reach other platforms in an acceptable form is if Microsoft put it there. So if you're writing and selling web applications, it doesn't make sense to write them for the .NET framework, as the majority of your customers won't be able to use them, their platform typically being Apache/Unix.

The Shared Source .NET CLI compiles on both BSD and Windows today. It has a (very good) Platform Abstraction Layer, unlike other Micrsoft stuff. The steps required to implement it on other platforms aren't really that huge. Besides, this is only speculation. .NET might or might not work out cross platform. Only time will tell.

Meanwhile there are a number of good looking projects that could deliver a .NET like set of classes for PHP within a year or two. For starters, try http://www.extremephp.org. If the PHP group did a ground up review of PEAR , it could easily excel what MS has produced for the web.

So we should use PHP because there might be a good set of classes in a year or two? I code my software in the present, thank you. Besides, this is also speculation.

In the web environment, ASP.NET has exactly no edge over PHP.

What about Web Forms, ADO.NET, the DataGrid and User controls?
What about it's native and well implemented OO?
What about it's multi-language capabilities?
What about the fact that it compiles into native code out of the box AND offers very advanced caching capabilities?
What about the advanced development environment VS.NET offers?

PHP is not designed for any particular environment - it's a programming language which makes no constaints on what you use it for. And I can say it's good for "quick and dirty" hack sites because it's good at that as well as Enterprise level OO sites - that's because those magic words "scalability" and "portability" both apply to PHP.

PHP is designed to do the job in the quickest manner possible. In the words of PHPs creator, Rasmus Lerdorf:

In the end, what I think set PHP apart in the early days, and still does today, is that it always tries to find the shortest path to solving the Web problem. It does not try to be a general-purpose scripting language and anybody who's looking to solve a Web problem will usually find a very direct solution through PHP. Many of the alternatives that claim to solve the Web problem are just too complex. When you need something up and working by Friday so you don't have to spend all weekend leafing through 800-page manuals, PHP starts to look pretty good.

PHP is designed to be "quick and dirty" and still produce good results. It is NOT designed to be scalable, well designed or proper - that's why it's OO implementation isn't all that great yet. It's designed to do the job and do it easily and quick. Of course you CAN use PHP to write enterprise level applications, just as you can with COBOL, FORTRAN or Basic, but that doesn't mean that you should. ASP.NET is made with enterprise level applicatons in mind.

Siemens (backing ezPublish and promoting PHP as a solution to their customers)

ezPublish is quite good, except for one thing. It's very slow. It should not have been made in PHP, as PHP doesn't handle complex OO applications very well, and doesn't compile without third party software.

Languages in the future

So we should use PHP because there might be a good set of classes in a year or two? I code my software in the present, thank you. Besides, this is also speculation.

EVERY platform has problems in the present. ASP.NET has nice features, as does pretty much every other platform. Any issues people bring up against PHP, Java, CF, ASP (.NET or not), Perl, Python, or anything else, defenders point to 'the next version' as being 'coming up soon' and that it'll fix those shortcomings. Personally, I've seen more MS/ASP shops use this line than others, but you hear it in all camps.

Yes yes yes - ASP.NET has some things that make your life easier. A company with more annual income than most of South America combined *should* be able to put out good technology that doesn't completely suck - I truly am surprised it took them this long. Use it if you want. But when you find shortcomings and you're told that they'll be addressed in the next version, that is indeed speculation and betting on the future, the same thing you have to do with every platform.

Tout real benefits now about ASP.NET - there should be enough legitimate benefits. Future possibility of cross-platform-ness IS NOT a benefit, plain and simple. If/when it happens, it will be, but anyone that *needs* cross-platform capability TODAY already has choices, and ASP/ASP.NET is not one of those choices.

ASP.NET solves problems. PHP solves problems. Some of the problems they solve overlap, some don't. Both platforms will continue to improve.

Price and cross-platformness are benefits for PHP and points against ASP (.NET or not) no matter how you spin it.

Security is on the side of PHP, simply because of the cross-platformness of it - you can choose to run it on Windows or pretty much anything else. ASP.NET currently only runs on Windows, and to keep your system up to date security-wise, you have to accept a EULA which grants an external company the ability to update your system at their discretion with code you have no control over. For people truly concerned about security, this should be unacceptable.

Developer-friendliness is, to most people, on the 'plus' side for MS, and a strike against PHP. This is primarily a subjective issue, but still perception is reality for people, and the perception is MS tools make things easier. I tend to disagree in most situations, but that's just my observation. If you are more productive with VI, great. If you're more productive in VS.NET, great. Doesn't really matter to me or most people.

Re: Languages in the future

First of all, that's a very well written post, Michael!

Originally posted by mgkimsal EVERY platform has problems in the present. ASP.NET has nice features, as does pretty much every other platform. Any issues people bring up against PHP, Java, CF, ASP (.NET or not), Perl, Python, or anything else, defenders point to 'the next version' as being 'coming up soon' and that it'll fix those shortcomings. Personally, I've seen more MS/ASP shops use this line than others, but you hear it in all camps.

I hear ya, and I agree with ya. The reason I brought it up at all in hte article is that .NET doesn't at all follow the same old Microsoft model, but is actually very well adapted to run on other platform, VERY unlike earlier code coming from Microsoft.

Price and cross-platformness are benefits for PHP and points against ASP (.NET or not) no matter how you spin it.

Absolutely true. Although one must remember that just because something is cheap doesn't mean it's actually cheap to implement and use, and just because something is expensive doesn't mean it necessarily works out expensive in the end.

Security is on the side of PHP, simply because of the cross-platformness of it - you can choose to run it on Windows or pretty much anything else. ASP.NET currently only runs on Windows, and to keep your system up to date security-wise, you have to accept a EULA which grants an external company the ability to update your system at their discretion with code you have no control over. For people truly concerned about security, this should be unacceptable.

While I have not personally read this EULA (could you please provide a link?), nor do I know how enforceable they really are, but I must say that just because Microsoft can do incredibly evil stuff doesn't mean that they are stupid enough to do so. Even though 90% of all surfers use IE, Microsoft has chosen not to implement a MSML, but to conform to W3C standards, for instance.

Developer-friendliness is, to most people, on the 'plus' side for MS, and a strike against PHP. This is primarily a subjective issue, but still perception is reality for people, and the perception is MS tools make things easier. I tend to disagree in most situations, but that's just my observation. If you are more productive with VI, great. If you're more productive in VS.NET, great. Doesn't really matter to me or most people.

Agreed - although I have a *very* hard time believing that two equally good coders can do an equally fast/good job on VI respectively VS.NET.

EULA and include

While I have not personally read this EULA (could you please provide a link?), nor do I know how enforceable they really are, but I must say that just because Microsoft can do incredibly evil stuff doesn't mean that they are stupid enough to do so. Even though 90% of all surfers use IE, Microsoft has chosen not to implement a MSML, but to conform to W3C standards, for instance.

Unfortunately, I can't. We read it here, but forgot to copy it down when someone updated W2k recently. If I read it again I'll copy it down. Essentially what it said was that MS could install software on your machine and that that may break other programs already installed. Primarily a blanket 'don't call us if something breaks' disclaimer, but the issues it raises are large.

If MS can download something without my consent or knowledge, that means it's technically capable for others to do so. There is a mechanism someplace to download/install code - MS is just banking on the fact that it'd be reasonably hard for someone else to do it - but it's certainly not impossible.

Just because they *won't* do something or you have a firewall in place doesn't affect the principle at stake. It'd be pretty hard to get insurance for my building here if it was proved that I accepted an agreement to allow someone from outside my company to come and go as they pleased and they could in fact leave packages that I don't know the contents of, and that I'd also agreed that those persons may in fact break things in my office. What would my insurance premiums be then?

It's *essentially* the same thing.

Again, if I can get the specific EULA in the future, I'll post it someplace.

BTW, I still haven't had anyone show me the 'include' replacement or equivalent in ASP.NET and/or how it makes PHP's 'include' obsolete. Links/articles please. Thanks.

Alright... I'm going to try posting although I'll probably get ripped to shreds the way this thread is going. Oh well

Let's see, I've been coding with PHP for... say 4 years. I started march 98. Yeah, PHP has gotten alot better over time. I started learning to use the .NET framework 3 months ago, so I'm still new with it all. So far I've just read through 2 WROX asp.NET w/ C# books and read a whole bunch of microsoft documentation.

Ok, first, please correct me if I am wrong. It seems to me that ASP.NET code will run a lot faster than PHP code. From what I get, ASP.NET is compiled into machine code while being run (JIT compiling) then the compiled code is stored in the .NET framework's cache until the original compilation (in the IL) is modified, or whatever (forgive me if I'm not using the EXACT terms & expressions). So, when the pages are run they are extreamly fast.

Also, from what I know right now, I far prefer ASP.NET w/ C# over PHP. PHP's OO capabilities just plain suck when compared to any real OO language. Sure, they have a few features here and there, but seriously I really didn't like them.

Some people claim that OO is not (rarely) needed for web programming. Well, that's true for the majority of coders around here it seems who just write quick scripts. I however write massive applications for the company I work for (with a team of other developers). PHP just wouldn't work.

Ok, I'll correct myself, PHP can be used to write absolutly ANYTHING for the web. Yes, any massive web application could be written with PHP. Yes, huge teams of 20 plus developers could use PHP. The question is how practical is it? I've heard the same arguements when it came to C vs. C++... who really needs C++'s OO features? Anything that can be done with C++ can be done with C. Well, anything that can be done with C can be done with assembly, or writing directly in machine language (god that would be scary).

Alright, I don't really remember what else I wanted to say. I'll just finish up that as of right now, I think I much prefer ASP.NET w/ C# over PHP (although I'll still use PHP for some stuff). I think that PHP is a bit "icky" and like C# a lot better. I'm really picky when it comes to programming languages. Sure, I can't code for linux systems with ASP.NET w/ C#, but I'm sure that'll come later. Then again, I don't code that much for linux.

Oh, also, ASP.NET is A LOT cheaper than PHP. Probably not for the average single coder that throws the site up on a $15 / month hosting plan, but since when does microsoft really target that group? For huge companies, ASP.NET saves an increadible amount of money. I know, I've seen it. PHP would cost a lot more.

Re: EULA and include

Yeah, I guess you are right. EULA:s shouldn't be allowed to contain this stupid crap. I remember that the Hotmail EULA stated something about Microsoft having copyright to every work you sent via Hotmail. I also think some of the people that write marketing texts for Microsoft should be shot.

But really, it doesn't affect the quality of Microsoft products. If Microsoft really does something like install stuff on your computer, there will be an enourmous public outcry, they will apologize, issue a patch, and not do it again in 2 years.

BTW, I still haven't had anyone show me the 'include' replacement or equivalent in ASP.NET and/or how it makes PHP's 'include' obsolete. Links/articles please. Thanks.

It's simple, really. Since everything in ASP.NET is an object, including the .aspx pages themselves, every bit of code is now in a namespace, or at least a class. This means that every time you need to access code external to the current file, you just reference the namespace instead of including another file. It's much cleaner.

Reusable design elements, such as headers, are now handled with User Controls.

- Speed of development, ease of working in teams. The less time it takes to make something, the less the company pays. Paying the coders is one of the biggest expenses in the long run.

- Maintenance / Scalability. A well written application in C# can be updated and code can be reused a lot more easily than with PHP.

- Tools available. Ok, seriously. Try getting 20 coders working together on an application using PHP. Yeah, it can be done, but if you've used any of the tools MS has available for .NET you'd know how much easier it is.

- Different languages can be used together really easily. I code using C++ mostly right now, although I am getting used to C# & ASP.NET. I really don't know how well PHP does this, I haven't searched this topic in depth, but I would be really surprised if it does it anywhere as near as the .NET framework does.

- Ok, this one is mostly for the internal applications that I work on, but all the microsofts technologies integrate really nicely. Mostly Windows2k's Active Directory and ASP.NET applications

Basically, it is really easy to code modularly with ASP.NET and a ton of work is already done especially for the windows environment. You want numbers? How much do you think developers get paid? $50k - $80k / year roughly. For what we do, big scale applications, we can code MUCH faster using ASP.NET. (By we, I'm talking about everyone that I work with). The #1 money burner in big companies is time. It's a lot cheaper to throw money around and get something done faster. Also the sooner something gets done, the sooner money is made. The .NET framework allows really powerfull applications to be developed really fast.

Re: Money

Originally posted by mgkimsal

Please elaborate just a bit - I've seen just the opposite. Please list what costs you're counting and the approximate prices. Thanks.

Jeremy showed a nice calculation in a thread a while back... What is the key is that PHP and unix solutions doesn't tie in well together. With Open Source solutions, you have to spend lots of extra resources on integration - that is generally what seems to make MS products cheaper on the enterprise level.

Re: Strongly typed vs. loosely typed languages

Originally posted by voostind Hello Harry and Mattias,

A while back in this thread you were comparing ASP.NET and PHP on their type of language: strongly typed versus loosely typed. Although this was a fair number of posts back, I still think I need to set some things straight. Because you are both wrong.

When programming languages were still a new technology and much hadn't been discovered yet, there were mainly two types of languages: compiled languages and interpreted languages. The first were always strongly typed, while the second were always loosely typed. Now there are many more languages in all sorts of combinations. Haskell, for example, is a strongly typed interpreted (functional programming) language, but you don't have to define the types if you don't want to. At run-time the types are automatically computed (with a process called 'type inferencing') to make sure each value has the correct type.

It makes sense to make a compiled language strongly typed. If a function accepts three arguments and their type is known, the compiler can (at compile-time) compute the number of bytes that must be reserved for these arguments on the stack. When the type of the result of some function is known at compile-time, again the compiler can compute beforehand the number of bytes on the stack needed to store the result. So strongly typed languages make for efficient machine language code.

As interpreted languages are always compiled dynamically, there is no real need to efficiently compute stack sized. So loose typing makes sense. As I said, compiler/interpreter technology has advanced so it is now possibly to create efficient machine language code from loosely typed code, or to interpret code in a strongly typed language.

It is not true that loosely typed code leads to code that is worse than strongly typed code, or that strongly typed code decreases the chances of errors being made. Both are equally possible in both languages. Language designers at some point decide whether to make a language strongly typed or loosely typed (or something in between) and then stick with that; changing that decision later on is almost impossible.

So why is Java strongly typed? Two reasons: 1) compiler techniques in this area are the best known, so implementing an efficient virtual machine was easier. 2) the most popular languages at the time were C and C++, both strongly typed languages. In order to get a great following, Java had to gain acceptance from those coders.

So why is PHP loosely typed? Again, two reasons: 1) it allows for a simpler syntax, attracting a following of coders used to that (Perl). 2) It's easier to write an interpreter for it. An interpreter for a strongly typed language has more overhead, as the parser must be more advanced, and types must be checked at almost every step of the interpretation process. Now, a type is only evaluation for some value if that value is actually used (not assigned to, but used with a function or operator).

It should be noted that good programs can be written in any kind of language. Smalltalk for example, an 'old' object-oriented programming language, is used in many critical systems by large corporations. And it is a loosely typed language. And although Java is a clean, strongly typed language, lots of junk is written in it.

Vincent

HAHAHAHAHA! Because I'm nasty today, I decided to quite your entire post! I bow my head in shame to you, Vincent. I'm now enlightened.

This brings up another question, though. You say that strongly typed languages makes sense for compiled languages (like .NET languages are). Now, Harry has been pimpin’ PHP/Zend accelerator for quite some time, saying that ASP.NET isn’t truly compiled, and that PHP still is faster/just as fast with the PHP/Zend accelerator. I now ask you - Is this really the case? It now seems even more unreasonable that a strongly-typed, fully OO language like C# which in the end (I think) is compiled to native code would not be faster than PHP/Zend Accelerated PHP.

Re: Re: Money

Originally posted by M. Johansson

Jeremy showed a nice calculation in a thread a while back... What is the key is that PHP and unix solutions doesn't tie in well together. With Open Source solutions, you have to spend lots of extra resources on integration - that is generally what seems to make MS products cheaper on the enterprise level.

Exactly.

The price paid to integrate is way more than paying for already integrated technology. That is why microsoft is so popular. They have a complete (or as close as it gets) package.

However, I'm not saying that they don't abuse the power that they have . But, even when they abuse it, it comes out being cheaper for big companies to buy microsoft products than going open source.

Oh, also, I remember somebody saying earlier on that ASP.NET forced you to use OOP...

How is that possible? How can anybody force you to use OOP? I'm sorry, but that is just not true. if you don't want to use OOP, you don't have to. If you just wanna code everything in one huge function going that excecutes sequentially it's completly possible.

Originally posted by Majglow Oh, also, I remember somebody saying earlier on that ASP.NET forced you to use OOP...

How is that possible? How can anybody force you to use OOP? I'm sorry, but that is just not true. if you don't want to use OOP, you don't have to. If you just wanna code everything in one huge function going that excecutes sequentially it's completly possible.

Language/technology

There is no equivalent in ASP.NET. You wanna know why? the 'include' functionality is relevant to the language, not the technology. For example, is their an include statement for CGI?

I don't know about ASP.NET w/ C#, but with just plain C#, there is no need to "include" files because everything gets compiled together.

Maybe when I get better with the actual ASP.NET technology I could get back to you.

`
How would you instruct the languages which files to 'compile' together?

I said before 'ASP' didn't have include, and got slapped around because we're talking about ASP.NET. ASP as a framework didn't allow for dynamic inclusion of files at runtime, regardless of langauge (VBScript, JScript, etc) - you could only 'include' something via SSI.

ASP.NET seems to not allow for dynamic inclusion of things at runtime either. Perhaps I'm missing something, but including a .aspx page with multiple classes in it because I might need one class seems a bit wasteful, even if it it compiled/cached.

My current understanding of the ASP.NET architecture, as it relates to web stuff and 'includes' is as follows.

The entire 'page' is assembled before run time and compiled into one mess of bytecode. I'm assuming that the 'user control' mechanism is how most people would 'include' external files. The entire mess of bytecode is cached as one entity.

If 50 pages each include 5 external files, there are effectively 250 copies of those files compiled in memory. Yes, they're small, but it strikes me as inefficient. This understanding was/is based on several discussions with a hardcode ASP guy back in January - his name and email escape me, unfortunately, and I can't find the site where he mentioned this. I might be way offbase, but it explained a lot of performance issues I had with ASP stuff earlier, and I assume that ASP.NET treats things similarly (obviously someone here will hit me on the head if my assumption is wrong).