MVC in 3.0

593 views
Skip to first unread message

AJH

unread,
Jul 22, 2012, 7:05:26 PM7/22/12
to joomla-de...@googlegroups.com
When can we expect to see documentation and a sample component written for Joomla! 3.0 new MVC structure?

Nick Savov

unread,
Jul 22, 2012, 8:18:47 PM7/22/12
to joomla-de...@googlegroups.com
Hi there,

Joomla! documentation (http://docs.joomla.org/) is community-created
documentation and anyone can contribute documentation. New pages can be
created by anyone and current pages can be edited by anyone.

In short, you can expect to see documentation and a sample component
written for Joomla! 3.0's new MVC structure whenever someone takes the
time to write it.

Hope this helps!

If you are able, it would be great if you could contribute to the Joomla
3.0 documentation.

Kind regards,
Nick

> When can we expect to see documentation and a sample component written for
> Joomla! 3.0 new MVC structure?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-general/-/3LU9byXUnKgJ.
> To post to this group, send an email to
> joomla-de...@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-gene...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>
>

AJH

unread,
Jul 22, 2012, 9:40:19 PM7/22/12
to joomla-de...@googlegroups.com
Thanks Nick,

Has the MVC architecture in 3.0 been finalized (or close to)?  Are there any core Joomla! components in the alpha using the new MVC design?


On Sunday, 22 July 2012 17:18:47 UTC-7, Nick Savov wrote:
Hi there,

Joomla! documentation (http://docs.joomla.org/) is community-created
documentation and anyone can contribute documentation.  New pages can be
created by anyone and current pages can be edited by anyone.

In short, you can expect to see documentation and a sample component
written for Joomla! 3.0's new MVC structure whenever someone takes the
time to write it.

Hope this helps!

If you are able, it would be great if you could contribute to the Joomla
3.0 documentation.

Kind regards,
Nick

> When can we expect to see documentation and a sample component written for
> Joomla! 3.0 new MVC structure?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! General Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-general/-/3LU9byXUnKgJ.
> To post to this group, send an email to
> To unsubscribe from this group, send email to

elin

unread,
Jul 23, 2012, 1:57:02 AM7/23/12
to joomla-de...@googlegroups.com
Joomla 3.0 will include the platform packages for the new MVC but the CMS itself will still be using the legacy MVC. This may change over the release cycle if people do the work (I would love to see some people jumping in to write the new controllers we would need for the CMS library for example and also to help test Michael's work transitioning to JApplicationWeb). Lots of us are doing pieces of work to make transitioning possible but a lot more work is needed.  

By Joomla 4.0 the CMS will be transitioned to the new MVC. 

Looking at the pull requests and activity in the platform repo it also weems likely that by 3.1 we'll have a new  cache package available and that will also be something to consider incorporating, potentially along with JDatabaseObject. 

As previously discussed on various lists although there are definitely challenges it is possible to build a new MVC extension that works inside the CMS 

Elin 

Qson

unread,
Jul 23, 2012, 11:35:56 AM7/23/12
to joomla-de...@googlegroups.com
I found this manual page which describes the new MVC pattern really good:
http://developer.joomla.org/manual/chap-Joomla_Platform_Manual-MVC.html

If developing a new component intended for release in a year or so, is it recommended to use the "new" MVC implementation or should we stick with the "Legacy" implementation? And if I use the new implementation, will it work when the CMS is still using the old implementation?

// Qson

Michael Babker

unread,
Jul 23, 2012, 11:59:17 AM7/23/12
to joomla-de...@googlegroups.com
You're going to loose a lot of the code in the legacy MVC structure if you go with the new.  For example, in the backend, you lose JControllerAdmin and JModelAdmin, which do a lot of the heavy lifting for components right now.  It isn't impossible to use the new code, but you will have to write a lot more code in the short term to use it and replicate the baseline functions available now (i.e. save, delete, etc.).

-Michael

Please pardon any errors, this message was sent from my iPhone.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/PZ-2rEzg6sMJ.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.

Prasit Gebsaap

unread,
Jul 23, 2012, 12:09:46 PM7/23/12
to joomla-de...@googlegroups.com
For my opinion, Joomla 3.0 is a short term support, so its MVC is for us, developers, to prepare for use it when Joomla 3.5 LTS come into play. So now we may use Joomla 3.0 for testing, and extension development that is to be ready when Joomla 3.5 available.

I have test my Joomla 2.5 extension with Joomla 3.0 but it did not work. So I have to go into changes in 3.0 first.

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/PZ-2rEzg6sMJ.

To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

elin

unread,
Jul 23, 2012, 1:29:28 PM7/23/12
to joomla-de...@googlegroups.com
Remember that you need to add Legacy any place you are directly extending JModel, JView or JController.  If it is indirect (like through JModellist) you don't have to, it's already taken care of.

Other than that and the fact that as announced long ago deprecated code has been removed (I'd guess that JParameter is the biggest impact )   extensions should only need minor changes ... although you will want to look at the output changes that Kyle is working on.

3.0 is short term support but it is where the most significant structural changes will be made. Unless something changes dramatically the MVC for 3.0 is the existing MVC and will be for the entire 3.x series since within a series we don't do migration.   That said, I think many people are anxious to be using the newer classes and if people want to jump in and start working on the supporting reusable classes for CMS components equivalent to JModeladmin, JControllerAdmin, and so on that would be great.  As I said, I think the controllers would be the ideal place to start.

Of course if you are building stand alone platform applications the new MVC and jApplicationWeb/JApplicationCLI are completely the way you should work and the nice thing about the way we have done this is that the new packages are already right there on your server having arrived with the CMS.

Elin


On Monday, July 23, 2012 12:09:46 PM UTC-4, Soap wrote:
For my opinion, Joomla 3.0 is a short term support, so its MVC is for us, developers, to prepare for use it when Joomla 3.5 LTS come into play. So now we may use Joomla 3.0 for testing, and extension development that is to be ready when Joomla 3.5 available.

I have test my Joomla 2.5 extension with Joomla 3.0 but it did not work. So I have to go into changes in 3.0 first.

On 23 July 2012 22:35, Qson <and...@qson.se> wrote:
I found this manual page which describes the new MVC pattern really good:
http://developer.joomla.org/manual/chap-Joomla_Platform_Manual-MVC.html

If developing a new component intended for release in a year or so, is it recommended to use the "new" MVC implementation or should we stick with the "Legacy" implementation? And if I use the new implementation, will it work when the CMS is still using the old implementation?

// Qson

Den måndagen den 23:e juli 2012 kl. 01:05:26 UTC+2 skrev AJH:
When can we expect to see documentation and a sample component written for Joomla! 3.0 new MVC structure?

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/PZ-2rEzg6sMJ.

To post to this group, send an email to joomla-dev-general@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

Prasit Gebsaap

unread,
Jul 23, 2012, 5:47:59 PM7/23/12
to joomla-de...@googlegroups.com
Thanks, Elin for useful information. So in the case to move 2.5 extension to 3.0, we have to
1. modify JController::getInstance to JControllerLegay::getInstance in master component file.
2. modify extends JController to JControllerLegacy in master/default controller.
3. modify extends JView to JViewLegacy in all of view classes.

In general case, we have to change JController to JControllerLegacy, JModel to JModelLegacy and JView to JView:Legacy. The other classes have no effect. 

But the best thing is to use the new MVC approach introducing in Joomla! 3.0.
 

To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/CfgN8eedyNcJ.

To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

elin

unread,
Jul 23, 2012, 6:22:15 PM7/23/12
to joomla-de...@googlegroups.com
Yes that's what to do in your file (you can see this in the core extensions). And these will work in 2.5 also.

Elin
To unsubscribe from this group, send email to joomla-dev-general+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/CfgN8eedyNcJ.

To post to this group, send an email to joomla-dev-general@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

elin

unread,
Jul 23, 2012, 6:45:10 PM7/23/12
to joomla-de...@googlegroups.com
I want to point out Michael's work here


If people are really interested in moving toward the new MVC we need to move to JApplicationWeb and to do taht we need testers and helpers.

Elin

Prasit Gebsaap

unread,
Jul 24, 2012, 2:14:30 AM7/24/12
to joomla-de...@googlegroups.com
Great, I think I can help for testing.

To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/v3qNeDBKEe0J.

To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
Reply all
Reply to author
Forward
0 new messages