My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
COOP  
COOP is the workflow technology that brings designers and developers together.
Featured
Updated Feb 15, 2012 by sosensible

(The solution is for ColdFusion developers.)

COOP Home Page

Why?

COOP is focused on thinking like designers when doing view markup code and thinking like developers when doing controller logic. We focused on removing the conditional logic and cryptic variable insertion on view pages as much as possible. One surprise was the interaction with the designer view page ended up being even easier for developers at the same time. It turned out to be a Win-Win-Win. :)

Areas of interest

The content cache map is to allow more localized control of shared libraries.

Example

This will help you see a brief introductory example of why code with COOP.

HTML Prototype

<select id="myList" name="myList">
   <option value="red">red</option>
   <option value="green" selected="selected">green</option>
   <option value="blue">blue</option>
</select>

Mixed Code

(I also call this obstacle course coding because we switch from logic to markup.)

<cfset theList = "red,green,blue">
<cfoutput>
<select id="myList" name="myList"><cfloop list="#theList#" index="item">
   <option value="#item#"<cfif item EQ selectItem> selected="selected">>#item#</option></cfloop>
</select>
</cfoutput>

COOP Prototype

Here we will see a much simpler way to code. This form of coding frees the designer from messing around with all the programming logic.

<cfImport prefix="coop" taglib="/share/tags/coop/"/>

<coop:selectList id="myList" data="red,green,blue" selected="green" />

COOP PreDOM Scripting Example

This performs the same result but the data is not seperated from the markup and presentation also.

<cfImport prefix="coop" taglib="/share/tags/coop/"/>

<cfscript>
_init.myList = {
   data = "red,green,blue",
   selected = "green"
};
</cfscript>

<coop:selectList id="myList" />

Sign in to add a comment
Powered by Google Project Hosting