Macro in ASP.NET (part 2)
Thanks for sharing your thoughts!
I've been thinking to ASP.NET macros for quite some time lately, but I'm not sure they are really a good idea. Read, something you might want to add to the official wish list for the next version of ASP.NET.
Maybe they are. Maybe not. However, I want to clarify a couple of points raised by some comments.
What I call an ASP.NET macro is the capability of expanding some compact code to HTML literal markup before the ASPX source page is compiled to the assembly. It goes without saying that this can be coded with a custom or a user control. I just don't want to use server controls. By design.
There's nothing a macro (according to the definition above) can do that a server control cannot do either. The rub lies in the fact that controls have a certain impact on performance and should be avoided when the functionality they provide isn't strictly necessary.
Basically, I'm looking for the save programming style pushed by controls without the overhead of controls. I'd like to use a compact and declarative syntax to reference significant pieces of (literal) HTML. A way to save development time. Andrew hinted at ideas he has to improve design-time tools. This is certainly one way to give me the functionality that I devise in what I call ASP.NET macros.
I haven't found yet significant scenarios where this would really be useful. But in some way I feel this is something I need to think more about.