Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3443182
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:45:36+00:00 2026-05-18T08:45:36+00:00

I would like to know if there’s any templating engine that is used for

  • 0

I would like to know if there’s any templating engine that is used for object graph creation? There are many to create HTML or other string resulting content. But I would like a templating engine that spits out objects. So to speak a preprocessor.

I have an application that needs some sort of predefined object graphs that’s used to render a specific page widget. For instance I have a toolbar on my pages but every page has a different toolbar. It may look very similar. but for instance button Add will point to a different URL on one page than on the other.

Example object graph (part of it):

IList<ToolbarItem> toolbar = new List<ToolbarItem> {
    new ToolbarButton {
        Text = PageResources.NewText,
        Url = Url.Action("Add", "Items"),
        Icon = ToolbarIconType.New
    },
    new ToolbarSeparator(),
    new ToolbarDropDown {
        Text = PageResources.DropDownText,
        Icon = ToolbarIconType.Filter,
        Items = new List<ToolbarDropDownItem> {
            new ToolbarDropDownItem {
                Text = PageResources.FirstItem,
                Url = Url.Action("Whatever", "Filter")
            },
            new ToolbarDropDownItem {
                Text = PageResources.SecondItem,
                Url = Url.Action("BlahBlah", "Filter"),
                Icon = ToolbarIconType.Search
            },
            ...
        }
    },
    ...
};

This static definition (with dynamic resources and dynamic URL helper calls) may become quite long and complex. Think of a ribbon-like toolbar similar to Word. Very complex and long.

I would like to have these object generation templates stored in the database and each page would be able to read their own, templating engine would then generate it and use particular resource type + key to put localised data in. The same thing would be with actions’ URLs…

Something similar is done at object deserialization (XML or JSON). but built-in (de)serialization technologies don’t support variable replacements or resource links or similar. Best thing would be to support resource links and lambda expressions.

To sum it up: is there any .net object graph templating engine/preprocessor that would provide what I need?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:45:36+00:00Added an answer on May 18, 2026 at 8:45 am

    JSON serialization

    I decided to use Json.Net library mostly because writing JSON strings is very human readable or should I rather say web developer readable and is easy to maintain. It’s very similar to normal Javascript JSON but with additional syntactic sugars (referential preservation, type preservation etc.)

    Json.NET library is a very good upgrade from provided JavaScriptSerializer or the DataContractSerializer classes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know if there are any tools that can help me
I would like to know whether there are any websites (not toy projects) that
I would like to know if there is any way to add custom behaviour
I would like to know if there is any easy way to print multiple
and I would like to know if there is any way to stop a
I'm using Adobe Flash CS 4 and would like to know are there any
I would like to know if there is a library that will tell me
I would like to know if there is any URI or action to go
I would like to know if there is any functionality in the Gecko SDK/NPAPI
I would like to know if there is any equivalent Powershell commands for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.