Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26
  1. #21
    Join Date
    Feb 2006
    Location
    New Zealand
    Posts
    28
    Plugin Contributions
    2

    Default Re: Possible Module installer/upgrader [for mod developers]

    ZenMagick also has an installation system.
    It allows to modify existing files, including undo, and also supports running SQL by wrapping/abusing the sqlpatch.php admin page (this means the prefix is automatically taken care of).

    Basically, each modification is wrapped in a separate patch class that also may have preconditions, depend on other patches, etc.
    Patches will also check file permissions and generate error messages if those need to be changed to install.

    I think one problem a lot of mods are facing right now is that they add lots of *loose* code to existing files. It would be a lot better to wrap custom code in functions or classes and minimize file changes as far as possible.

    In ZenMagick modifications are three lines max per file, so it's easy to undo without the danger of breaking files.
    Modularizing code would also mean the code is more flexible and easier to integrate/refer/use/whatever from other mods.

    One advantage of patching is that zen-cart updates (unless major) are easy to handle by simply re-applying all patches.

    My feeling is that logging/tracking changes in the database is overkill and there is a always a good chance to get out-of-sync.

    cheers, mano

  2. #22
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Possible Module installer/upgrader [for mod developers]

    ZenMagik totally changed ZC core code. While it may be good, it's kinda like a ZC fork.
    I cant go that way, since I dont want to touch any ZC core codes.

    I will look at the way ZM does it to see if I can learn something. Well, that has to wait after I finish all the projects I have now first.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #23
    Join Date
    Feb 2006
    Location
    New Zealand
    Posts
    28
    Plugin Contributions
    2

    Default Re: Possible Module installer/upgrader [for mod developers]

    Quote Originally Posted by yellow1912 View Post
    ZenMagik totally changed ZC core code. While it may be good, it's kinda like a ZC fork.
    I cant go that way, since I dont want to touch any ZC core codes.
    Yes, that is true. In fact, it's even worse. For the most part it is re-implementation. I've tried to keep as much of the original logic where possible, but for my purposes it was (and still is) much easier to write new code rather than meddling with zc files.

    But, as you say that is beside the point here. I didn't mean to sell ZenMagick to anybody here (even though some advertisement can't hurt ;)
    All I wanted to say is that the automated way ZM uses to modify the zen-cart files required might at least be interesting for you guys to check out.

    The other thing about organizing code in functions and classes is just a matter of style - if you are sure you'll never want to use the code for anything else - fine.

    BTW: There is also a completely different way. Looking at the last few month of my ZenMagick work (there you are again!), I found that most of the changes I made were to the plugin architecture. Virtually all new features are now realized that way. Maybe well thought out plugin support to avoid modifications would be a better way to go: Remove the need to modify files!


    mano

  4. #24
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Possible Module installer/upgrader [for mod developers]

    That would be a better way to go. In the matter of fact, many mods could have used ZC observer/notify class, which would help to them to avoid any unecessary modification to ZC core codes.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  5. #25
    Join Date
    Sep 2007
    Location
    Dublin, Ireland
    Posts
    1,288
    Plugin Contributions
    8

    Default Re: Possible Module installer/upgrader [for mod developers]

    Quote Originally Posted by yellow1912 View Post
    That would be a better way to go. In the matter of fact, many mods could have used ZC observer/notify class, which would help to them to avoid any unecessary modification to ZC core codes.
    Downside there is that the admin side does not use the observer/notify class...
    Andrew

    Andrew Moore
    Omnicia Agile Development
    www.omnicia.com

  6. #26
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Possible Module installer/upgrader [for mod developers]

    Yup, hopefully ZC will add this in future version.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Is it possible to have tax exemption with VAT-mod for European companies?
    By stomm in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 16 Jun 2009, 04:39 PM
  2. Is it possible to disable an active shipping module for certain items?
    By Eticam in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 4 Dec 2006, 10:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg