C5 database question
Permalink
Hi all,
I'm in the planning stages for a web-based project management/collaboration app similar to Copper Project or PHP Collab, using C5 as my framework.
There are a couple of features I want to integrate, but I'm not entirely sure how to accomplish this, looking at how DB tables are generated with blocks.
The functionality I have in mind is as follows:
1) When a new client is created by an account manager or project manager, they have to assign a three-character prefix for the client. Example: if (by some wild stroke of luck) I add Diesel as a client, I would want to assign them the prefix DSL.
2) When an account manager or project manager creates a new project, the project ID should be directly related to the client, and not to the total number of projects for all clients. In other words, the project ID for Diesel's first project with me should be DSL001, and not DSL016, because there were fifteen other projects for other clients before this one (c.f. both Copper and PHP Collab, which follow the global project ID logic, as opposed to the per-client project ID logic). This project ID would be visible on the front-end project page that's been created by the AM/PM, and would also be used as a reference ID for things like cost estimates, invoices and so on.
So this is where I run into a problem from a workflow planning point of view. My understanding of MySQL is such that if I want to follow my own project ID logic, a new table would have to be created for each and every client, to contain all of the data concerning their projects, so that the DB could correctly output the unique ID number.
However, my understanding of C5 is that if, for example, in the course of creating this app, I decide to create the project form as a block to be inserted in a front-end template, the db.xml file would create a generic project data table in the DB for all clients, not one per client.
Any suggestions how I can accomplish what I'm looking to do in the context of C5's framework?
If something's unclear, I can show some mock-ups of how a project page would look.
Thanks!
I'm in the planning stages for a web-based project management/collaboration app similar to Copper Project or PHP Collab, using C5 as my framework.
There are a couple of features I want to integrate, but I'm not entirely sure how to accomplish this, looking at how DB tables are generated with blocks.
The functionality I have in mind is as follows:
1) When a new client is created by an account manager or project manager, they have to assign a three-character prefix for the client. Example: if (by some wild stroke of luck) I add Diesel as a client, I would want to assign them the prefix DSL.
2) When an account manager or project manager creates a new project, the project ID should be directly related to the client, and not to the total number of projects for all clients. In other words, the project ID for Diesel's first project with me should be DSL001, and not DSL016, because there were fifteen other projects for other clients before this one (c.f. both Copper and PHP Collab, which follow the global project ID logic, as opposed to the per-client project ID logic). This project ID would be visible on the front-end project page that's been created by the AM/PM, and would also be used as a reference ID for things like cost estimates, invoices and so on.
So this is where I run into a problem from a workflow planning point of view. My understanding of MySQL is such that if I want to follow my own project ID logic, a new table would have to be created for each and every client, to contain all of the data concerning their projects, so that the DB could correctly output the unique ID number.
However, my understanding of C5 is that if, for example, in the course of creating this app, I decide to create the project form as a block to be inserted in a front-end template, the db.xml file would create a generic project data table in the DB for all clients, not one per client.
Any suggestions how I can accomplish what I'm looking to do in the context of C5's framework?
If something's unclear, I can show some mock-ups of how a project page would look.
Thanks!
Thanks for this.
Not sure the approaches in that thread would be what I'm after, though. Effectively the site I'm trying to create is all interactive/form-driven on the front end — the CMS end of it, for lack of a better term. Very little would actually get done in terms of the app itself in the concrete5 dashboard, except for user management, permissions and other basic site settings stuff.
Not sure the approaches in that thread would be what I'm after, though. Effectively the site I'm trying to create is all interactive/form-driven on the front end — the CMS end of it, for lack of a better term. Very little would actually get done in terms of the app itself in the concrete5 dashboard, except for user management, permissions and other basic site settings stuff.
It would be fairly straightforward to create a front end interface from the dashboard implementation. From what I understand of your project, that would be the main difference -- and would allow staff rather than administrators to interact at that level.
For the sake of comparison, think Basecamp on a concrete5 implementation. That's what I'm after. :D
Right. And that's where you need to develop CRUD functionality, which doesn't come out of the box with C5.
You may find 'Related Projects' of interest for CRUD interfaces.
http://www.concrete5.org/developers/open-source/...
http://www.concrete5.org/developers/open-source/...
First thing to remember (and this maybe your point of reference with the other environments) is that C5 is a CMS and not a CRUD development system along the lines of Ruby on Rails. So, if you're looking for that functionality, it will need to be added.
I'd not try to combine the creation of a page/block with the workflow item that you're working with.
Instead, I'd create a CRUD set of interfaces to handle: client creation and project creation. Each of those represents a table and would include more information -- descriptions, contact info, project scope, etc.
Then, I'd create a custom block placed on the project page which would allow the user to select the client and project number. Then, that information will be associated with the page.
Here's a link to a forum discussion on precisely such capability:http://www.concrete5.org/community/forums/customizing_c5/database-d... One of the latter comments identifies an open source, free addon project to create a CRUD interface which could probably be adapted to your needs.