community builder 2.0:using a new way to build web-apps
DESCRIPTION
Community Builder 2.0:Using a new way to build Web-AppsTRANSCRIPT
Community Builder 2.0:Using a new way to build Web-Apps
@ J and Beyond 2012
© Joomlapolis - 2012 2
More
Traditional design
① Specify② Design③ Implement
(in MVC)
(MVC)Implementation
Design
Specifications
…Unrelated !
© Joomlapolis - 2012 3
More
Community Builder 2.0 5 Years of research
at Lightning Labs!
RESULTLayout
Specification
✔ Related !
4© Joomlapolis - 20122012-05-20
NO Implementatio
n!No <?PHP ?>
code!No <script />
code!No SQL queries!
Look Ma !
© Joomlapolis - 2012 5
INTR
OD
UC
ING …
AHA?AutomaticHomogenousApplications
WebOptimizedWorkflows? !
WOW!™
© Joomlapolis - 2012 6
AHA? …Compare… WOW!
Classical (H)MVC: Model + View +
Controller implementation
+ Helpers and Javascript helpers
Not hierarchical Not agonistic Lot of “COPY-PASTE”
code Lot of layouting Not formal
AHA?WOW!™ MVC:
Specification only
Hierarchical – MVC
Agonistic
No specific code (or very little)
Formal
© Joomlapolis - 2012 7
AH
A?W
OA
!
So……?…The 2’ Example:
Currency rates browser
© Joomlapolis - 2012 8
More
❶ Model:
<model name="currencies">
<table name="#__currencies" />
<class name="Currencies" />
</model>
<table name="#__currencies" class="Currency">
<columns>
<column name="id" type="sql:int(11)" label="Currency Id" />
<column name="base_currency" type="sql:varchar(3)" label="Base currency" />
<column name="currency" type="sql:varchar(3)" label="Target currency" />
<column name="rate" type="sql:float" null="true" label="Exchange rate" />
</columns>
</table>This installs / upgrades database !
© Joomlapolis - 2012 9
More
❷ Controller:
<action name="show_currencies" request="view" requestparams="showcur" >
<showview view="showcurrencies" mode="show">
<model name="currencies">
</showview>
</action>
Controller links Model with View
© Joomlapolis - 2012 10
More
❸ View:
<view name="showcurrencies" type="params" ui="admin" label="Currencies">
<tablebrowser name="currenciesbrowser" label="Currency exchange rates">
<listfields>
<rows type="standard" height="auto" limit="15" >
<field name="" type="rownumber" width="20px" align="right" label="#" />
<field name="id" type="primarycheckbox" width="20px" />
<field name="currency" type="string" width="10%" label="Currency" />
<field name="base_currency" type="string" width="30%" label="Base currency" />
<field name="rate" type="float" width="30%" label="Exchange rate" />
<field name="id" type="int" width="20%" label="Id" />
</rows>
</listfields>
</tablebrowser>
</view>Views define Items to display & Layout
© Joomlapolis - 2012 11
TH
E R
ES
ULT The result:
12© Joomlapolis - 2012
CBSubs 2.0 uses alreadyAHA?WOW!™
© Joomlapolis - 2012 13
CBSubs Administration: 0 lines of specific code
2012-05-20
6900 lines of specifications (core CBSubs CB plugin) only
41 controllers 50 views 56 models 397 “queries” 650 settings
© Joomlapolis - 2012 14
CB 2.0 uses AHA?WOW!™ & Bootstrap!
2012-05-20
© Joomlapolis - 2012 15
`ONE’ MORE THING… AHA?WOW DOES MUCH MORE: includes:
Database-agonistic query-compiler Formal dataset query specifications Inheritence Permissions & Access Levels handling
Handles 100% of the Admin interface Toolbar, Menus Online Help All field Types Tables, Graphs, Widgets, …
And is event-driven
2012-05-20
© Joomlapolis - 2012 16
Conclusion
That was 5 Years of research in 5’
AHA?WOW! ™
Running Community Builder 2.0 And your CB 2.0 extension And, maybe, one day, Joomla!
[email protected] @joomlapolis
2012-05-20