Is it a standard practice to develop a HTML project using partial views.
Consider a project where the design team will develop the HTMLs based on the requirement & then the backend team will work on that.
For example:
index.html:
<html>
<head>
//reference to jQuery
</head>
<body>
<div class="main">
//all the page content will load here
</div>
<script>
$(document).ready(function(){
$.get("header.html", function(html_string)
{
$(".main").append(html_string);
},'html');
$.get("banner.html", function(html_string)
{
$(".main").append(html_string);
},'html');
$.get("intro.html", function(html_string)
{
$(".main").append(html_string);
},'html');
$.get("footer.html", function(html_string)
{
$(".main").append(html_string);
},'html');
});
</script>
</body>
</html>
header.html
<header>
...
</header>
banner.html
<section>
<img src="" />
<h1>hello</h1>
</section>
intro.html
<section>
<h2>heading/h2>
<p>description</p>
</section>
footer.html
<footer>
...
</footer>
The reasons for this approach:
A change request, say in the header menu, will be made only in one place & it will reflect in all other pages, unlike the regular approach, where the designer has to update the header markup in all the pages.
Re-usability & also easy to change the order of a
section
in a page, as & when required.If a particular section's markup is updated by the design team, it will be easier for the back-end developer to just pick that view instead of going through the entire html markup.
and now my questions:
Is this a standard design approach and is there a specific name for this kind of HTML development.
What are the challenges if anyone has tried this.
I'm unable to find any material online that will help a designer better understand & practice this approach. Please share any pointers.