12

I have created a couple of plugins for Joomla 3.2 and have recently started on a component to manage apartment rentals. I was wondering if there is a framework out there that had the basic file/folder structure already created with the files necessary to get a component going quickly.

I don't want to have to recreate the wheel every time I start, and the files and classes necessary to get a component going have a basic necessary structure. Is there one already out there?

If there is not, which stock Joomla component would be a good example to work from?

EDIT: Upon seeing the answers, I think maybe "framework" was a bad choice of terms. I am not looking for anything that has a codebase of it's own. I was lokking for something that has the file/folder structure that is common to all Joomla components and required to run, such as the controller, the views folder, the models folder, etc.

What I am looking for should have no dependencies that are not already a part of the Joomla core code.

I found one for joomla 1.5 that had all the necessary files and all you had to do was rename the classes and files to match the name of your component and install and you would have a basic admin view, a front end menu view, , etc... I am hoping someone out there created one for

1

7 Answers 7

15

One tool that I've used in the past is Component Creator: http://www.component-creator.com/en/.

This tool allows you to outline one table for free (more if you sign up for a paid package) as well as other general information on the component itself. You can then download an installable zip file to get the component started.

For those that are happy jumping into the code anyway, this can be a great simple method to jumpstart the component development.


There is also some extensions that you can install in Joomla to help you develop other Joomla components. One example of that style of helper is this free extension Easy Creator: http://extensions.joomla.org/extensions/miscellaneous/development/5908

This can be a great add-on for a testing environment mixed with a build tool in one nice package.


There is another tool called the Joomla Component Generator for simple and fast component generation. It allows you to create unlimited tables for free. There are paid packages but it's not necessary to purchase unless you need multiple views. It generates an installable zip file for download as well. A test reveals the benefits of this generator. Take a look at the generated code and indentation.

http://www.componentgenerator.com/

3
  • Component creator looks promising. Can't wait to try it out. Commented Apr 22, 2014 at 18:31
  • Component Creator is really good to get an installable MVC component "framework" in a few minutes.
    – fruppel
    Commented Apr 23, 2014 at 7:57
  • Component creator is nice and does provide a good deal of what I need even for the free level.
    – pathfinder
    Commented Apr 25, 2014 at 18:49
8

After writing numerous extensions for clients, I found myself following a lot of the same patterns over and over. To keep things DRY, I created a "component framework" that abstracts away most of the common tasks that I do, but so far it's only been used internally at my company. It lacks a lot of features, but it gets the job done for what I need.

I said that to say this - develop your own component framework in the same way. Take the commonalities of the code you are currently producing, and move it up a level in the OO hierarchy into it's own layer that sits between your component and Joomla. With this approach, you avoid the "if the framework goes bust" problem that Chad mentioned, and you understand it that much better. It's worked well for me so far.

4
  • this is pretty much what I am looking for. There was a nice one for joomla 1.5 that does precisely what you are talking about.
    – pathfinder
    Commented Apr 23, 2014 at 2:39
  • 1
    There is a DRY component framework that ships with newer versions of Joomla, called FOF (Framework on Framework), maybe you want to have a look at it: Documentation, Google Group
    – fruppel
    Commented Apr 23, 2014 at 8:00
  • I'm aware of FOF, but don't want to use it, as it's pretty heavy in terms of size and it uses outdated practices, such as Singleton and Statics in a LOT of places, which I don't like. Commented Apr 23, 2014 at 13:11
  • Hi Don, I did the same thing and I am very happy. I recommend other development to do it as well. Commented Dec 2, 2016 at 11:43
5

I don't like to recommend any sort of 'framework' for this sort of thing for several reasons:

1) The CMS has a 'framework', and I wish if there was a need to make it 'easier' to write extensions we would focus on the core framework code instead of writing 3rd party items.

2) If you write your extension on a framework that goes defunct you're rather screwed.

3) Using the core is ideally going to make updates better. This has not ALWAYS been the case which is why there are 3rd party frameworks for this, but the more we insist on it being the case and expect it to be, the more it actually will be. If we don't focus on it it'll never improve.

--

So with that said, there is a "RAD Framework" in Joomla called FoF (framework on framework). I have not used it but it's said to be a time saving tool. There's some documentation on it here:

https://www.akeebabackup.com/documentation/fof/getting-started-with-fof.html

Note - FoF is INCLUDED in Joomla 3.2's distro, so you don't need to install it if you're extension is for Joomla 3.2+.

Finally - if you are wanting to stay in the core and use the core MVC classes, currently it's still encouraged to use the legacy MVC classes (will be changing as soon as the new MVC is thoroughly sussed through). A good base extension to look at is really the com_contact or com_banners component. They're fairly simple and you can pick up on things like JForm and custom models that way.

1
  • I agree with @chad. If you really want to go with a framework, then i would suggest you to give FOF a try. It is far better than other frameworks. Commented Apr 23, 2014 at 6:42
4

I would HIGHLY recommend Cook Self Service. I believe there's a small charge, but it generated about 85% of our major education component, saving $1000's to get started with, and the code it generated was nice and clean for our modification.

3

Have you taken a look at the Joomla Hello World component? I have not looked at it yet, but it looks like it has the minimum files needed for building a component. Also since Joomla 3.2 includes Framework on Framework (FOF), have you looked at the To-Do FOF example component? I know that I have writing a custom Joomla 3.x component on my list of things to do and these were the two examples I was planning to use in beginning the project. Hopefully, they will work for you too.

1
  1. We have developed RB Framework, on top of Joomla. We use it for our component development (PayPlans, PayInvoice, etc.) (https://github.com/readybytes/rbframework)

  2. We have a component builder for the same (https://github.com/readybytes/component-builder)

Above framework reduces a lot of stress of doing same things again and again.

Imp :

  1. Documentation is not available. You need to learn by existing components.
  2. Its so powerful that our website have custom built component for blogging and documentation (developed in a day).
1
  • It would be great in the readme if you can just give some pointers on how to use it. Right now I would not know where to start. Commented Apr 30, 2014 at 16:24
1

Joomla Componente Builder looks might be of interest. Find the complete open source code at GitHub.

For German users: Have a look at this real life demo at Joomla!Day 2019 presented by Marco Dings.

Beside that, there is a bunch of video tutorials at YouTube.

This solution should create Joomla 3 and Joomla 4 components.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.