Search code examples
partialgeddy

What is 'partial' from a coding perspective?


I'm currently working through a geddy tutorial and came across a line of code:

<%- partial('form', {step: {}, toDos: toDos}) %>

What does partial mean? I've done a google search without much insight. I'm guessing it means that you partially load the content so the page loads faster?

Any explanations or helpful links would be appreciated.

http://geddyjs.org/tutorial

It's been a while since I've coded so if I should be looking at a particular method of coding (e.g. OOP, MVC) that I'm missing let me know.


Solution

  • I received this answer by Dan Craciun on experts exchange which answers it for me:

    In geddy, a partial (denoted by a _ in front of the name) is a reusable file/template, that is meant to be used in more than one template. It helps share code between different templates.

    See here for a longer explanation (about half page, "An intro to partials"): http://code.tutsplus.com/tutorials/creating-a-todo-list-app-with-nodejs-and-geddy--net-24535

    HTH, Dan