How to update zfproject.xml file after deleting some controllers, dbtables, etc. in Zend Framework? - zend-framework

I am using Netbeans IDE to work with Zend Framework. When I create a new controller, action, etc.. using Netbeans Zend Command Window, zfproject.xml file is updated automatically. However, when I delete some of them, the file is not updated and still keeps the names that I deleted.
Is there a way (apart from manual way) to update this file?
Is it needed to update zfproject.xml to run the project properly or is it just an organized schema of the project?
Thanks a lot

This is very good question. zfproject.xml often gets out of sync when you use both Zend Tool and manual creating of the files.
Is there a way (apart from manual way) to update this file?
I don't know a good answer for this part. You may try to iterate the application directory structure.
Is it needed to update zfproject.xml to run the project properly or is it just an organized schema of the project?
This is just a schema which is not parsed during the normal application life. Used only by the tools.

Related

Is it possible to have the E4 Application Model updated in an Eclipse project copy?

I want to create another copy of one of my Eclipse RCP projects.
In Project Explorer I can do a Copy and Paste and it will prompt me to rename the new copy but it seems like it does not update the Application Model with the new bundle name, so Handlers and Parts, for example, have Class URIs that still point to the original project.
Is there a way to get this updated, even possibly using a different copy technique?
I don't think there is anything to do this update.
The Application.e4xmi file is just an XML file so it could be edited fairly easily.

ExtJs 4.2 example build

I am new to ExtJs.
When practicing in eclipse do we need to include the entire library(52 MB approx) in the appropriate location?
Is there any shorter version of this library?
Can I delete some files in the library which are not important?
What are the necessary .js files to be included for building a sample MVC pattern, CRUD operation support application in ExtJs 4.2?
For my setup, I include the /ext directory in my project, however I exclude it from the build path so that it doesn't slow Eclipse down. See Eclipse: Javascript validation disabled. but still generating errors?
Then, if you don't even want to see the directory in your workspace, you can create a working set.
I wouldn't recommend deleting/excluding ExtJS source files from your project, especially if you are using Sencha Cmd and/or using dynamic loading in your application.
If you really want to include the bare-minimum, you could get away with using ext-all.js, ext-all.css, and making sure you have all of the ExtJS image files.

Do you have to use zf tool when creating controller, model, action etc... in zend framework

I am using zend framework 1.10. I use the zf tool to create controllers, actions and everything else. It is handy, but I am now seeing that when it modifies existing controller files to add new actions it realigns my code and removes some function closing brackets. I then see all these errors in eclipse. I see that everytime i issue a zf command it modifies the .zfproject file. Is this file critical at all? I want to be able to create whatever I want by myself without the zf tool and worrying about that .zfproject file.
You can create everything even if you don't use zf tool. It is just an extra feature to speed things up. But it all boils down to preferences. If you know which files to create and where to create them. You can manually do it.

Problem creating a new framework project in Zend Studio

I have a problem when creating a New Framework project in Zend Studio. I'm new to Zend Studio, using Zend Studio ver.7.1.0.
When creating a new Zend framework project (Zend Server is successfully installed), it will not create the 'application' or 'public' folders.
In my previous test project these were created automatically. But here the only things being created are
Javascript Resources
PHP Include Path
PHP Language Library
Can anyone help me?
I had exact the same problem !
The answer is simple .
It's because of windows 7 permissions.
Just go to your localhost folder, It's
C:\Program Files (x86)\Zend\Apache2\htdocs
since you are using Zend server.
Right click on it and select "WRITE" permission for users.
Just to make sure I selected all permissions for all categories.
And next time I've created my Zend framework project,it created the structure as well !
Make shure the option Zend Framework default project structure is activated under project layout. You can check out Full featured Zend Framework and Dojo Project as well, but that may generate a little too much.
Try to use one of the existing basic projects and then remove the small amount of stuff that you don't need. See if that works for you.
Note you could also try zf tool and do "zf create project"
I know this is a few years ago, but I thought I'd give an answer as to how I solved this exact same problem. I'm only posting this answer here since a search for this problem turned up near the top of the google results, so I'm not posting for some useless SO points.
In the past, I would create ZF projects in Zend Studio and it would create for me a basic application structure with public, application, library, etc. folders. One day I accidentally deleted ZFDoctrine which I had in my Zend Framework path. Weeks later, when I went to create a new ZF project, Zend Studio created the new project without the familiar basic application structure. I did not get any error or warning so I tried to create the same project using zf Zend tool. At the command line, I received several warnings that ZFDoctrine would not load. So I put ZFDoctrine back in my library path and the problem disappeared. So long story short, it's probably something in the library path.

How do you check your database in and out of svn (or git)

Currently I go into phpMyAdmin, export my database as a text file and then save it with the application files before I commit things to svn (or git). Then of course, I've got to import it to production.
Is there a better way?
Depends on the language you use, RoR has it built in. Currently for a project I'm doing in ASP.net MVC I have 2 files in the project in a folder: database. One file contains the structure of the database and one file some dummy variables for testing. I must say it is a cumbersome way of sharing your database since when you update something you have to let the others know they have to rerun the (updated) sql structure script.
The structure script deletes tables if the exist and readds them + adds new tables.
Could not find a better way like db::migrate of Ruby on Rails.
If you don't have something like rails migrate, are in java environment or anything else, check out liquibase. It's pretty cool if you need that much flexibility. We just track .sql files which setup the entire database.
Generally, I would create a script that is able to generate the database (i.e., all the tables, users, views, indexes, etc) and another script that populates the DB with data. Then, use DBDeploy (similar to RoRs migrations) to handle all DB modifications. Then I would create build targets for all these script in Ant, NAnt, Buildr, etc. This way everything is versioned and in text files so it works with any SCM.
If you're looking for migrations similar to db:migrate in Rails, but you're not in rails, there are other options. There's migrate4j which is similar to db:migrate, but written in/for Java. There's also liquibase, which is very flexible and (AFAIK) language independent, but does make you write everything in XML (which is kind of the opposite of "the Rails way").
If you look at Apache ODE, they have a h2.rake task for Buildr that builds a database for testing automatically.