Component development using new Joomla 3.0 MVC Architecture
Moderators: ooffick, General Support Moderators
Forum rules
-
- Joomla! Apprentice
- Posts: 13
- Joined: Thu Nov 05, 2009 2:56 pm
Component development using new Joomla 3.0 MVC Architecture
I have been looking for the information regarding Component Development using Joomla 3.0.
I have tried the following references
- http://docs.joomla.org/Potential_backwa ... tform_11.1
- http://docs.joomla.org/Developing_a_Mod ... troduction
But I would like to create a proper native component for Joomla 3.0 instead of a Legacy.
It would be appreciated, if someone can guide me with a sample component or a reference to find it.
I have tried the following references
- http://docs.joomla.org/Potential_backwa ... tform_11.1
- http://docs.joomla.org/Developing_a_Mod ... troduction
But I would like to create a proper native component for Joomla 3.0 instead of a Legacy.
It would be appreciated, if someone can guide me with a sample component or a reference to find it.
Last edited by imanickam on Tue Oct 30, 2012 4:42 pm, edited 1 time in total.
Reason: Moved the topic from the forum Components - Joomla! 3.0 to the forum Joomla! 3.0 Coding
Reason: Moved the topic from the forum Components - Joomla! 3.0 to the forum Joomla! 3.0 Coding
- alikon
- Joomla! Champion
- Posts: 5941
- Joined: Fri Aug 19, 2005 10:46 am
- Location: Roma
- Contact:
Re: Component development using new Joomla 3.0 MVC Architect
have you looked at com_ola ?
-
- Joomla! Apprentice
- Posts: 13
- Joined: Thu Nov 05, 2009 2:56 pm
Re: Component development using new Joomla 3.0 MVC Architect
I have tried. But it was made with Legacy Classes.alikon wrote:have you looked at com_ola ?
I am upgrading my joomla 2.5 components to 3.0 native. I just want to make them one time upgrade cause Legacy classes will be removed soon.
Also I am interested in utilizing the new controller system and exceptions.
-
- Joomla! Exemplar
- Posts: 8808
- Joined: Sat Oct 01, 2011 7:06 pm
Re: Component development using new Joomla 3.0 MVC Architect
You should be looking at
docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_3.0_and_Joomla_Platform_12.1
docs.joomla.org/Developing_a_Model-View-Controller_Component/3.0/Introduction
docs.joomla.org/Developing_a_Model-View-Controller_Component/3.0
tip: search docs.joomla.org on 3.0 for urls (don't work on galaxy tab 2)
docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_3.0_and_Joomla_Platform_12.1
docs.joomla.org/Developing_a_Model-View-Controller_Component/3.0/Introduction
docs.joomla.org/Developing_a_Model-View-Controller_Component/3.0
tip: search docs.joomla.org on 3.0 for urls (don't work on galaxy tab 2)
Issue with migrating? Include logs/joomla_update.php in your report!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!
- Soren Jensen
- Joomla! Explorer
- Posts: 290
- Joined: Fri Nov 11, 2005 8:53 am
- Location: Granada, Spain
- Contact:
Re: Component development using new Joomla 3.0 MVC Architect
Hi ganesh35, I am with you. I would also love to see how a "real" Joomla 3.0 component is supposed to be written, but it appears that all the examples we have are just adding "Legacy" to class names.
I need to know this as we develop the Joomla Component Creator and the developers that use our tool are eager to start building 3.0 components.
I need to know this as we develop the Joomla Component Creator and the developers that use our tool are eager to start building 3.0 components.
Soren Beck Jensen - http://www.component-creator.com/ - Build Joomla Components fast and easy
- alikon
- Joomla! Champion
- Posts: 5941
- Joined: Fri Aug 19, 2005 10:46 am
- Location: Roma
- Contact:
Re: Component development using new Joomla 3.0 MVC Architect
this matter is discussed too on Joomla! General Development https://groups.google.com/forum/?fromgr ... wdM5dKB8qI
-
- Joomla! Apprentice
- Posts: 13
- Joined: Thu Nov 05, 2009 2:56 pm
Re: Component development using new Joomla 3.0 MVC Architect
Hello All,
After hours of digging and struggling. I understood that we should go with the Legacy option for now.
Joomla 3.0 preparing us (developers) to think about New MVC architecture in future. Right now we don't have enough documentation.
I strongly believe let the experts do the documentation for the Joomla 3.0 Component development.
Till then just keep pasting Legacy. Ignore about writing the Joomla 3.0 way.
After hours of digging and struggling. I understood that we should go with the Legacy option for now.
Joomla 3.0 preparing us (developers) to think about New MVC architecture in future. Right now we don't have enough documentation.
I strongly believe let the experts do the documentation for the Joomla 3.0 Component development.
Till then just keep pasting Legacy. Ignore about writing the Joomla 3.0 way.
- Wigman27
- Joomla! Apprentice
- Posts: 29
- Joined: Fri Apr 13, 2012 6:35 am
- Location: Lithgow NSW Australia
- Contact:
Re: Component development using new Joomla 3.0 MVC Architect
Thank you very much ganesh35!! I have been looking right into this for ages with no result.
I have been watching the writing of development of 3.0 component, hopefully that will be added to as time goes on.
I would love to know how to find out what's new in version 12 of the platform if you know of a good list. I'm going to develop a component using 2.5 and learn that way. Then when the documentation for 3.0 is a little more comprehensive.
Thanks again for your help!!
I have been watching the writing of development of 3.0 component, hopefully that will be added to as time goes on.
I would love to know how to find out what's new in version 12 of the platform if you know of a good list. I'm going to develop a component using 2.5 and learn that way. Then when the documentation for 3.0 is a little more comprehensive.
Thanks again for your help!!
Need a website designed? Check out my Australian based web development business www.wigweb.com.au for affordable fixed price packages
- amirhosein
- Joomla! Fledgling
- Posts: 4
- Joined: Mon Dec 07, 2009 7:19 am
Re: Component development using new Joomla 3.0 MVC Architect
Hi,
Thanks for all
i install ola component but it causing error
any body knows whay?
------------
Strict Standards: Declaration of OlaController::display() should be compatible with that of JControllerLegacy::display() in C:\xampp\htdocs\joomla3\administrator\components\com_ola\controller.php on line 38
------------
Thanks for all
i install ola component but it causing error
any body knows whay?
------------
Strict Standards: Declaration of OlaController::display() should be compatible with that of JControllerLegacy::display() in C:\xampp\htdocs\joomla3\administrator\components\com_ola\controller.php on line 38
------------
- alikon
- Joomla! Champion
- Posts: 5941
- Joined: Fri Aug 19, 2005 10:46 am
- Location: Roma
- Contact:
Re: Component development using new Joomla 3.0 MVC Architect
you should put on your php.ini
Code: Select all
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Oct 31, 2012 7:41 pm
Re: Component development using new Joomla 3.0 MVC Architect
amirhosein is because the method signature:amirhosein wrote: ------------
Strict Standards: Declaration of OlaController::display() should be compatible with that of JControllerLegacy::display() in C:\xampp\htdocs\joomla3\administrator\components\com_ola\controller.php on line 38
------------
Code: Select all
//JControllerLegacy display declaration
public function display($cachable = false, $urlparams = array())...
Code: Select all
//com_ola\controller.php method display declaration
function display($cachable = false)...
I'm a totally newbie to joomla but I want to start developing for v3 but there is a lack of sample code.
-
-
- Joomla! Apprentice
- Posts: 11
- Joined: Wed Oct 24, 2012 7:57 pm
Re: Component development using new Joomla 3.0 MVC Architect
how quickly to expect the documentation to create extensions for joomla 3.0 without legacy?
-
- Joomla! Explorer
- Posts: 343
- Joined: Fri Aug 19, 2005 12:12 pm
- Location: Out of my mind ...sometimes
Re: Component development using new Joomla 3.0 MVC Architect
Hello,alikon wrote:you should put on your php.iniCode: Select all
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
no hard feelings, but this kind of reply is very, very useless in this context.
To get Strict standards errors when developing is mandatory. It helps us understand where our coding is wrong when we update an extension in the new joomla 3.0 environment (PHP 5.3.X and upward, new joomla API).
I can understand that people who only want to launch a joomla site don't need/don't want those pesky Notices, but the thread here is about "component development AND using new joomla 3.0 MVC architecture".
If something is not working properly, it helps targeting where the errors lie.
@oliverhr
Thanks, your reply helped me a lot.
-
- Joomla! Apprentice
- Posts: 6
- Joined: Mon Nov 12, 2012 2:48 am
- Location: Viet Nam
- Contact:
Re: Component development using new Joomla 3.0 MVC Architect
Yes, alright....alikon wrote:you should put on your php.iniCode: Select all
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
- Wigman27
- Joomla! Apprentice
- Posts: 29
- Joined: Fri Apr 13, 2012 6:35 am
- Location: Lithgow NSW Australia
- Contact:
Re: Component development using new Joomla 3.0 MVC Architect
I must say that I am in full agreeance with you! I installed a pre purchased joomla template for a customer a couple of months ago and there was page after page of errors, all be they were not fatal errors but still. As developers I think it's critical to build our code error free!
Thanks
Lee
Thanks
Lee
ghazal wrote:Hello,alikon wrote:you should put on your php.iniCode: Select all
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
no hard feelings, but this kind of reply is very, very useless in this context.
To get Strict standards errors when developing is mandatory. It helps us understand where our coding is wrong when we update an extension in the new joomla 3.0 environment (PHP 5.3.X and upward, new joomla API).
I can understand that people who only want to launch a joomla site don't need/don't want those pesky Notices, but the thread here is about "component development AND using new joomla 3.0 MVC architecture".
If something is not working properly, it helps targeting where the errors lie.
@oliverhr
Thanks, your reply helped me a lot.
Need a website designed? Check out my Australian based web development business www.wigweb.com.au for affordable fixed price packages
-
- Joomla! Exemplar
- Posts: 8808
- Joined: Sat Oct 01, 2011 7:06 pm
Re: Component development using new Joomla 3.0 MVC Architect
Apparantly it was very usefull for the person who posted here by mistake! He just installed ola and didn't know what to do! Obviously not a component developer! Or maybe he missed the change in php concerning strict!
A developer wouldn't put the strict message in this topic at all, he would fix it or ignore it!
A developer wouldn't put the strict message in this topic at all, he would fix it or ignore it!
Issue with migrating? Include logs/joomla_update.php in your report!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!
- alikon
- Joomla! Champion
- Posts: 5941
- Joined: Fri Aug 19, 2005 10:46 am
- Location: Roma
- Contact:
Re: Component development using new Joomla 3.0 MVC Architect
there are a lot of unskilled developer ?
i'm one of them
I hope that with community help we can become a little bit skilled
i'm one of them
I hope that with community help we can become a little bit skilled
-
- Joomla! Explorer
- Posts: 343
- Joined: Fri Aug 19, 2005 12:12 pm
- Location: Out of my mind ...sometimes
Re: Component development using new Joomla 3.0 MVC Architect
+1alikon wrote:there are a lot of unskilled developer ?
i'm one of them
I hope that with community help we can become a little bit skilled
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Feb 28, 2013 7:10 am
Re: Component development using new Joomla 3.0 MVC Architect
Well, tbh, just b/c someone is a "real" developer doesn't mean they know everything about a given framework or standard.
Anywhoo... I searched and searched, was completely unable to find any modules working on Joomla 3.0 without errors. I tried a few of the modules but was getting nowhere. Here's a version I've thrown together that seems to work nicely on Joomla 3.0 Included are the Component and Module from the much revered tutorials.
http://txdev.net/WORKING_JOOMLA_3.0_COM_AND_MOD.zip
Hope this helps someone out there. Joomla devs, you need to learn to share the love. <3
- Art Richards
Anywhoo... I searched and searched, was completely unable to find any modules working on Joomla 3.0 without errors. I tried a few of the modules but was getting nowhere. Here's a version I've thrown together that seems to work nicely on Joomla 3.0 Included are the Component and Module from the much revered tutorials.
http://txdev.net/WORKING_JOOMLA_3.0_COM_AND_MOD.zip
Hope this helps someone out there. Joomla devs, you need to learn to share the love. <3
- Art Richards
Last edited by ArtRichards on Thu Feb 28, 2013 10:34 pm, edited 2 times in total.
- Tonie
- Joomla! Master
- Posts: 16553
- Joined: Thu Aug 18, 2005 7:13 am
Re: Component development using new Joomla 3.0 MVC Architect
@artRichards. If you don't mind, I've removed your download file as it was a .exe file. Not really a file extension common for a plugin.
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Feb 28, 2013 7:10 am
Re: Component development using new Joomla 3.0 MVC Architect
@Tonie, Thanks, I've modified the package to conform to site standards.
Hopefully someone will find some use for this.
Where do all the cool kids gather these days?
Hopefully someone will find some use for this.
Where do all the cool kids gather these days?
-
- Joomla! Explorer
- Posts: 343
- Joined: Fri Aug 19, 2005 12:12 pm
- Location: Out of my mind ...sometimes
Re: Component development using new Joomla 3.0 MVC Architect
Hi,
@ArtRichards
Tonie is a nice guy. I was about to report your post as potentially harmful because of this exe file.
Joomla! CMS Development
https://groups.google.com/forum/?fromgr ... la-dev-cms
or here :
Joomla! General Development
https://groups.google.com/forum/?fromgr ... ev-general
Final decisions seen here :
https://github.com/joomla/joomla-cms
If you want to join one of the test groups :
https://groups.google.com/forum/?fromgr ... Jrw2pO7GEw
Read Elin's first message.
@ArtRichards
Tonie is a nice guy. I was about to report your post as potentially harmful because of this exe file.
Maybe here :Where do all the cool kids gather these days?
Joomla! CMS Development
https://groups.google.com/forum/?fromgr ... la-dev-cms
or here :
Joomla! General Development
https://groups.google.com/forum/?fromgr ... ev-general
Final decisions seen here :
https://github.com/joomla/joomla-cms
If you want to join one of the test groups :
https://groups.google.com/forum/?fromgr ... Jrw2pO7GEw
Read Elin's first message.
- alikon
- Joomla! Champion
- Posts: 5941
- Joined: Fri Aug 19, 2005 10:46 am
- Location: Roma
- Contact:
-
- Joomla! Explorer
- Posts: 343
- Joined: Fri Aug 19, 2005 12:12 pm
- Location: Out of my mind ...sometimes
Re: Component development using new Joomla 3.0 MVC Architect
Can't open your stuff on a mac.Thanks, I've modified the package to conform to site standards.
Pls bear in mind that joomla community isn't OS-centric.
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Feb 28, 2013 7:10 am
Re: Component development using new Joomla 3.0 MVC Architect
Here's a proper zip file.
http://TxDev.net/Joomla_3.0_Example_Mod ... _First.zip
Let me know if this isn't compatible. Who knew people would have such difficulties with a compressed file? But it does illustrate the diverse needs of such a broad community as Joomla! I'm looking forward to the event and hoping I'll be able to lend a hand!
Edit: *Thank you* alikon for the link. Do you know if the SB team will be participating in the upcoming pre release event?
Edit: Continuing to squash bugs...
http://TxDev.net/Joomla_3.0_Example_Mod ... _First.zip
Let me know if this isn't compatible. Who knew people would have such difficulties with a compressed file? But it does illustrate the diverse needs of such a broad community as Joomla! I'm looking forward to the event and hoping I'll be able to lend a hand!
Edit: *Thank you* alikon for the link. Do you know if the SB team will be participating in the upcoming pre release event?
Edit: Continuing to squash bugs...
Last edited by ArtRichards on Sun Mar 03, 2013 12:13 am, edited 1 time in total.
-
- Joomla! Explorer
- Posts: 343
- Joined: Fri Aug 19, 2005 12:12 pm
- Location: Out of my mind ...sometimes
Re: Component development using new Joomla 3.0 MVC Architect
Looks like you developed your extensions "by the book", netbeans and all, nice.
But maybe, you should delete the "nbproject" folder in the component and the Makefile file in the module.
Also, as you pointed out, joomla community is made of a very large range of users, from absolute beginners (barely knowing html) to seasoned devs.
To target the first group, it'd be better to name your zip file something like my_comp_UNZIP_FIRST as your component is installed correctly when using your global zip file, but not the module.
It is possible though to install component/modules/plugins all together.
One last thing :
A strict standard error when creating a new Message :
Strict Standards: Declaration of HelloWorldTableHelloWorld::_getAssetParentId() should be compatible with JTable::_getAssetParentId($table = NULL, $id = NULL) in /administrator/components/com_helloworld/tables/helloworld.php on line 12
NB : on a test site, I always set PHP errors On
But maybe, you should delete the "nbproject" folder in the component and the Makefile file in the module.
Also, as you pointed out, joomla community is made of a very large range of users, from absolute beginners (barely knowing html) to seasoned devs.
To target the first group, it'd be better to name your zip file something like my_comp_UNZIP_FIRST as your component is installed correctly when using your global zip file, but not the module.
It is possible though to install component/modules/plugins all together.
One last thing :
A strict standard error when creating a new Message :
Strict Standards: Declaration of HelloWorldTableHelloWorld::_getAssetParentId() should be compatible with JTable::_getAssetParentId($table = NULL, $id = NULL) in /administrator/components/com_helloworld/tables/helloworld.php on line 12
NB : on a test site, I always set PHP errors On
- David-Andrew
- Joomla! Enthusiast
- Posts: 237
- Joined: Thu Mar 20, 2008 3:37 pm
- Location: The Netherlands
- Contact:
Re: Component development using new Joomla 3.0 MVC Architect
I'm maintaining a full list with background information here:
http://www.chillcreations.com/news/joom ... -resources
http://www.chillcreations.com/news/joom ... -resources
Awesome Joomla! Extensions by Chill Creations http://www.chillcreations.com
cciDEAL, ccInvoices, ccNewsletter
cciDEAL, ccInvoices, ccNewsletter
- pishro
- Joomla! Explorer
- Posts: 301
- Joined: Tue Oct 09, 2012 7:22 am
Re: Component development using new Joomla 3.0 MVC Architect
hi,
my question is: are there any good examples on using the new MVC from Joomla?
http://forum.joomla.org/viewtopic.php?f=727&t=814726
I advise this post. thank yao for help.
my question is: are there any good examples on using the new MVC from Joomla?
http://forum.joomla.org/viewtopic.php?f=727&t=814726
I advise this post. thank yao for help.
-
- Joomla! Apprentice
- Posts: 8
- Joined: Thu Jan 12, 2012 2:19 am
Re: Component development using new Joomla 3.0 MVC Architect
Hi,
For all developers in Joomla 3.
For the error notice "_getAssetParentId() should be compatible with JTable::_getAssetParentId($table = NULL, $id = NULL)"
The SOLUTION is:
JTable::_getAssetParentId(JTable $table = null, $id = null)
Must add JTable to the variable $table on the function in the table file/files.
I hope this helps you out!
PS:Using php.ini to hide error notice, is not so good idea..
Regards
For all developers in Joomla 3.
For the error notice "_getAssetParentId() should be compatible with JTable::_getAssetParentId($table = NULL, $id = NULL)"
The SOLUTION is:
JTable::_getAssetParentId(JTable $table = null, $id = null)
Must add JTable to the variable $table on the function in the table file/files.
I hope this helps you out!
PS:Using php.ini to hide error notice, is not so good idea..
Regards
-
- Joomla! Explorer
- Posts: 343
- Joined: Fri Aug 19, 2005 12:12 pm
- Location: Out of my mind ...sometimes
Re: Component development using new Joomla 3.0 MVC Architect
I agree with this, definitely.Using php.ini to hide error notice, is not so good idea..