Installation Problem with new system

thread: 12 messages  |  last: about 6 months ago  |  started: monday, december 14, 2009, 5:08 pm pst


#1  |  David M. Clark (Berwick, PA) United States of America Financial Contributor
Monday, December 14, 2009, 5:08 PM PST

hi Mike.

Glad to see you back.  I have continued to develop applications with Qcod0. Today when starting a new project I decided to give the /4.xx stuff a try.  Alas. I am unable to codegen anything.  I first set it up as instructed but codegen would not run .  I then tried to set it up with files etc as the previous version and changed my config file accordingly.  Same result.  I am not quite sure what to do with the .dist files except to simply rename them and copy them to the instructed directories.  

I am running this project on a shared server and do not have permissions to run the codegen as a command line.   I assumed that I could run it via a Browser but perhaps I cannot.  The error I get when is page not found.  '

The browser address I use when set up as instructed is.

www.mysite.com/cli/qcodo codegen   <-  Location does point to the cli directory

I need to get this going so... if you can't determine what I am doing wrong I guess we go on back to the 3.43 version.  

Thanks
David M. Clark

#2  |  comet7 (Georgia) United States of America
Monday, December 14, 2009, 6:06 PM PST

David,

You need to run \path\cli\qcodo in terminal for Linux or \path\cli\qcodo.bat in a DOS window for Windows.  If you are using Windows, update qcodo.bat so the path of php.exe on line 7 is as it is on your machine.

I think you also need to create a copy of cli\settings\codegen.xml-dist, modify as needed, and name it codegen.xml, keeping it in the same folder.

Hope this helps.

#3  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Tuesday, December 15, 2009, 9:32 AM PST

David, thanks for your post and your feedback.

I have a long answer and a short answer for you.

The short answer is that the current version of Qcodo no longer includes the web-based codegen tool.  The only way to do codegen is via the CLI (command line interface).

For a longer explanation -- as a framework overall, we are moving development tools towards the CLI and away from the web.  The primary reason for this is simply the robustness and flexibility that we gain via using the CLI, as it gives us significantly more options with which we can develop these tools.

I know that there are some devs and dev teams that this may be difficult for... especially for folks who don't have access to a shell due to developing on a shared hosted environment (such as yourself).  However, for those in that position, I would actually strongly encourage you to consider a development environment where you would have access to a shell.  The best and easiest option that I have seen, for most developers, would be to install something like XAMPP locally, so that you have full-fledged LAMP environment with which you can develop in (and which includes CLI capability).  And then when you're ready to deploy or do a build and release to your shared hosted environment, you can either push the code to your host (e.g. via SFTP or something like that) or you can use a combination of a SCM and a build script of some kind to push or pull from/to your SCM host.

There is a workaround if you did want to stay with using the web-based tool -- you can simply copy the old codegen.php from an older release and place it into your docroot... and I believe it should just be able to run.  I actually had thought about making a QPM package for it to make it easier for folks... but that of course would shed light on another issue; you would still need CLI access to run the QPM tools.

Which I guess brings me back to my original point -- for Qcodo development, because of the toolset that is already there and because of the tools that will continue to be developed on CLI, I would strongly recommend developing in a local environment that allows you CLI access.  Then, you can take advantage of all the tools to install QPM Packages from other people, do quick and easy Qcodo upgrades as new versions of Qcodo come out, etc.

Hope that makes sense...

#4  |  Leonardo (Minas Gerais) Brazil
Wednesday, December 16, 2009, 5:03 AM PST

Mike I am a developer of codegen Qcodo and often have to debug and test drive, I agree with you that the CLI is much more robust but it would be really interesting how you talked to a QPM to have code generation web platform. I think that helped qcodo community, and that never subistituir to the CLI, but only for debugging.

#5  |  David M. Clark (Berwick, PA) United States of America Financial Contributor
Friday, December 25, 2009, 5:14 PM PST

HI Mike.

Thanks for the help.  The long answer is what I planned on doing before reading yours.  I could move the entire project to a server where I have SSH access. But I think I'll try building everything locally and move it when ready.  I have always wanted to work that way anyway...but my projects have unfortunately been so fluid that it was just easier to put the dev area on the production server.

I have known all along it was not the best (most secure)  way to do things...but you know... Easy

Blessing Mike and I hope your Christmas was filled with Joy.

David

#6  |  Fernando Lordán (Barcelona, CAT, Spain) Spain
Wednesday, January 6, 2010, 8:22 AM PST

I really miss (and need back) the web front for codegen, as I made an application maintenance web front for my applications framework and codegen was one of its main available options/tasks.

In development stage, it was a breeze to re-codegen from the application in just two clicks. But going further, this maintenance web menu serves also to the customers, as often the application administrator is simpy an employee that doesn't know how to deal with console sessions. Due to human limitations, giving instructions to codegen using a console session is not an option in some cases.

In my humble opinion, the production scenarios are diverse enough to justify a web front for codegen, as beyond the development stage there's a maintenance stage, often not carried by the application developer but typically by a web administrator who doesn't know the tech involved below the web interface. For those scenarios, and having the codegen web front in the maintenance stage, one emailed file and PHPMyAdmin instructions were enough to do changes to the application model.

#7  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Friday, January 8, 2010, 9:16 AM PST

How about if we just provide a download link to the web-based codegen file then?

#8  |  Fernando Lordán (Barcelona, CAT, Spain) Spain
Saturday, January 9, 2010, 11:03 PM PST

That's ok for me. In fact, I was planning to use the old 0.3 web front for codegen.

I think it might be better to put the file link as a solution in the issue tracker, because a link in the forums will be irremediably lost in the short term.

#9  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Wednesday, January 20, 2010, 8:52 PM PST

Fernando, I've been thinking about this further and I do see your point about re-enabling better support for this in qcodo by default.

Could you go ahead and open up a ticket for this?  I think we'll try and get the original web-based codegen stuff back into the distribution as soon as possible.  Thanks!

#10  |  Sebastien Dube (Guelph, Ontario) Canada
Sunday, March 7, 2010, 9:25 AM PST

Hi, Is there anything going on about this? Can't find it in the bug tracker.

My main issue about the CLI approach is that I have no clue how to debug my template.

I saw a DebugMode in CodeGenBase but finding all this the old way makes the learning process at least difficult.

Even more when i know i have a nice debug environment that i can't use (or don't know how to use/configure it).

thanks



Copyright © 2005 - 2010, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.