2. objectives
explain why we built one|content
explain the basic concepts
show a simple demo
talk about advanced features
get feedback, comments, suggestions, …
9. complex content construction strategies
content projection (everything is an article)
makes it difficult for customers to manage content
hacking com_content
simply never a good idea
developing a number of com_whatevercontent
takes on average 2 days per content type
very flexible, but complex to build and hard to maintain
use a CCK extension
do not address content relations very well (sic)
10. what if we could …
build structured content sites
in a declarative style
using concepts the customer understands already
with minimal coding
integrating content from any data source
using a toolkit that
is CMS-agnostic
is suited for an integrator (not for end-users)
is mildly extensible (but not a framework)
11. the one|content vision
everything is content. content is everything.
really everything, like content-based navigation
articles often the most logical way
countries content-based views
speakers build a consistent UI
inventory items OO view concept
orders
searches
users
12. the content cloud
shared content
non-CMS data
local data
corporate campaign intranet divisional application
website website website
15. schemes
a scheme defines the meta-structure of an item
attributes
individual data values, not visual types !
16. model
a model is an instance of a scheme
has specific values for each attribute
comparison using com_content
article view : shows one model
category blog view : shows a list (selection) of models
17. relations
in real life, stuff is related to other stuff
different types of relations
categorization : categories, topics
composition: regions, subregions, countries
reflexive: hierarchies, graphs
other projection techniques
sections, categories, ...
tags
18. view
an OO approach to views
for every scheme, build (at least)
a detail view : introducing nanoScript
a list view : link to the detail view
admin view
list view
edit view
19. controller
controller tasks
list
detail
edit/add
delete
how to access the content
com_one
mod_nano
nano content plugin and one package
24. tags and expressions
unary tags
binary tags (closures)
can be extended (class hierarchy)
used for things like {tidy}…{/tidy}
{set release = 1.6}
{if release > 1.5}
<h1>Congratulations on releasing version {= release} !</h1>
{else}
<p class="late">Still at 1.5 !</p>
{endif}
25. variables
handles a number of formats
scalar variables
arrays
objects
expressions
The temperature is {= temp} degrees.
The second competitor's name is {= competitor[1]}.
The address is {= person->address}.
The order total is {= order->net + order->vat}.
26. control structures
the usual
if, then, else
while, endwhile
loop
{if count(entries) > 0}
<ul>The nominees for extension of the year are
{loop entries e}
<li>{= e->name]}</li>
{endloop}
</ul>
{endif}
27. structured HTML
section tag
@ tag
namespaces
{section QUESTION title}
<div class="question">
<h1 class="question">{= title}</h1>
</div>
{endsection}
<img src="{@ icon:question}" />
{@ QUESTION "Why did we develop one ?"}
28. nanoScript search path
sets folder sequence / hierarchy to check
applications of it
could be used to implement template overrides
language-dependent script loading
29. packages
makes nanoScript extensible with
helper functionality
Joomla functions
{if count(entries) > 0}
<ul>The nominees for extension of the year are
{loop entries e}
<li>{= e->name]}</li>
{endloop}
</ul>
{endif}
30. custom nodes
extend the syntax with unary or binary nodes
useful examples
tidy
Excel or PDF generator
<p>Comment:</p>
<div>
<h1>{= entry->title}</h1>
{tidy}
{= entry->introText}
{= entry->fullText}
{endtidy}
</div>
31. the nanoScript content plugin
placed inside an article
similar to a content plugin, but more generic
makes content extremely dynamic
how would you use this ?
show content depending on the user access level
access user info using a package
include one|content views
33. more controller stuff
selecting models
how does the select task work ?
the query object
influencing selections
filters
querying multiple related schemes
what about performance (caching, joins, …)
building a custom model factory
34. building a multi-scheme search form
similar to the edit form
different widgets
can include operators (like, begins with, …)
find items related to one or more of …
example from MGX
35. permissions : an open permissions system
controller permissions
form permissions
build your own terms
36. behaviors
search and the search plugin (search behavior)
slug
calendar
google
rss
other examples of behaviors
publish
versioning
multilingual
wiki
class
37. stores and factories
data resides in different places
the Joomla/Nooku database
other MySQL tables
SQL Server, Oracle, …
behind a SOAP service
schemes and stores
separates the logical and physical layers
stores and strategies
encapsulate the data-level adapter