Welcome, Guest
Username: Password: Remember me

TOPIC: [FAQ] How to split projects and merge

How to split projects and merge 06 Nov 2014 13:08 #12755

  • vivek
  • vivek's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 2
  • Karma: 2
Hi,
My project is hitting the 40 seconds loading time.

How can I split the project in the jcook into two and merge them?

Regards
Vivek
The administrator has disabled public write access.

How to split projects and merge 22 Nov 2014 09:32 #12793

  • vivek
  • vivek's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 2
  • Karma: 2
Hi,
It works fine on the sandbox but only the download fails with the time out error.

Have a suggestion:

Why can't you link the file created for sandbox install to the download button instead of rerunning the script to create the download file?

Regards
Vivek
The administrator has disabled public write access.

How to split projects and merge 22 Nov 2014 12:22 #12794

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3702
  • Thank you received: 974
  • Karma: 141
I am sorry you are experiencing this issue. You should remove some stuff and split in parts.
(FoF mode will generate less files and it will be easier to generate in future, having the ability to work on bigger projects)

To answer to your question, downloading the generated in sandbox would be different because the name of your component is com_demoXXX, to avoid conflicts between users in the shared sandbox.

I have no idea why it consume more memory in demo mode.
Coding is now a piece of cake
Last Edit: 22 Nov 2014 20:51 by admin.
The administrator has disabled public write access.

How to split projects and merge 22 Nov 2014 18:11 #12795

  • vivek
  • vivek's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 2
  • Karma: 2
Hi,
Thanks for the reply.Can you please explain how I can split in parts and merge back?

Regards
Vivek
The administrator has disabled public write access.

How to split projects and merge 22 Nov 2014 21:13 #12796

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3702
  • Thank you received: 974
  • Karma: 141
This is a manual operation.

When your project is reaching a numerous number of tables, try to organise the database structure by group of tables, cutting where you find the less FK links. use the diagram for that.

Cook does not handle neither cloning, neither splitting.
So when you have separated in two or more parts, recreate them in the builder in a new project with a pretty similar name. (Actually it can even be the same name)
Then use only unique tables names
Download project
Merge some files such as XML config, manifest, languages, SQL scripts, ...
classes and helpers stays the same.
The syntax is unified, so it is easy for you to recreate the SQL links where you have cutted projects.
Once you have started to do it, it is always the same. It might be long if you have a lot of links to repair.

SECOND OPTION : Delete layouts.
Once you have downloaded MVC files, and maybe forked them, just delete the layouts in the builder. (Keep the table, but delete the layouts)
Do this for the simpliest tables and things that you can recreate easily, and where those files are simple to edit manually if any changes happens.
So. Consider to have a copy of the original files generated, and then just delete those layouts from the builder. Here the clone feature would be a must.


I guess you are advanced user and you gonna do it. I am sooo sorry for that. Cook is not perfect and this workaround is a practice that might loose your time, and cook is not for loosing time. I am very aware of this type of problem.

In one hand, Cook will build for FoF in future (using less PHP memory), in other hand I am gonna introduce N:M in next months (using more instancied memory).
So my advice to you would be to split, or to delete the layouts you have already created.
N:M will be attractive, so reserve some left memory for that.
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: vivek

How to split projects and merge 28 Nov 2014 07:52 #12798

  • vivek
  • vivek's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 2
  • Karma: 2
Thanks for the reply.Is there any way you can launch a pro service which has higher loading time?

JCook has tremendous potential now and should not be limited to building small sized components because of the loading time issue.
The administrator has disabled public write access.

How to split projects and merge 28 Nov 2014 12:23 #12799

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3702
  • Thank you received: 974
  • Karma: 141
I understand.

Truly speaking, for building big applications I recommend to use a RAD framework such as FoF.
So this will be the solution also to avoid memory limit in future (Cook will create for FoF).
Memory limit is reached because the PHP builder consumes too much memory. I have been digging in many times to search how to improve it moving to more static classes, but without success for the moment.
This limit is given by the physical server and RAM memory has a cost, so it might be a 'pro' service as you said.
But I prefer to search how to reduce the quantity of generated files rather than just 'adding more' memory.
It is not acceptable to have so many files in the component anyways. For small and medium projects, that's ok, but up to 60 tables, just avoid the classic way and choose the FoF way. (Also you can start to read the docs, to start learning it because Cook will go there)
Coding is now a piece of cake
The administrator has disabled public write access.

How to split projects and merge 28 Nov 2014 18:25 #12800

  • vivek
  • vivek's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 2
  • Karma: 2
Hi,
Thanks for the info...FOF would be a great solution..

Just a suggestion, is there anyway you can create the files in stepped manner using the PHP builder.Like with two steps, one for front end and one for backend which creates the files in same directory.

Regards
Vivek
The administrator has disabled public write access.
Time to create page: 0.100 seconds

Get Started