Post by Kenberne1965 » Sun Jul 26, 2015 3:46 pm

Ive written a few mods for the company i work for to improve both the admin and front of house of opencart and i am now thinking of making these available as extensions, as well as future ideals i have.

Currently these are just hard coded into the websites ive produced so i will have to convert the code to run either by VQmod or OCmod, now ive done a few things in VQmod so im familiar with it, but Its my understanding that we should now be using OCmod with Opencart 2 as both wont work together?

So my question is
its now July 2015, Opencart has matured to 2.0.3.1 Should I develop all my extensions to use OCmod or stick with VQmod?
it would be great to hear what other developers are doing with future projects.

Or is it best to make both versions available for download?

Also I see OCmod has a feature to install a .sql file for altering the database as needed by a module ie. add column or new table, is this better practice than using the Install() method in the module controller file? If I did go the route of OCmod .sql file is there any way to undo the .sql operations? like i would do in the module uninstall() method.

Freelance Opencart 1.5.x and 2.x Developer - Available For Hire
Latest Opencart 2 Project --> http://www.falcon-rangecookers.co.uk


User avatar
Active Member

Posts

Joined
Wed Apr 22, 2015 9:37 pm
Location - Doncaster, UK

Post by yodapt » Sun Jul 26, 2015 3:56 pm

If you want to please both parties I would make both versions. Many people still use vQmod and for good reasons in my opinion, it has better support for what is intended to do. Creating both versions isn't that difficult though.

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by Johnathan » Mon Jul 27, 2015 11:35 pm

Debugging with ocMod is a huge pain. You have to make the change in the ocMod file locally, upload it via the admin, click "Refresh", then check your changes. vQmod is way easier -- just edit the file using FTP, and you're done.

When you have to debug something on a customer's installation, you're doing dozens of little changes, and all those steps for ocMod add up (and ultimately waste time). As a developer, I greatly prefer vQmod, and I never hear complaints from people that they don't want to use vQmod. In general, customers don't care, as long as it works.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by clorne » Tue Jul 28, 2015 2:03 am

It goes without saying that all the modification systems have their pros and cons.

One benefit that OCMOD has is that it is very easy to make temporary changes to modified files for testing and debugging.

Because OCMOD modified files are not updated until the "Refresh" button is clicked, it is possible to make changes to these files or even add new files in the modification folder and then just refresh the site for results.

Also, it is always possible to make alterations directly to the "modification" database if the "Refresh button" has to be pressed for some reason.

Eventually, of course, the OCMOD local folder may have to be updated.

Active Member

Posts

Joined
Fri Dec 23, 2011 6:03 pm

Post by Qphoria » Tue Jul 28, 2015 2:41 am

I'm obviously biased towards vQmod, but like Johnathan said, debugging and even enabling/disabling things is much easier in vQmod. There is no special sql call that ocmod does over vQmod. They both functionally do the same thing, but overtime, when you eventually need to figure out which vQmod is causing a problem, it is quite simple to move all scripts to a "disabled" subfolder in the vqmod folder and bring them back one by one and refreshing the page. In ocmod, you need to keep clearing and refreshing things and since it is controlled from within the admin panel, you can even get to a point where the ocmod is causing the modification page not to load, with no way to refresh or clear without manually editing the database. vQmod keeps it all at the file level so for devs it's quick to edit and go, and for customers it's plug-n-play as well as unplug-n-gone.

Some highlights
vQmod:
- File based. Easy to edit, test changes with a simple notepad. Save the file and it's uploaded automatically (if using a proper ftp client). Then just refresh the page.
- Debugging is done by simply looking at the resultant file in the vqmod/vqcache folder and seeing exactly what was generated. PHP errors point exactly to the path and line number of the error. Files are named to be in a flat-file format.
- Error logging is easily traced in the vqmod/logs folder, broken down by day of the week for easier filtering.
- More positional features last I checked. Things like ibefore and iafter don't exist in ocmod.
- The Original.

ocmod:
- DB based. The mod script first gets edited, then needs to loaded into the database by logging into the admin, going to the modification page, uploading the file, going to the modification page, clicking the "refresh" button on the modification page. Then refresh the browser page you want to see the change on. Doing that each time you make a tiny change can get tedious.
- Debugging is done by traversing down the matching directory structure within the modification directory, which matches the path structure of the original file being altered. But to get this file to regenerate after making a change, you have to go through the steps above, plus additional clearing and deleting of files to avoid having a duplicate code. Making a small change requires about 10 more clicks
- Error logging is in the log tab and it is a running log which can get quite large if not maintained.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Tue Jul 28, 2015 2:43 am

clorne wrote:It goes without saying that all the modification systems have their pros and cons.

One benefit that OCMOD has is that it is very easy to make temporary changes to modified files for testing and debugging.

Because OCMOD modified files are not updated until the "Refresh" button is clicked, it is possible to make changes to these files or even add new files in the modification folder and then just refresh the site for results.

Also, it is always possible to make alterations directly to the "modification" database if the "Refresh button" has to be pressed for some reason.

Eventually, of course, the OCMOD local folder may have to be updated.
vQmod has done this since caching was added 2 years ago. The xml scripts are cached in the mods.cache file. If the xml file doesn't change but you manually edit the vqcache file, it will persist until A) the actual xml file is changed, or B) another xml file that alters the same file is added/changed.

So there goes that :) Stick with the Original!

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by JAY6390 » Tue Jul 28, 2015 3:20 am

VQMod FTW. The only thing OCMod does that VQMod doesn't is it allows you to load pages without the file checks but this also works against you if you're debugging/developing as everyone has pointed out

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by gogoweb » Tue Jul 28, 2015 6:43 am

For me it is vQmod with out any doubts. It just works.
Correct me if I am wrong but for OCmod your customers will need
1 - extension installer to be working which is almost everywhere not the case by default
2 - they can't touch the xml files afterwards since data is saved to DB you can't just access and modify the file with FTP.

vQmod also has some more powerful features like index, offset etc. In speed you can't tell the difference if it is an vqmod module or native module you are running.

I am a big fan of vQmod would always recommend it over ocmod.

All mods | OpenCart Bulk Related Products Ultimate Edition |GeoIP hide Prices / no add to cart by country| CSS override | Direct link to checkout / skip add to cart / buy now link | AUTO pilot - reward & purchase points


New member

Posts

Joined
Sat Oct 18, 2014 6:45 pm


Post by Kenberne1965 » Mon Aug 03, 2015 2:38 am

thanks for the input guys

Freelance Opencart 1.5.x and 2.x Developer - Available For Hire
Latest Opencart 2 Project --> http://www.falcon-rangecookers.co.uk


User avatar
Active Member

Posts

Joined
Wed Apr 22, 2015 9:37 pm
Location - Doncaster, UK
Who is online

Users browsing this forum: No registered users and 2 guests