Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Multiple Components - Same Database? 06 Apr 2012 05:28 #1921

  • edwardcox
  • edwardcox's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Here to help.
  • Posts: 131
  • Thank you received: 26
So, I had this thought as once suggested by Jocelyn, but wondered how it might work.

I know this is not a natural function of J-Cook.

To break down a large project into smaller manageable chunks it might be good to create several Projects (Components) and have each handle different functions - However; that would require that they all shared the same Database and Tables for consistency.

If I create 2 Projects (2 Components) and give them each the same Table name and Field Names I assume that I would have to change the actual Database names to match (after Downloading Projects).

Where in the project should I look to identify the Database? And in theory would this work as described?

Food for thought.

Edward.
Passionate Joomla! Developer and J-Cook pro evangelist.
www.jcombuilder.com - we build great Joomla!® Components so you don't have to.

Please Log in or Create an account to join the conversation.

Re: Multiple Components - Same Database? 06 Apr 2012 05:39 #1922

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Hi edward,

Cook does not support this for the moment.

TODO :
Once your component is created,
1. Delete the lines that creates the database tables in your installation file.
2. Rename the table name in the table files (PHP) of your component.(constructor)
3. Make a search and rename tables names in SQL queries
4. That's all ;-)

(I am quite sure you should rename the tables because of the alias prfix of your project)
Coding is now a piece of cake
The following user(s) said Thank You: VeCrea, edwardcox

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Re: Multiple Components - Same Database? 12 Apr 2012 19:08 #1981

I have do it the same way and it works.
But I had problems with case sensitiv fields in the table.
The fields were not shown in my component. So I have renamed all table fields.
J-Cook doesn't use case senstivite tabel fields. Is that correct? Will this be possible in the future?

Please Log in or Create an account to join the conversation.

Re: Multiple Components - Same Database? 12 Apr 2012 19:53 #1982

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
That's a good question.

Thank's for asking.
Not thinked about yet.

TODO : search and replace on ALL your component.
Coding is now a piece of cake
The following user(s) said Thank You: edwardcox

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.090 seconds

A HUGE thank you for all the time and effort you have put into J-Cook it is a timesaver and a training tool all in one
Morgan Leecy - MCSE  

Get Started