Topic: Starting Development

Got Qcodo loaded on my development server and have gone through the how-to on the Qcodo site. I have a basic understanding of how it is setup and works.

Should I be able to make changes in the 'tracmor' directory and issue a 'codegen' to re-build and see my changes that I made? That is of-course with the correct 'configuration.inc.php' file settings.

Also, I have created some graphs in Code Charge Studio4 that I would like to include in the Reports page. How easy is it to add graphs to the reports pages? Or for that matter, create a new page and have those custom reports included on that page?

I am still working on gluing the system together...

Re: Starting Development

It's great that you're trying to piece everything together here.

First off, you do not have to re-codegen after making changes to the tracmor codebase. The QCodo code generator is based solely off of the database. So unless you are changing the data model, re-codegen is unnecessary.

In order to see how to create a new report, I suggest that you take a look at an existing report. If you have a look at the Asset Audit Report. In particular, in /tracmor/reports, look at:

asset_audit_list.php
asset_audit_list.tpl.php
asset_audit_view.php
asset_audit_view.tpl.php

You could use that as a guide in your attempt to create a new report. Or if you would prefer to add a chart to the homepage, you would start in the same directory with index.php and index.tpl.php.

I hope this helps. Let me know if you have any questions.

-- Hunter

Re: Starting Development

I'm looking at qcodo, and learning how it works. I want to build a couple of tabbed "modules" to work with Tracmor (adding to the inventory, assets, contacts). By adding more tables to the database, this would require a re-codegen, correct? In order to build relationships within the new tables to the current Tracmor tables, I would need to use foreign keys, and re-codegen, correct?

Rather than try and reinvent the wheel, I would like to incorporate Tracmor with a script I built to track human resources,  training, and other functions of our company. I use Tracmore to track our heavy equipment shipping and locations. Probably the easiest way to go about this would be to re-codegen the entire database, and start from there? Once the coded pages are up, then build the .tpl files for the appearance? This would be done on my development server. I'm just trying to make sure I understand the process.

Thanks.

Re: Starting Development

You have the right idea.

1) Make modifications to the database. You must include FK relationships in order for it to be included in the generated code.
2) Code Generate for the entire data model
      - Each table will have two files: /includes/data_classes/TableName.class.php and /includes/data_classes/generated/TableNameGen.class.php. Do not modify the file in the generated folder, only the first file.
3) Make modifications to the code
      - Create the .php file, which serves as the controller
      - Create the .tpl.php file, which serves as the view
      - Modify the .class.php file, which serves as the model

Remember, if you tweak the data model, you'll need to re-codegen. Hope this helps get you started. Let me know if you need any more help.

-- Hunter