New Site Design

Bob Schneider
Bob Schneider used Ask the Experts™
on
I work with classic asp and I am designing a new site.  I want to ensure that I put the site together "correctly" in terms of page lay-out and <head></head> contents and structure.  I plan on using AJAX, JSON, CSS, JavaScript and Bootstrap.  I would like to place my styles and most <head></head> contents in an include for the purpose of code reuse.  I would love to hear suggestions on what best practices are with this.  I have been programming along these lines for about 15 years now but I am concerned that I have a lot of bad habits and I want this done right.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
RobOwner (Aidellio)
Most Valuable Expert 2015
Commented:
Bootstrap has some great templates to get you started.
http://getbootstrap.com/getting-started/#template
http://getbootstrap.com/getting-started/#examples

As for tips and tricks, all your css and javascript should be minified and in the one file.  There's been a move to put all your Js at the bottom of the page, just before the <body> tag as the page loads faster without having to process the javascript first.

To get any more specific, I suggest opening other questions targeting specific issues or concerns you have with your coding.  I'll do my best to answer them here too if need be
Bob SchneiderCo-Owner

Author

Commented:
I have gleaned some good stuff from bootstrap and have re-organized my work with the help of folks on this site so I am getting close.  Maybe a better question is, how does this page look from a best practices standpoint.
Owner (Aidellio)
Most Valuable Expert 2015
Commented:
I did forget to mention that you should always check what you're doing through the w3's validator: https://validator.w3.org/nu/?doc=http%3A%2F%2Fwww.etraxc.com%2F

It sets the standards and also checks them for you :)  As you can see it's only reporting 2 encoding errors but other than that the structure is sound from their point of view.

I'll check where you've put css, js and dom elements.
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

RobOwner (Aidellio)
Most Valuable Expert 2015
Commented:
no need to comment out your javascript anymore, nor specify the type:

<script type="text/javascript">
<!-- ... -->
</script>

should be just the following as it defaults to "text/javascript"
<script></script>
RobOwner (Aidellio)
Most Valuable Expert 2015
Commented:
Personal preference too but also consider moving to a MVC framework as it makes your code easier to read, find and update.  As your pages get more complex, typically so does the javascript, so it's a good idea to modularise.
Bob SchneiderCo-Owner

Author

Commented:
Is there an mvc framework programming environment that works and plays well with classic asp?
Commented:
Just my two cents on something you said:
I would like to place my styles and most <head></head> contents in an include for the purpose of code reuse.

The <title> tag is within <head>, so just make note that if you go ahead with that structure, you'll probably need to have a variable or something to determine the page title so that you can change the title on a per-page basis. Having the same page title on all pages is usually bad practice and makes it hard for people to use their back button to navigate back to a specific page.
Bob SchneiderCo-Owner

Author

Commented:
Agreed.  The title and description are left out of the include.  Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial