I wonder that what is the best way of writing a component for joomla 2.5 since there is many method to do that. I looked for some component which are already done this is confusing to see many ways. Which is more comfortable JForms base controller and model classes. I want to make a component which should have forms on front-end to publish some notifications or ads by users or membership registration fields on front-end also. Thanks for reading.
1 Answers
I believe 'the proper way' to create a component in Joomla 2.5 is to use the MVC approach as defined by the joomla wiki tutorial found here. In reality, however, not everyone has the time or the smarts to do things 'the proper way.' From the many components and modules I've downloaded / purchased from the market place, I've yet to see two different developers implement things the 'same' way. For fear of getting OT and philosophical about programming, here is a bit of guidance I've used so far:
From a recent Joomla meetup focused on creating a component from scratch. Here are the slides and downloads if you want to review them.
http://www.tamlyncreative.com.au/software/howtocreatejoomlacomponent.zip
http://www.slideshare.net/TimPlummer/
Something you might want to look into that's recently come to my attention is called Fabrik. Think of it as Joomla's answer to RoR.
-
thanks for quick reply. After many days ı couldnt reach my goal which way is proper for me... I'll look to links above and I'll back to give feedback and may be more questions. – freezer Jun 16 '12 at 10:17
-
Not a problem. And as an auxillary suggestion, you could probably check out the marketplace ([here](http://extensions.joomla.org/extensions)) to see how others have done things. Hopefully you can get some free ones of decent quality that have targeted 2.5. Reading others' work has usually helped me grasp concepts quicker. – Jun 16 '12 at 10:19
-
yesterday I installed some component to my demo site on local computer. Still I have many quesitons. I couldnt understad that every tutorial and component have form and field folder in model folder. But if ı have more custom field it is hard to handel with them since there will be more php files and I think there is no way to get some datas from model to the fields. I have many questions also but I dont know how I will ask them. I realy need help :/ – freezer Jun 16 '12 at 10:31
-
Thanks for a useful answer. Your slides link is broken. Any chance they're still available? – isherwood Dec 19 '13 at 19:37