Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Build a Simple Dynamic Site with Node.js!
You have completed Build a Simple Dynamic Site with Node.js!
Preview
In software development it's best to keep your code organized so that it's not duplicated. This is what as known as the _don't repeat yourself_ principle or DRY.
Further Reading
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
There's often a lot of repetition in
dynamic or even static websites.
0:00
A lots of the head tags contain the same
stuff and the footers are the same too.
0:00
We're going to use a principle called DRY,
or Don't Repeat Yourself.
0:05
There's no need to have this duplication
in multiple files.
0:09
We'll split up our HTML into unique parts
and
0:13
we'll add placeholders for dynamic
information.
0:16
This will form the templates for our
dynamic site.
0:19
Okay.
So
0:23
we've got our design files here in the
design folder.
0:23
We'll take a look at each one
individually.
0:27
And then see what common patterns we can
pull out.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up