Server Side Includes as a Site Template

403 views Asked by At

I am an ASP.NET MVC / WebForms developer by trade, so all of the websites/apps I have created in the past allowed me to use Master/Layout pages for the look/feel of all my site, while allowing me to change just the parts specific to that page.

Now, I am doing some freebie web work for a friend and I want to write it in HTML, CSS, and JavaScript using Aptana 3 so that it can be hosted wherever. Master pages are not an option for me since I am no longer in the ASP.NET/Visual Studio world, so I am looking at Server Side Includes to accomplish this. My question:

Is this a good use of SSI? I am seeing conflicting forum posts, where some say that they should be used for small pieces of the page (like a specific piece of text, time, etc). I want it to generate a large portion of my page, things like the footer, footer links, menus, banner image, etc. Basically, I want to use SSI for most of the page, and then just plug in the pieces specific to the page. Have others done this in the past with success?

1

There are 1 answers

2
Digbyswift On BEST ANSWER

If the purpose behind you choice is so that it can be hosted anywhere, then even using SSI may be restrictive since it relies on that functionality being enabled on a server.

Having said that, it is a valid option, but personally I would familiarise yourself with both the options in PHP and .NET so that you are comfortable in adapting your code to both. You are rarely going to be asked to move a site hosted on one framework to another, and if you are then you can factor changing the code into your costs.