Component development using new Joomla 3.0 MVC Architecture

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
ganesh35
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Nov 05, 2009 2:56 pm

Component development using new Joomla 3.0 MVC Architecture

Post by ganesh35 » Wed Oct 03, 2012 10:38 pm

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.
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

User avatar
alikon
Joomla! Champion
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

Post by alikon » Thu Oct 04, 2012 5:00 am

have you looked at com_ola ?
Nicola Galgano
i know that i don't know
www.alikonweb.it

ganesh35
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Nov 05, 2009 2:56 pm

Re: Component development using new Joomla 3.0 MVC Architect

Post by ganesh35 » Thu Oct 04, 2012 7:54 am

alikon wrote:have you looked at com_ola ?
I have tried. But it was made with Legacy Classes.
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.

sovainfo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8808
Joined: Sat Oct 01, 2011 7:06 pm

Re: Component development using new Joomla 3.0 MVC Architect

Post by sovainfo » Thu Oct 04, 2012 8:35 am

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

User avatar
Soren Jensen
Joomla! Explorer
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

Post by Soren Jensen » Thu Oct 04, 2012 1:38 pm

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.
Soren Beck Jensenhttp://www.component-creator.com/ - Build Joomla Components fast and easy

User avatar
alikon
Joomla! Champion
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

Post by alikon » Thu Oct 04, 2012 6:22 pm

this matter is discussed too on Joomla! General Development https://groups.google.com/forum/?fromgr ... wdM5dKB8qI
Nicola Galgano
i know that i don't know
www.alikonweb.it

ganesh35
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Nov 05, 2009 2:56 pm

Re: Component development using new Joomla 3.0 MVC Architect

Post by ganesh35 » Sat Oct 06, 2012 6:09 pm

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.

User avatar
Wigman27
Joomla! Apprentice
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

Post by Wigman27 » Wed Oct 10, 2012 10:57 pm

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!!
Need a website designed? Check out my Australian based web development business www.wigweb.com.au for affordable fixed price packages

User avatar
amirhosein
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Dec 07, 2009 7:19 am

Re: Component development using new Joomla 3.0 MVC Architect

Post by amirhosein » Wed Oct 24, 2012 5:53 pm

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

User avatar
alikon
Joomla! Champion
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

Post by alikon » Thu Oct 25, 2012 5:20 am

you should put on your php.ini

Code: Select all

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
Nicola Galgano
i know that i don't know
www.alikonweb.it

oliverhr
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Oct 31, 2012 7:41 pm

Re: Component development using new Joomla 3.0 MVC Architect

Post by oliverhr » Wed Oct 31, 2012 7:52 pm

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
------------
amirhosein is because the method signature:

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.

-

Extalionez
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Wed Oct 24, 2012 7:57 pm

Re: Component development using new Joomla 3.0 MVC Architect

Post by Extalionez » Tue Nov 06, 2012 2:05 pm

how quickly to expect the documentation to create extensions for joomla 3.0 without legacy?

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 342
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: Component development using new Joomla 3.0 MVC Architect

Post by ghazal » Sat Nov 10, 2012 12:03 pm

alikon wrote:you should put on your php.ini

Code: Select all

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
Hello,
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.

dtsecurity
Joomla! Apprentice
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

Post by dtsecurity » Mon Nov 12, 2012 2:52 am

alikon wrote:you should put on your php.ini

Code: Select all

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
Yes, alright....

User avatar
Wigman27
Joomla! Apprentice
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

Post by Wigman27 » Mon Nov 12, 2012 3:21 am

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
ghazal wrote:
alikon wrote:you should put on your php.ini

Code: Select all

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
Hello,
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

sovainfo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8808
Joined: Sat Oct 01, 2011 7:06 pm

Re: Component development using new Joomla 3.0 MVC Architect

Post by sovainfo » Mon Nov 12, 2012 12:26 pm

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

User avatar
alikon
Joomla! Champion
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

Post by alikon » Mon Nov 12, 2012 7:07 pm

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
:geek:
Nicola Galgano
i know that i don't know
www.alikonweb.it

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 342
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: Component development using new Joomla 3.0 MVC Architect

Post by ghazal » Mon Nov 12, 2012 7:40 pm

alikon 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
:geek:
+1

ArtRichards
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Feb 28, 2013 7:10 am

Re: Component development using new Joomla 3.0 MVC Architect

Post by ArtRichards » Thu Feb 28, 2013 7:14 am

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. :D <3

- Art Richards
Last edited by ArtRichards on Thu Feb 28, 2013 10:34 pm, edited 2 times in total.

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16553
Joined: Thu Aug 18, 2005 7:13 am

Re: Component development using new Joomla 3.0 MVC Architect

Post by Tonie » Thu Feb 28, 2013 10:04 am

@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.

ArtRichards
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Feb 28, 2013 7:10 am

Re: Component development using new Joomla 3.0 MVC Architect

Post by ArtRichards » Thu Feb 28, 2013 10:16 pm

@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?

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 342
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: Component development using new Joomla 3.0 MVC Architect

Post by ghazal » Fri Mar 01, 2013 8:21 am

Hi,
@ArtRichards
Tonie is a nice guy. I was about to report your post as potentially harmful because of this exe file.
Where do all the cool kids gather these days?
Maybe here :
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.

User avatar
alikon
Joomla! Champion
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

Post by alikon » Sat Mar 02, 2013 8:24 am

Nicola Galgano
i know that i don't know
www.alikonweb.it

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 342
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: Component development using new Joomla 3.0 MVC Architect

Post by ghazal » Sat Mar 02, 2013 9:18 am

Thanks, I've modified the package to conform to site standards.
Can't open your stuff on a mac.
Pls bear in mind that joomla community isn't OS-centric.

ArtRichards
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Feb 28, 2013 7:10 am

Re: Component development using new Joomla 3.0 MVC Architect

Post by ArtRichards » Sat Mar 02, 2013 9:40 am

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...
Last edited by ArtRichards on Sun Mar 03, 2013 12:13 am, edited 1 time in total.

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 342
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: Component development using new Joomla 3.0 MVC Architect

Post by ghazal » Sat Mar 02, 2013 11:01 am

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

User avatar
David-Andrew
Joomla! Enthusiast
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

Post by David-Andrew » Wed Mar 06, 2013 10:32 am

I'm maintaining a full list with background information here:
http://www.chillcreations.com/news/joom ... -resources
Awesome Joomla! Extensions by Chill Creations http://www.chillcreations.com
cciDEAL, ccInvoices, ccNewsletter

User avatar
pishro
Joomla! Explorer
Joomla! Explorer
Posts: 301
Joined: Tue Oct 09, 2012 7:22 am

Re: Component development using new Joomla 3.0 MVC Architect

Post by pishro » Thu Aug 22, 2013 5:49 pm

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.

solracpt
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Jan 12, 2012 2:19 am

Re: Component development using new Joomla 3.0 MVC Architect

Post by solracpt » Fri Jan 31, 2014 6:03 pm

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

ghazal
Joomla! Explorer
Joomla! Explorer
Posts: 342
Joined: Fri Aug 19, 2005 12:12 pm
Location: Out of my mind ...sometimes

Re: Component development using new Joomla 3.0 MVC Architect

Post by ghazal » Sat Feb 01, 2014 9:04 am

Using php.ini to hide error notice, is not so good idea..
I agree with this, definitely.


Locked

Return to “Joomla! 3.x Coding”