what is the significance of .zfproject.xml file - zend-framework

Usually i create controller and rest of the work (actions method) and view files i do manually. does .zfproject.xml file has any significance?

zfproject.xml is used by Zend_Tool to store information about created controllers, actions, etc. within project - but only these created by using zf command.

Related

SAP UI5 embed manifest.json right

I just wrote the description file for my UI5 application.
Now I have these questions:
Where and how can I embed the manifest.json in my project correctly?
How can I test if it's working fine? (correctly embedded)
Is the "start_url": "" similar to initialPage of the index.html?
Many thanks for your guidance,
Chris
Usually, the manifest.json file (aka. "Application Descriptor") is put into the same folder as where the Component.js file is located. The component will look for the file name "manifest.json" in the same folder. If the descriptor is located somewhere else or has a different file name, assign the relative URL of the file to the manifestUrl in the component factory function like this, which is recommended to do so anyway because it ...
loads the descriptor file before creating the component (same as manifestFirst) allowing us to preload dependencies and model data to improve the initial loading time.
makes specifying the name of the component redundant.
You can either pass the name of the component or the URL of the descriptor file to load [the component] via the descriptor.
To see if the file is correctly embedded, run the app and see if e.g.
the rootView is loaded,
models (for example ResourceModel for i18n) are set to the component instance,
custom resources assigned to sap.ui5/resources are loaded, etc. etc..
→ Make sure to include (or in case of manifestFirst/ manifestUrl, don't be tempted to remove) manifest declaration in the component metadata.
The "start_url" is purely advisory and meant for the web standard rather than for UI5. It's telling the browser where to look for the initial page when the user starts the web app.
To learn more about the descriptor file, take a look at the developer guide such as "Descriptor for Applications" or as a summary, here.

mvc perspective in zendframework

I have a zend framework project, all written in one Module. Under this Module you find a controller directory, Model directory and view directory. I am looking for a perspective to devide this Module into many, each with its controllers, models and views. would you supply me with some references to read more about this.
Thanks in advance.
You should not divide your module, but introduce several modules. Each module has its own config, src and view folder. Inside the src folder is another folder (same name as Module) and in this src folder you find controller, view and model folders (and more depending on the project).
So something like this:
As far as I know this is the correct layout in a ZF2 application.
You can also read on folder structure in the ZF2 documentation.
And on ZF2 project structure here
And on setting up a module here in the ZF2 user guide

How to create Eclipse EFS resources on the fly in a content provider?

I like to write a plugin for Eclipse, which allows to work with archive files as with normal file directories. For instance, if there is a zip file inside a project, the user should be able to view the contents of the zip file just by opening the zip folder. The user should be able e.g., to read text files in that archive.
I already created an EFS wrapper arround a particular archive format. Also, I created a new content-type for this archive format. I have a navigatorContent which is triggered on the content-type. In the content provider, currently I provide objects of type IFileStore. AFAIK there isn't any nice label provider shipped with eclipse for this types so I have to implement it on my own (there is one which is declared as private). However, this seems to be rather huge code duplication effort. What I therefore like to do is not to return IFileStore but IFile or IFolder instead so that the normal project explorer content provider can do its job. Is it possible at all to do something like this? If so, how can this practical be achieved?
Call IFolder.createLink() to create a new resource referencing a folder on your custom filesystem.
http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2FresAdv_efs_resources.htm
This will create a new folder in your project, containing all files from ZIP archive. The problem, however is, that you will need to put it into an existing container, polluting resource tree.
Implementing ILabelProvider is not a huge effort at all, especially when compared to IFile or IFolder. If you extend BaseLabelprobivider you only need to implement 2 methods: getText() and getImage().

What need to do after pre-generated the view

I've already pre-generated the view and got the .view.cs file, what should I do now to let the application using this file? or just build it and the then the application will using this one automatically?
Just include it in your project (so that it's built with the rest of your code). That's all.

How should I set up my application when I can't change the document root?

I don't have permission to change the document root the /public/ directory so how should I set up my Zend Framework application to run from the current root directory? Using the Zend Framework 1.8 command line tool, I don't know if there is a way to tell it to create a directory structure this way.
If you can access only the upper level of web (i.e. - public), you should set index there and the whole application folder too. Create a .htaccess with
Deny from all
And put it into your /application.
Your configuration will be:
/application
/library
index.php
The simplest way without changing a lot of configuration, is to put everything in the public folder you mention into your public_html folder, then place all the other contents, like the application, and library folders into the directory up from public_html.
You can also throw everything into your public_html folder, although that is not recommended. Each class has options to provide a different path. For example on the Front_Controller, you can set the Controllers directory to wherever you want. There are options to specify different paths, but if you follow convention it is done for you.
Just use the quickstart guide and adjust according to it. Zend_Tool is still experimental anyway. Let me know if this helps.
So here's what I ended up doing:
Download the Quickstart sample code.
Move everything in public up to the main directory, along side application, library directories.
Alter include paths to library and application in index.php to point to the correct locations
I think that was all I had to do. ZF new how to the rest.
I don't think this is ideal however, as already mentioned, application directory becomes accessible from the web, but for now, it's getting the job done.