Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDonnie Reese
17,211 PointsPositives & Negatives in adding logic to the view in an MVC in this app's scenario?
From what I understand, the web app in this lesson is essentially following the MVC principles of dividing logic, data, and views. I am not very familiar with MVC frameworks, so what would be the potential positives and negatives of adding logic in to the view and content?
Also, is there another way to conditionally load logic with the Pug/Jade template engine other than inline conditional logic?
Tom Geraghty
24,174 PointsTom Geraghty
24,174 PointsAs to your second question: there's a lot that Pug can do such as: Attributes Case Code Comments Conditionals Doctype Filters Includes Inheritance: Extends and Block Interpolation Iteration Mixins Plain Text Tags
For logical ops, see: https://pugjs.org/language/iteration.html