Page 1 of 1

Suggestion in extension page

Posted: Wed Jun 23, 2010 3:22 am
by VotreEspace
i know it may require some good prog, but It would be nice to be able to tag the extensions we use in the extension page si when they are updated, we get some msg or email :)

Re: Suggestion in extension page

Posted: Wed Jun 23, 2010 3:27 am
by JAY6390
I agree, but this is a long way off from becoming a reality. Before we get update reminders for extensions, they need to act like real extensions. At present, they're largely overbloated duplicated code with small differences (for the admin area). They're also not very dynamic in that you have to install files manually into their correct respective folders which is a pain to say the least. considering that compared to getting an update reminder, it makes sense to get rid of the big issues instead

Re: Suggestion in extension page

Posted: Wed Jun 23, 2010 4:12 am
by Qphoria
Well aside from having to manually upload the 2 folders... the extension system was designed to be completely dynamic and stand alone (i.e. not touching core files). I do have a working prototype of a simple zip package uploader that will auto extract them for you which we will see about releasing.

As far as the duplication of code.. well MVC has its drawbacks... it keeps everything separate, but that means a lot of things are duplicated. Not sure what to really do about that.. maybe have a "common" file that is used unless a file with the same name exists then use that. i dunno

It's actually easier to have a package installer and auto-updater... but it requires a dedicated server for api interfacing to monitor and maintain versions. Now that we have a dedicated server, we can look into that.

Re: Suggestion in extension page

Posted: Wed Jun 23, 2010 5:24 am
by JAY6390
Yeah. I still see no reason why modules couldn't all be self contained in a single folder per module, for example

/modules contains folders for each module (the module name is the directory name that contains them) in the same folder as the /catalog and /admin folders
So say you have a module for the sitemap you would have it under
/modules/sitemap/

Then in that structure would be the mvc model for the admin and catalog, so you would have

Code: Select all

/modules/sitemap/admin/controller/sitemap.php
/modules/sitemap/admin/model/sitemap.php
/modules/sitemap/admin/language/sitemap.php
/modules/sitemap/admin/view/sitemap.tpl
/modules/sitemap/catalog/controller/sitemap.php
/modules/sitemap/catalog/language/sitemap.php
/modules/sitemap/catalog/model/sitemap.php
/modules/sitemap/catalog/view/sitemap.tpl
While I realise it seems like it's going a bit over the top, if you consider the current structure now it's pretty similar and is a whole lot easier to integrate, simply copy your module from the source file to the module folder and hey presto it's all there ready to go. No having to go into up to 8 folders pasting code and making sure it's all in the right place

it would also make development easier since each module is contained within its own folder, no searching for the right file to edit, simply go to the controller, model, view or template folder and it's right there

Re: Suggestion in extension page

Posted: Wed Jun 23, 2010 5:38 am
by Qphoria
Well that's another can of worms. Actually just yesterday I was seeing what was involved with having all mods in their own tree.. This was easily done with the old 0.x version but 1.x complicates things a bit with overriding paths.

Re: Suggestion in extension page

Posted: Wed Jun 23, 2010 5:39 am
by JAY6390
Yeah I was guessing it wasn't going to be simple to do, and was thinking more for a later version of OC where development gets more serious and planned out beforehand with API's written up and all that jazz

Re: Suggestion in extension page

Posted: Wed Jun 23, 2010 5:52 am
by Daniel
are u people doubting my skill, experiance and design architecture. Yeah great have everything seperate but what if you wanted to use a a shared view or model?

already the country and zone classes are used all over the site. Why should they be in seperate folds? to keep things apart? everything needs to be reusable.

Re: Suggestion in extension page

Posted: Wed Jun 23, 2010 6:04 am
by JAY6390
Sure you have experience, I've no question about it, but code evolves, it's not written once, and everything is right. Suggestions get made, trial and error decides on whether or not it is a good choice, and then something new is tried. As you have to load modules separately for each view in their controllers, this would be no different, only it would be loading from a separate set of folders. You could still load models just like you would with other controllers as they extend the original controller base class