community builder 2.0:using a new way to build web-apps

16
Community Builder 2.0: Using a new way to build Web-Apps @ J and Beyond 2012

Upload: cb-team-joomlapolis

Post on 13-Dec-2014

1.260 views

Category:

Technology


1 download

DESCRIPTION

Community Builder 2.0: Using a new way to build Web-Apps

TRANSCRIPT

Page 1: Community Builder 2.0:Using a new way to build Web-Apps

Community Builder 2.0:Using a new way to build Web-Apps

@ J and Beyond 2012

Page 2: Community Builder 2.0:Using a new way to build Web-Apps

© Joomlapolis - 2012 2

More

Traditional design

① Specify② Design③ Implement

(in MVC)

(MVC)Implementation

Design

Specifications

…Unrelated !

Page 3: Community Builder 2.0:Using a new way to build Web-Apps

© Joomlapolis - 2012 3

More

Community Builder 2.0 5 Years of research

at Lightning Labs!

RESULTLayout

Specification

✔ Related !

Page 4: Community Builder 2.0:Using a new way to build Web-Apps

4© Joomlapolis - 20122012-05-20

NO Implementatio

n!No <?PHP ?>

code!No <script />

code!No SQL queries!

Look Ma !

Page 5: Community Builder 2.0:Using a new way to build Web-Apps

© Joomlapolis - 2012 5

INTR

OD

UC

ING …

AHA?AutomaticHomogenousApplications

WebOptimizedWorkflows? !

WOW!™

Page 6: Community Builder 2.0:Using a new way to build Web-Apps

© 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

Page 7: Community Builder 2.0:Using a new way to build Web-Apps

© Joomlapolis - 2012 7

AH

A?W

OA

!

So……?…The 2’ Example:

Currency rates browser

Page 8: Community Builder 2.0:Using a new way to build Web-Apps

© 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 !

Page 9: Community Builder 2.0:Using a new way to build Web-Apps

© 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

Page 10: Community Builder 2.0:Using a new way to build Web-Apps

© 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

Page 11: Community Builder 2.0:Using a new way to build Web-Apps

© Joomlapolis - 2012 11

TH

E R

ES

ULT The result:

Page 12: Community Builder 2.0:Using a new way to build Web-Apps

12© Joomlapolis - 2012

CBSubs 2.0 uses alreadyAHA?WOW!™

Page 13: Community Builder 2.0:Using a new way to build Web-Apps

© 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

Page 14: Community Builder 2.0:Using a new way to build Web-Apps

© Joomlapolis - 2012 14

CB 2.0 uses AHA?WOW!™ & Bootstrap!

2012-05-20

Page 15: Community Builder 2.0:Using a new way to build Web-Apps

© 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

Page 16: Community Builder 2.0:Using a new way to build Web-Apps

© 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