What are the differences between information hiding and encapsulation?

Encapsulation and information hiding are very closely linked concepts, though their precise definitions vary depending on who you talk to. The concept of “information hiding” was first described by Parnas (1972) who suggested that access to information should be restricted to reduce the interconnectedness of a system. He proposed that this would facilitate splitting of … Read more

How to structure a express.js application?

I have mine broken up as follows: ~/app |~controllers | |-monkey.js | |-zoo.js |~models | |-monkey.js | |-zoo.js |~views | |~zoos | |-new.jade | |-_form.jade |~test | |~controllers | |-zoo.js | |~models | |-zoo.js |-index.js I use Exports to return what’s relevant. For instance, in the models I do: module.exports = mongoose.model(‘PhoneNumber’, PhoneNumberSchema); and then … Read more

How can one import only variables and mixins from Sass stylesheets?

Imports are an all or nothing thing. Everything that’s in the file is what you get. If you look through the source of Foundation, though, there are variables you can modify that will suppress emitting styles (eg. in buttons, setting $include-html-button-classes to false will disable the styles). This design pattern is Foundation specific, you cannot … Read more