Ticket #852 (closed task: fixed)

Opened 1 year ago

Last modified 1 year ago

Improve the directory structure of each gadget

Reported by: pablo Assigned to: jaws-bugs@lists.jaws-project.com
Priority: normal Milestone: 0.8.0
Component: Gadgets / Other Version: SVN
Severity: normal Keywords:
Cc:

Description

Reorganize/change the structure of each gadget (rename some files). IMHO, the next structure is a good one:

`-- MyGadget
    |-- Actions.php
    |-- AdminHTML.php
    |-- AdminLayout.php
    |-- AdminModel.php
    |-- HTML.php
    |-- Info.php
    |-- Layout.php
    |-- Map.php
    |-- Model.php
    |-- images
    |   `-- MyGadget.png
    |-- languages
    |   |-- de.php
    |   |-- en.php
    |   `-- es.php
    |-- resources
    `-- schema
        `-- current.MyGadget.xml

What each file is going to have? Well, as you've noticed we are using almost the same files with just some differences:

  • Today there's no reason to add the $gadget name as a prefix to all files, it's something 'stupid' because if you have all the files in a directory named $gadget, why repeating the same *word* for each file?.
  • Now languages directories are of only one level, each language file will be identified by its language code (de/es/en/fr/etc..) instead of languages/$lang.$gadget.php

We might also do the same for the schema files and _MAYBE_ also for the gadget image (MyGadget?.png, change it for logo.png or icon.png).

Please post your comments as you (developer) start closing some bugs regarding this ticket (language files renaming, gadget files renaming, etc.) and as well, don't forget to post your ideas/suggestions!

BTW, this is not really urgent, is just a *fashion-hack* :-P

Attachments

Change History

(follow-up: ↓ 4 ) 03/25/07 03:21:31 changed by dufuz

Everything is done beside the language renaming, IMHO to we should move the xml schema to the jaws version naming.

0.7.0.xml 0.7.0beta1.xml and so on, no need to have the gadget name and I'm not sure why on earth I chose current.

03/25/07 03:24:04 changed by afz

i'm agree with helgi about schema

03/27/07 22:14:12 changed by dufuz

this obviously means we can keep schemas around for upgrade purposes and stop most of the db upgrades via pure sql and php, thus making it easier to do a release :) less things to track

(in reply to: ↑ 1 ) 03/28/07 04:15:45 changed by pablo

Replying to dufuz:

Everything is done beside the language renaming, IMHO to we should move the xml schema to the jaws version naming. 0.7.0.xml 0.7.0beta1.xml and so on, no need to have the gadget name and I'm not sure why on earth I chose current.

Maybe cause we don't use schemas in some versions? I mean, we can have a schema for 0.7.0 and make no changes to the DB on 0.8.0.. then the 'current' schema will be the last one (0.7.0).

03/28/07 04:28:50 changed by afz

we use gadget version prefix xml file, so if gadget not changed, we have same name with older of jaws version.

04/21/07 12:41:13 changed by dufuz

Okey the language file thing has been updated, mostly thanks to Ali, he did most of the grunt work :-)

Now we only have to finish the schema thing and decide on the icon part, am I missing anything else ?

04/21/07 17:09:09 changed by pablo

Yep, only icon and schema part are missing

05/14/07 02:21:14 changed by pablo

Checking code in SVN, the icon part is already done, just missing the schema part.

05/31/07 21:01:35 changed by pablo

I've two possible solutions for this:

  • Rename current.$gadget.xml to $version.xml. $version will be the version we currently have for each gadget in trunk. So if now Blog in trunk is 0.8.0, then rename the gadget to 0.8.0.xml.
  • Check when we did the last modification to the schema and according to that we get the correct version and use it instead. So if the last changes to the VisitCounter? schema were done in 0.2.0 then we should rename current.VisitCounter?.xml to 0.2.0.xml.

Suggestions?

07/27/07 06:33:58 changed by afz

i'm agree with solution 1 for schema.
pablo, icons part not fixed. maybe you forget to commit.

08/29/07 21:29:10 changed by pablo

Lemme think until tomorrow (Aug 30) if we should keep the $gadget.png or the logo.png cause I don't like the 'icon.png' name (can have problems with other server configurations).

08/31/07 18:33:18 changed by afz

  • status changed from new to closed.
  • resolution set to fixed.

fixed.


Add/Change #852 (Improve the directory structure of each gadget)




Change Properties
Action