The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Using #File to include shared code of templates.

Last post 02-15-2007, 4:01 PM by Mike.Griffin. 1 replies.
Sort Posts: Previous Next
  •  02-14-2007, 10:27 PM 305

    Using #File to include shared code of templates.

    Dear  EntitySpaces authors,

    MyGeneration has a facility to keep common code in separate sub-templates using #file directive . However I didn't find any of standard MyGeneration/EntitySpaces templates that use "include" approach.
    You have 4 templates EntitySpaces_C#_ASCX.csgen,EntitySpaces_C#_ASPX.csgen,EntitySpaces_VB_ASCX.csgen,EntitySpaces_VB_ASPX.csgen which are very similar and, I am sure, have a lot of common code. Why you didn't move common code to separate file(s)? 

    Is any limitations with this? Will be any issues with step-by-step debugging?

    In particular, I want to create my own copy of EntitySpaces_C#_ASCX.csgen and modify it. It would be better, if your templates would be splitted into several files(classes,modules) and I would know, that some sections are left unchanged and some I've modified. It will help me to merge my changes when new versions of the template will be available.

    What are your thoughts? I've just started to work with MyGeneration templates and I am worry, am I on a right track?


    Michael Freidgeim
    Blog: http://geekswithblogs.net/mnf/
  •  02-15-2007, 4:01 PM 324 in reply to 305

    Re: Using #File to include shared code of templates.

    Yes, you are correct, however, we first created the ASPX templates then later did the ASCX templates for DNN, you are right though there is a ton of common code between them.  As a side note, those templates were written before we had hierarchical support in EntitySpaces, sometime after the 1.6.0 release we are going to create an entirely new set of templates, and we spoke of exactly that, keeping one set of core code between all the templates, we know the value of having low maintenance, we were just in a hurry back in those early day to break into certain markets.

    EntitySpaces | Twitter | BLOG | Please honor our Software License
View as RSS news feed in XML