Search code examples
pugmean-stack

Where exactly does jade lie in a web application architecture


I'm new to MEAN (MongoDB, Express, Angular, and Node) development and want to learn where jade templates come into the picture in the overall architecture. For example, HTML (UI mark-up), JavaScript (Client-side scripting), CSS (styling), php (server-side scripting), SQL (backend). For example, in this architecture:

enter image description here

What layer would jade come into play, and what is it's primary purpose?


Solution

  • Jade is basically the same thing as HTML. Instead of writing it in HTML, you could use Jade, which is a simpler syntax to HTML.

    For example,

    <body>
        <p> Hello world! </p>
    </body>
    

    is exactly the same as the jade file:

    body
        p Hello world!
    

    So it lies in the same place as your HTML file would.