7. Summary
Who am I?
Who are You?
What’s this workshop about?
projects.dioscouri.com : the home for Tienda Development
8. Summary
Who am I?
Who are You?
What’s this workshop about?
projects.dioscouri.com : the home for Tienda Development
Tienda Codebase: brief introduction
9. Summary
Who am I?
Who are You?
What’s this workshop about?
projects.dioscouri.com : the home for Tienda Development
Tienda Codebase: brief introduction
What are we going to build?
10. Summary
Who am I?
Who are You?
What’s this workshop about?
projects.dioscouri.com : the home for Tienda Development
Tienda Codebase: brief introduction
What are we going to build?
CODING !!!!
12. Who am I?
Daniele Rosario
Weble is an italian company
that focuses on Joomla! based
websites, internet marketing
and web development.
13. Who am I?
Daniele Rosario
Weble is an italian company Dioscouri Design is a
that focuses on Joomla! based Manhattan-based design firm
websites, internet marketing specializing in PHP and
and web development. MySQL, with a particular
emphasis on the open source
PHP package, Joomla!
17. Who are You?
Fresh New Web Developers?
Experienced Web Developers?
Joomla! Web Developers?
18. Who are You?
Fresh New Web Developers?
Experienced Web Developers?
Joomla! Web Developers?
Tienda Web Developers?
19. Who are You?
Fresh New Web Developers?
Experienced Web Developers?
Joomla! Web Developers?
Tienda Web Developers?
....... What’s a Developer? ( If this is your answer, you’re
probably in the wrong room! )
33. http://projects.dioscouri.com
Public Space for all Dioscouri.com projects
Tienda Community dedicated space
Register now!
Checkout the SVN branch at “branches/jab11”
Fire up you IDE! ( or your notepad, if you want! )
43. Models
Are “Dumb” - they will do what they are told to do.
No default “State” - default is: return all the results.
44. Models
Are “Dumb” - they will do what they are told to do.
No default “State” - default is: return all the results.
Do not interact with $_REQUEST or other data sources
45. Models
Are “Dumb” - they will do what they are told to do.
No default “State” - default is: return all the results.
Do not interact with $_REQUEST or other data sources
Fetch the data from the Database
46. Models
Are “Dumb” - they will do what they are told to do.
No default “State” - default is: return all the results.
Do not interact with $_REQUEST or other data sources
Fetch the data from the Database
$date = JFactory::getDate()->toMysql();
$model = JModel::getInstance( 'Products', 'TiendaModel' );
$model->setState('filter_published', '1');
$model->setState('filter_published_date', $date );
$model->setState('filter_enabled', '1');
$products = $model->getList();
50. Tables
Powered up version of JTable
Support multiple keys loading
Used for fetching single rows from the Database
51. Tables
Powered up version of JTable
Support multiple keys loading
Used for fetching single rows from the Database
Contains some cool & useful methods
52. Tables
Powered up version of JTable
Support multiple keys loading
Used for fetching single rows from the Database
Contains some cool & useful methods
$order = JTable::getInstance( 'Orders', 'TiendaTable' );
$foreach( $items as $item )
{
$order->addItem( $item );
}
$order->calculateTotals();
$total = $order->order_total;
58. Helpers
Helpers perform common actions that do not fit in M, C or T
Currency Conversion
Routing
Image Resizing
TiendaHelperImage::resize( ‘product.jpg’ );
61. Loader
Tienda has a LOT of classes
We didn’t want to load everything (that is really too much!)
62. Loader
Tienda has a LOT of classes
We didn’t want to load everything (that is really too much!)
Solution: dynamic loading
63. Loader
Tienda has a LOT of classes
We didn’t want to load everything (that is really too much!)
Solution: dynamic loading
When you need a class, just load it first, and then call it!
64. Loader
Tienda has a LOT of classes
We didn’t want to load everything (that is really too much!)
Solution: dynamic loading
When you need a class, just load it first, and then call it!
Tienda::load( ‘TiendaHelperProducts’, ‘helpers.products’ );
TiendaHelperProduct::getGalleryImages( $product_id );
65. Loader
Tienda has a LOT of classes
We didn’t want to load everything (that is really too much!)
Solution: dynamic loading
When you need a class, just load it first, and then call it!
Tienda::load( ‘TiendaHelperProducts’, ‘helpers.products’ );
TiendaHelperProduct::getGalleryImages( $product_id );
Or just get it, if you are lazy
66. Loader
Tienda has a LOT of classes
We didn’t want to load everything (that is really too much!)
Solution: dynamic loading
When you need a class, just load it first, and then call it!
Tienda::load( ‘TiendaHelperProducts’, ‘helpers.products’ );
TiendaHelperProduct::getGalleryImages( $product_id );
Or just get it, if you are lazy
Tienda::get( ‘TiendaHelperProducts’, ‘helpers.products’ )->getGalleryImages( $product_id );
70. Plugins
Plugins that extends our base classes
TiendaPluginBase - (template override support & common methods)
TiendaShippingPlugin - (base class and interface for shipping plugins)
71. Plugins
Plugins that extends our base classes
TiendaPluginBase - (template override support & common methods)
TiendaShippingPlugin - (base class and interface for shipping plugins)
TiendaPaymentPlugin - (base class and interface for payment plugins)
72. Plugins
Plugins that extends our base classes
TiendaPluginBase - (template override support & common methods)
TiendaShippingPlugin - (base class and interface for shipping plugins)
TiendaPaymentPlugin - (base class and interface for payment plugins)
TiendaReportPlugin - (base report plugin with helper methods)
73. Plugins
Plugins that extends our base classes
TiendaPluginBase - (template override support & common methods)
TiendaShippingPlugin - (base class and interface for shipping plugins)
TiendaPaymentPlugin - (base class and interface for payment plugins)
TiendaReportPlugin - (base report plugin with helper methods)
TiendaToolPlugin - (multistep support & helper methods)
75. Plugins
( again)
A LOT of plugin events in Tienda code ( see Tienda Event List )
76. Plugins
( again)
A LOT of plugin events in Tienda code ( see Tienda Event List )
400 +
77. Plugins
( again)
A LOT of plugin events in Tienda code ( see Tienda Event List )
400 +
You can do almost EVERYTHING with a simple plugin
78. Plugins
( again)
A LOT of plugin events in Tienda code ( see Tienda Event List )
400 +
You can do almost EVERYTHING with a simple plugin
Tienda has a neat url that allows you to call any plugin method
79. Plugins
( again)
A LOT of plugin events in Tienda code ( see Tienda Event List )
400 +
You can do almost EVERYTHING with a simple plugin
Tienda has a neat url that allows you to call any plugin method
‘index.php?option=com_tienda&task=doTask&element=plugin_name&elementTask=pluginMethod’
81. Plugins
( this is the last one, i promise! )
All Tienda Plugins supports html overrides
82. Plugins
( this is the last one, i promise! )
All Tienda Plugins supports html overrides
template files in the plugin subfolder “tmpl”
83. Plugins
( this is the last one, i promise! )
All Tienda Plugins supports html overrides
template files in the plugin subfolder “tmpl”
output with $this->_getLayout( $filename );
84. Plugins
( this is the last one, i promise! )
All Tienda Plugins supports html overrides
template files in the plugin subfolder “tmpl”
output with $this->_getLayout( $filename );
All Tienda Plugins can have their own MVC
85. Plugins
( this is the last one, i promise! )
All Tienda Plugins supports html overrides
template files in the plugin subfolder “tmpl”
output with $this->_getLayout( $filename );
All Tienda Plugins can have their own MVC
You can write extensions for Tienda in just a few hours of work,
without compromising the entire system!
86. What are we going to build?
Ideas?
More than one extension at the same time?