Jump to content

The Biology of Processwire Templates, Fields and Pages


clsource
 Share

Recommended Posts

Hello,

I was reading about biology and maybe ProcessWire Template, Pages and Fields could be explained using

Genotypes, Phenotypes and Cells.

https://en.wikipedia.org/wiki/Genotype

https://en.wikipedia.org/wiki/Phenotype

https://en.wikipedia.org/wiki/Cell_(biology)

 

Wikipedia Quotes
 

Quote

 

"The genotype is the part (DNA sequence) of the genetic makeup of a cell, and therefore of an organism or individual, which determines a specific characteristic (phenotype) of that cell/organism/individual."

"A phenotype is the composite of an organism's observable characteristics or traits, such as its morphology, development, biochemical or physiological properties, behavior, and products of behavior (such as a bird's nest)"

"The cell is the basic structural, functional, and biological unit of all known living organisms. A cell is the smallest unit of life that can replicate independently, and cells are often called the "building blocks of life". The study of cells is called cell biology."

 

 

So by using a wide interpretation of those definitions we could associate

 

Templates = Genotypes (Defines the basic structure)

Fields = Phenotypes (Defines what information will be stored an available for querying)

Pages = Cells (It's the representation of the Template (Genotype) and Fields (Phenotypes) with the information filled. The basic structural unit for the ProcessWire application.)

 

What do you think? :)

 

 

  • Like 3
Link to comment
Share on other sites

1 hour ago, clsource said:

Template, Pages and Fields could be explained using

Genotypes, Phenotypes and Cells.

If you want to confuse beginners, why not ;):D 

1 hour ago, clsource said:

cells are often called the "building blocks of life"

I push it a bit further: the "simplest" creature which can be said to be alive is a single cell. It IS life. In order to boost the chances of survival cells unite, live and die (disintegrate) "together". The fundamental unit of life, the cell, is alive when it first begins to move against gravity and the path of least resistance.

  • Like 2
Link to comment
Share on other sites

4 hours ago, Jonathan Lahijani said:

Good read, thanks. I will change the templates and pages analogies  in the atomic design because it could mess with ProcessWire terminology.

So you could separate a system in three main layers:

# Presentation Layer (Frontend)

atoms => basic html, css, js tags
molecules => combination of different atoms (search bar, navigation menu, etc)
organism => combination of different molecules (header : logo molecule + menu molecule + search bar molecule)
artifact => combination of different organisms (wireframes, mockups)
unit => an artifact in its final form (mockups are implemented with final looks and data) (ex: an static html page with static data)

# Logic Layer (Backend)

phenotype => Define what and how information is stored and represented  in the storage system (username:Text, email:Text, password:Text, profileImage:Blob, etc).

genotype => Define the group of phenotypes that a cell should fill. (an User needs the following information: username and password)

cell => It's a representation of a genotype (User)  with all the phenotype information filled (username:clsource, password:1234)

# Execution Layer (Runtime, Final Product)

entity = a unit that interacts with cells. (ex: a page with dynamic data)

  • Like 3
Link to comment
Share on other sites

55 minutes ago, louisstephens said:

Well this was what I was missing...  However, this just confuses me way more. Getting used to php was tough enough.

It just a generic concept approach, so instead of using the unique terminology that every cms or system uses (that is totally valid for their use case and target audience).
you can explain things to clients like this and create standard meanings.

If does not make sense to you it's fine. It's just another way of understanding concepts.
For beginners I would recommend to understand ProcessWire core concepts the way they are by doing small projects and asking here in the forums. And then try to represent the same concepts in a more generic way like this or other form :)

 

 @Jonathan Lahijani provided a super awesome link

http://atomicdesign.bradfrost.com/table-of-contents/

and go here for a more visual representation of the concepts :D

http://patternlab.io/

 


 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...