1
oryxvet
Oryxgen 0.9
  • 2006/12/15 13:36

  • oryxvet

  • Just popping in

  • Posts: 24

  • Since: 2005/4/22


I submit it today.
I will try to do it if i have the permission



2
oryxvet
Oryxgen 0.9
  • 2006/12/15 12:41

  • oryxvet

  • Just popping in

  • Posts: 24

  • Since: 2005/4/22


Hi,

Sorry for the brocken link but for several reason i lost the web site...Every link www.oryxvet.com are brocken.

For interresting people you can dowload the last oryxgen verion here :

http://www.orea-diff.net/oryxgen/oryxgen_0.9.zip

Oryxvet
-------



3
oryxvet
Re: Oryxgen 0.7
  • 2006/10/10 11:14

  • oryxvet

  • Just popping in

  • Posts: 24

  • Since: 2005/4/22


The new version of this generator is avalable here oryxgen

You can test the generator with this sample. This is a news modules with categories :

1/ create your database using the folowing sql code :
------------------------------------------------------
this because the table must be present in the base before generated code.

CREATE TABLE `xn_new` (
`new_id` mediumint(8) unsigned NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`date_published` datetime NOT NULL default '0000-00-00 00:00:00',
`date_expired` datetime NOT NULL default '0000-00-00 00:00:00',
`hometext` text NOT NULL,
`bodytext` text NOT NULL,
`counter` int(8) unsigned NOT NULL default '0',
`categorie_id` smallint(4) unsigned NOT NULL default '1',
`story_type` varchar(5) NOT NULL default '',
`uid_creation` mediumint(8) NOT NULL default '0',
`uid_update` mediumint(8) NOT NULL default '0',
`date_creation` datetime NOT NULL default '0000-00-00 00:00:00',
`date_last_update` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`new_id`)
);
CREATE TABLE `xn_categorie` (
`categorie_id` smallint(4) unsigned NOT NULL auto_increment,
`title` varchar(50) NOT NULL default '',
`uid_creation` mediumint(8) NOT NULL default '0',
`uid_update` mediumint(8) NOT NULL default '0',
`date_creation` datetime NOT NULL default '0000-00-00 00:00:00',
`date_last_update` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`categorie_id`)
);


2/ Place the file called oryxnews.xml in the oryxgen/install/myLanguage directory.
--------------------------------------
Click on the oryxgen module, to see appearing the block of the module.
Click on "OryxNews" in the block "Load oryxgen" to load the oryxnews data.
Now you must have the oryxnews metadata load in oryxgen.

3/ Click on oryxgen module, select "oryxnews" by clicking on the "update" icons.
Generate the structure, generate language, etc...

4/ Specilizes the languages files

5/ Before reinstalling your oryxnews module, you must delete yours 3 tables.


Have a good time

OryxVet



4
oryxvet
Re: Oryxgen 0.7
  • 2006/10/9 16:19

  • oryxvet

  • Just popping in

  • Posts: 24

  • Since: 2005/4/22


Here is a new version.

http://www.oryxvet.com/dev/upload/oryxgen_0.9.zip

Please send me a feet back !

NB : This is a beta version



5
oryxvet
Comments for several type of item in the same module
  • 2006/7/13 10:01

  • oryxvet

  • Just popping in

  • Posts: 24

  • Since: 2005/4/22


By reading the wiki about comment system
http://dev.xoops.org/modules/phpwiki/index.php/Commentsystem
I did not see the possiblity to have comments on several type of item in a same module.

Does there exist this possibility by other means?



6
oryxvet
Re: Oryxgen 0.7
  • 2006/6/17 7:58

  • oryxvet

  • Just popping in

  • Posts: 24

  • Since: 2005/4/22


Quote:

Clearly lines 687 and 688 are wrong as they point to an oryxgen directory under the core class directory.


This line try to include a file present in the ../class/oryxgen directory.
Please copy the directory named "/class/oryxgen" present in the zip package to the XOOPS directory named /class.

Quote:

A lot of the notices don't apply to your code. The stricter compliance of PHP5 is throwing up notices in the core XOOPS code.

That right i will submit a hack.
If you didn't want this notice correct the ..\system\admin\modulesadmin\modulesadmin.php file

Line 282 add : $content='';

Line 390 remplace :
$confobj->setVar('conf_desc', $config['description'], true);
by
if (isset($config['description'])) $confobj->setVar('conf_desc', $config['description'], true);

same thing line 395 with valuetype

Thank for your feet back i'll add a install.txt



7
oryxvet
Re: Oryxgen 0.7
  • 2006/6/16 10:00

  • oryxvet

  • Just popping in

  • Posts: 24

  • Since: 2005/4/22


Thank for your work kiang. I'm develop this module first to minimize the time to construct a module and second as a prototype to verify my state object theory. The modifiable, displayable attributes and the possible actions depends of the state of the object (the current context) in which the user is.

You right i must have a refactoring session, there is a lot of unecessary code since i have develop a ajax architecture. I do it every time i'm can but currently i spend my hobby time to developpe a view managment and a workflow validation.

A new version is available (thank to you kiang) :
- Comment the security managment based on $GLOBALS['xoopsSecurity']. I recode this in the next version.
- english language
- debug the sql generation

The package is now in a zip format...

http://www.oryxvet.com/dev/upload/oryxgen_0.7.zip



8
oryxvet
Re: Oryxgen 0.7
  • 2006/6/14 9:49

  • oryxvet

  • Just popping in

  • Posts: 24

  • Since: 2005/4/22


Oryxgen is a RAD (Rapid Application Development) for XOOPS module. It uses a database as input and creates a XOOPS Module application that maps the data in database within to a Web interface.

There is 5 concepts (class/DB table) in this generator :
Module, classes, attributes, states and actions. This meta model (store in database by the web interface) is used to generate software applications (module). Some meta data corresponds to data about tables and table colonnes, another data models the behavior of the future generated module.

It there also a logic based on the states of the objects. States can be used to modelling our application behaviour and build our software applications

Each class (corrresponding to a table) have can have
- static attributes (correspoding to a collone)
- static actions (the classes actions)
In addition you can (but it's not obligatory) define
- states witch can have it's owns attributes and it's owns actions.

For example in the oryxgen interface
- when you edit an "module" object, there is a "IS_REP_OK" state (is the modules repository generated ?). If true you have the capabilitie to generate programs, if not the actions aren't show on the end user interface .
- when you edit an "attributes" object, there is several states depend on the attributes type. If you change the state by changing the attribute type (for example _TEXT to _FOREIGN_KEY), the list of updating attributes are changing.

Module :
--------
A module is the base of the system. You can generate all file starting from this entity.
Module have this folowing attribute :
Short name : used to prefix the "module" constant present in the /language repersitory.
Version : The version of the module -> see xoops_version
Default starting class : The index with is show for first time to the end user. You can change it on the preference module.
Modules have 1-n classes. Without class you can only generated a default structure.

Classe :
--------
Each class start from a database table. You must have create a database table before define this entity. In the web interface you must choose a table present in a combo with is display all table present in database. Once you have create your class the "refresh" action is automatically execute to import the attributes class (rows of the database table). The default value are defined and you must persolalize it.
You must define
Short name : used to prefix the "class" constant present in the /language repersitory.
primary key : the selected table must have a single primary key defined in auto increment.
For administrator only : true if you want to limit access to admin profile.
In The generated bloc : true if you want to see access to this class stating from the generated block,
Classes have Attributes, actions to do and state.

You can generate class file or language file starting from this entity.

Attributes :
---------
Each row of the database table must have a oryxgen attribute. You can synchronize database by using the "refresh" action.

For each attributs you can define the folowing properties :
Type : condition generated type HTML. For the "_FOREIGN_KEY" type you must define a foreign class (define in the current modules) and his foreign key used by the joint
Weight : Give the position attribute in the form. More the weight is the great more attributee will be high in the form
Size : the html size
Default value : the default value stored in database if the value of attributes is not informed by the end user.
Obligatory : if true, a javascript control is perform to control its presence.
In the create object form : the attribute will be in the created formular. Among all the attributes of a class, there must be at least a boolean with truth.
In the update object form : the attribute will be in the updated fomular. Among all the attributes of a class, there must be at least a boolean with truth.
Possibility of updating in the list : if the classe is owned by an other. You can update it in a list. If true, this attribute will in this list and will be updating. Among all the attributes of a class, there must be at least a boolean with truth.
Take part in the object description : if true, the value of this attribute will be to add to the list of the attributes describing the object. Among all the attributes of a class, there must be at least a boolean with truth.
Take part in the unicity controle : You can controle the unicity of a entity regards to the composition of several attributes. If true, the value of this attribute will be to add to the list of the attributes making it possible to check the unicity of the object. Among all the attributes of a class, there must be at least a boolean with truth.
Help : You can have a contextual "help" on each attributes to help end user. If true, a help icone appear near the libelle and you must override the global named "MyATTIBUT_HELP" in the corresponding language file.
Is a search attribute : For each class you have a search tools. If true, this attribut will be a seach criteria.
Tray name attribute : To group attributes
Html extra adding : Html extra code to add in the tag.



States :
-------
States indicate the state of an object at the present moment.
A oryxgen state is :
Criterias : it is described by a condition that would need to be in the state. You can be described it directly with classe attributes criteria or you can speficied a php variable name. If you choose a php variable name, you must code your state as a boolean in the file /personalize/myClass/criteria_MyClass.inc.php and add on the $states variable. A steleton is generated.
For example in the \modules\oryxgen\personalize\xg_class\criteria_xg_class.inc.php i have code 2 states : "IS_REP_OK" to indicate if there is a repository and "WITH_ATTRIBUTES" to indicate if there is attributes attached to the classe.
For the end user, the states are show on the formular head.
Attributes : This attributes are usable for the end user only if an object is curently in the state (i.e. check the condition that would need to be in the state).
Actions : idem states attributes.


Actions :
-------
Actions can be defines for a class (classe action) and a state (state action). If you add a action you must code it in a special class : \modules\MyModule\personalize\MyClass\action_MyClass.php in the function of the same name :
In this classe, you can use the following variable
- $this->getobject() to manipulate the current object
- $this->getobjectId() to manipulate the current id, needed when the object is new
- $this->setforward_url($forward_url) to set the next url called
- $this->setMsg(MyMsg) to set the message print after action
- $this->addError(MyMsg) to add message error
You can also code a before
For a "MyAction" you can code a "MyAction_before" witch is executed before executing the MyAction and a "MyAction_after".




Once you have defined your meta data, you can generate files by using starting from the your module object :
- generate structure
- generate language
- generate xoopsversion
- generateblock
- generate program

You can personalize
- The language file generated in /language repersitory.
- The criteria used (if you have defined state) in the file \modules\MyModule\personalize\MyClass\criteria_MyClass.php
- The code action (if you have defined action) in the file \modules\MyModule\personalize\MyClass\action_MyClass.php

- you can add information in xoops_version.inc.php witch is include in xoops_version.php

Hope this informations can help us to generate simple module.

Kiang, a new version corrects the faults of language. There no more "xg_st_xg_statut_criteria"

http://www.oryxvet.com/dev/modules/my ... inglefile.php?cid=4&lid=9



9
oryxvet
Oryxgen 0.7
  • 2006/6/11 13:36

  • oryxvet

  • Just popping in

  • Posts: 24

  • Since: 2005/4/22


Here is the 0.7 version of OryxGen the module XOOPS generation.
Oryxgen is a module generator based on database tables structure. It settles like any other module. It is used in the user part of XOOPS but accessible only for an administrator profile.
The Oryxgen module is generated by itself. It is thus an example of ergonomics and possibilities offered by a generated module. All generated module have the same ergonomics.
The generated forms are on a database row identified by an id (entity). You can add entity, modify entity, and delete entity. You can also Add children and add foreign key. For each entity (and each state of entity) you can define actions to performed :

Once you have defined your meta data you must
- generate structure
- generate language
- generate xoopsversion
- generateblock
- generate program
and install your module in the XOOPS admin part .

Oryxgen is distribuate with GNU GPL licence.

This new version 0.7 integate AJAX request managment and a new user paradisme.
By default, the form is lock, you must click on the padlock to unlock the form.
Once you have submit action (store or something else) the form will lock again.

It's a working version but if someone can send me a return i will be happy.

You can download here :

http://www.oryxvet.com/dev/modules/my ... inglefile.php?cid=4&lid=9



oryxvet www.oryxvet.com/dev



10
oryxvet
Use pear log + firebug + firexfox
  • 2006/4/30 15:05

  • oryxvet

  • Just popping in

  • Posts: 24

  • Since: 2005/4/22


Note that in XOOPS PHP debug mode this module don't work.
This is du to the echo function use both to display error and to send back JSON message. The JSON message become polluted and perform an error.

To debug your application you can use a the usefull pear Log framework .

And with firexfox you can use Firebug to better debug your application.




TopTop
(1) 2 3 »



Login

Who's Online

66 user(s) are online (39 user(s) are browsing Support Forums)


Members: 0


Guests: 66


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits