Development environment
Jonas Fagnastøl Henriksen
New Member
Posts: 15
10 năm 3 tháng trước #295
bởi Jonas Fagnastøl Henriksen
Replied by Jonas Fagnastøl Henriksen on topic Development environment
Hi,
this is an interesting thread, and I'll share some of my own experiences. I've been using the component creator for a couple of years now, together with git, and even using git I think it's a hassle to identify my own changes from additions from the new install from component creator.
I found the best thing for me is to simply not touch the installed files. In joomla it is possible to get a really long way by doing this smart. I always override the view files in my templates leaving these view-files in the component untouched. If I need to modify the xml-forms for the model data, I load this in with a onPrepareForm - function in a plugin (it's just a couple of lines of code). I even load extra data in the views with sql, or by loading ekstra model-classes directly (I know this is not good MVC - style). If I really need to edit the component-code I try to mark it so it's easy to detect what I changed.
It is also possible to override controller-classes and model - classes in joomla, but I have not tried this yet ( docs.joomla.org/How_to_override_the_comp...rom_the_Joomla!_core )
The thing is when updating with a new build from the component-creator, there are usually many improvements to the code, not only the changed fields, added tables or whatever I did myself, so I see it as benificial to be able to easily load a new version from the component-creator.
If anyone has other good tactics here, I'd love to hear about it,
regards Jonas.
this is an interesting thread, and I'll share some of my own experiences. I've been using the component creator for a couple of years now, together with git, and even using git I think it's a hassle to identify my own changes from additions from the new install from component creator.
I found the best thing for me is to simply not touch the installed files. In joomla it is possible to get a really long way by doing this smart. I always override the view files in my templates leaving these view-files in the component untouched. If I need to modify the xml-forms for the model data, I load this in with a onPrepareForm - function in a plugin (it's just a couple of lines of code). I even load extra data in the views with sql, or by loading ekstra model-classes directly (I know this is not good MVC - style). If I really need to edit the component-code I try to mark it so it's easy to detect what I changed.
It is also possible to override controller-classes and model - classes in joomla, but I have not tried this yet ( docs.joomla.org/How_to_override_the_comp...rom_the_Joomla!_core )
The thing is when updating with a new build from the component-creator, there are usually many improvements to the code, not only the changed fields, added tables or whatever I did myself, so I see it as benificial to be able to easily load a new version from the component-creator.
If anyone has other good tactics here, I'd love to hear about it,
regards Jonas.
Những thành viên sau(s) đã Cảm ơn: Søren Beck Jensen, Ilya Protasov
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Søren Beck Jensen
Administrator
Posts: 73
10 năm 3 tháng trước #296
bởi Søren Beck Jensen
Søren Beck Jensen
Founder, Component-Creator.com
Replied by Søren Beck Jensen on topic Development environment
Hejsa Jonas,
Sounds like you have more experience doing it this way than we do.
I agree that this probably is the "correct" way of doing it, but we all know that sometimes the "correct" way is unfortunately not really feasible time wise.
Thanks for sharing.
Sounds like you have more experience doing it this way than we do.
I agree that this probably is the "correct" way of doing it, but we all know that sometimes the "correct" way is unfortunately not really feasible time wise.
Thanks for sharing.
Søren Beck Jensen
Founder, Component-Creator.com
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Gordon
Junior Member
Posts: 22
10 năm 3 tháng trước #301
bởi Gordon
Never doubt that a small group of committed people can change the world. Indeed, it is the only thing that ever has... Margaret Mead
Gordon Wright
Old fart developer
Replied by Gordon on topic Development environment
The only other thing I can add to my original post on this thread is I use DeltaWalker for installation file comparisons. I keep all the versions I build and download from Component Creator, and use this tool to check on the changes. I find it more useful than PHPStorm in the comparison area. This has been very helpful in spotting changes that have broken my component, and keeps me up-to-date with what these guys are doing. My projects are small enough to make this the most efficient way for me.
Never doubt that a small group of committed people can change the world. Indeed, it is the only thing that ever has... Margaret Mead
Gordon Wright
Old fart developer
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Jonas Fagnastøl Henriksen
New Member
Posts: 15
10 năm 3 tháng trước #302
bởi Jonas Fagnastøl Henriksen
Replied by Jonas Fagnastøl Henriksen on topic Development environment
Hei Søren,
I'm not so sure this is the "correct" way, actually, but I find I save a lot of time doing it this way
I'm not so sure this is the "correct" way, actually, but I find I save a lot of time doing it this way
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Joris Ceelen
New Member
Posts: 9
10 năm 1 tháng trước - 10 năm 1 tháng trước #406
bởi Joris Ceelen
Replied by Joris Ceelen on topic Development environment
Nice topic, I see it is an idea not to touch the code and use Joomla Overrides but for now I prefer merging the updates with GIT.
My current environment is:
marklodato.github.io/visual-git-guide/index-en.html#detached
and
nvie.com/posts/a-successful-git-branching-model/
Joris
My current environment is:
- www.eclipse.org with PHP IDE + LESS Editor
- www.eclipse.org/egit for visually tracking changing and merging code with GIT as suggested, I also use the GIT command line for a database backups on certain commits as hooks don't work in EGIT.
- GITLAB.COM for pushing the GIT repository to, they allow free private repositories and is a good alternative to GITHUB.COM
- LAMP, WAMP, whatever you prefer with APACHE and XDebug for debugging PHP through Eclipse all on Virtualbox or KVM so you can destroy it by accident and recreate it.
marklodato.github.io/visual-git-guide/index-en.html#detached
and
nvie.com/posts/a-successful-git-branching-model/
Joris
Last edit: 10 năm 1 tháng trước by Joris Ceelen.
Những thành viên sau(s) đã Cảm ơn: Andres Maeso
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Pete
Junior Member
Posts: 24
9 năm 10 tháng trước #610
bởi Pete
Replied by Pete on topic Development environment
Hi Jonas
"I load this in with a onPrepareForm - function in a plugin"
Are you able to share this xml override plugin code? I think your method of overides is awesome and am going to give it a go!
I mainly will use it to replace standard FIELD types with custom types that I have created but are not supported by CC..
I have asked the devs to allow us to create custom FIELD placeholders, by just pasting in the whole XML STRING, but not sure whether/how long it will be to implement that sort of thing..
Cheers,
Pete
"I load this in with a onPrepareForm - function in a plugin"
Are you able to share this xml override plugin code? I think your method of overides is awesome and am going to give it a go!
I mainly will use it to replace standard FIELD types with custom types that I have created but are not supported by CC..
I have asked the devs to allow us to create custom FIELD placeholders, by just pasting in the whole XML STRING, but not sure whether/how long it will be to implement that sort of thing..
Cheers,
Pete
Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.
Thời gian tải trang: 0.058 giây