I am planning to build a project using zend framework 2.
But i find it very hard to setup zf2.
It is not easy to setup the framework and start working.
What i am looking is copy required zf2 files, put into the project and start working.
Like in cakephp where you need to make changes in database configurations and start working.
Can anybody help for this issue. this will be useful for many other developers also.
Thanks in advance for any help.
Have you tried the SkeletonApplication? It provides everything you need: Pre-setup bootstrapping, the directory structure, a basic application configuration.
Just clone it into your web directory and make sure that vendor/ZF2 gets cloned as well (--recursive flag).
This is currently the easiest approach to get started with a new ZF2 project.
If you need further assistance, please state your question more specificly.
// Edit: Although it makes sense to use composer or at least git to pull everything directly, you can just download the project (SekeletonApplication and ZF2) from Git. In my opinion, you shouldn't be too lazy here. Using composer etc. will save you a lot of time that you can spend on implementation.
Setting up ZF2 without the use of the command line is MUCH more of a pita than using it. Sure, you can download the SkeletonApplication and then you can Download ZF2 Core Library and put it into your include_path, but that's not too great.
I really suggest learning about the command line. I'm a windows user myself and hated it at first, but after getting around the first problems, i - now - find it really handy.
If you have trouble setting up your stuff or understanding it all, you may find my tutorial helpful which you can find right here: Zend Framework 2 Installation on Xampp for Windows
I had the same issue as you. I found the Skeleton application easy and quick to install, but I didn't need the translations that are included. As a result I created a stripped down, bare bones version which you are welcome to use.
You will find the ZendMinimumApplication on github.
Related
does anybody know how to implement phpsysinfo into a ZF2 project?
I need a brief overview what is hapening on the server without having to connect via ssh to the server. There are a lot of monitoring software I know, but this will do the job for me. Thx for any reply...
phpSysInfo is a standalone software, which is not intended to be integrated into another project (e.g. ZF2)
You can probably reuse some classed from the source code, if you build a ZF2 module
I have many projects in the same Centos server and I'd rather like to install ZF2 once in a location like /usr/share/zf2 instead installing it with Skeleton all the time as duplicate libraries with projects and use ZF2_PATH in all my applications. Naturally, I'd like to use composer to update this shared zf2 library as well.
I can make it work in my way but I'd like to know if there is a conventional/preferred way to do this.
What I would do is:
1- Install ZF2 in /usr/share/zf2
2- Set ZF2_PATH environment
3- Remove Zend Framework 2 requirement from composer.json of the projects and update all as necessary.
I am just trying to follow a proven/accepted/easy-to-maintain method instead discovering it.
Thank you very much.
This is unconventional, there is no "proven/accepted" way of doing it and many people will have different opinions.
Downside of your solution is the need of testing all 3 apps when upgrading Zend Framework, I am sure you can imagine multiple scenarios when it could be handy to upgrade it just for one. If anything goes wrong, and things do go wrong, you will end-up breaking all 3 apps, not just one.
The only upside is saving space, but is that really an upside any more? Isn't disk space very cheap. Breaking your code is definitely more expensive (I am talking about cost of your time, potential loss of data or users).
If you still want to proceed you can create a 4th project with its own composer.json file and use it for any shared dependencies.
I am looking for software which creates a DataGrid in ZF2. I've found odiaseo/zf2-datagrid from GitHub but I currently do not understand how to use it. Does anyone have any suggestions on where I can find a tutorial with step-by-step instructions?
Step by step installation and usage guide is already there on git.
https://github.com/odiaseo/zf2-datagrid
I don't know what type of suggestions you need. but you can find good comparison of zf2 with other frameworks. one of them is here
Have you tried using this
There are some other datagrids for zf2 as well. Try one that fits your need
see here: http://modules.zendframework.com/?query=datagrid
e.g. https://github.com/ThaDafinser/ZfcDatagrid
I've being looking around for Zend\Tool which appears in version 1 but not in version 2. I did find another SO post where it was mentioned that they've not been added yet but that was over 6 months old.
Does anyone have an update on when they will be added or can point me in the direction of similar utilities?
ZFTool is now available for Zend Framework 2: https://github.com/zendframework/ZFTool
There's no such thing as Zend Tool at the moment. They are still working on it but when it will be released, no one can tell yet. However there are two great Git-Repositories out there, that pretty much cover crucial aspects of Zend Tool - creating a bare application and new modules
zendframework/ZendSkeletonApplication
zendframework/ZendSkeletonModule
Additionally someone posted a shell script to create a new skeleton module on my Blog, you can find the script right there. However i take no responsibility for that script, as i don't use it myself. ZF2 Modules are so simple and the SkeletonModule is all i need:
zf2crmod.sh
I've been developing a web application and a lot of customers are asking if they can host the application in their network (for security reasons). I have been looking for a way to package up a rails app into a single executable (with server and all), but haven't been able to find anything. My other requirement is that we distribute it without the source. Because of that I was looking at JRuby and Warbler. The end product should run on linux or windows. Has anyone done anything like this before, or can anyone point me in the right direction.
Thanks
My best guess would be to use JRuby and the JRubyCompiler, although I have no idea if you could compile a whole rails project (including all the required gems). I got it to compile a small ruby script though. Anyway, if you succeed, you could package those in a jar or war and deploy that as a contained application.
It doesn't sound like you necessarily need to package it as an executable, as long as the code is obfuscated. I personally haven't needed to protect any of my code, but a quick google search returned this product http://rubyencoder.com/. I'm sure there are others out there, but the basic idea is that your code is unreadable and cannot be reverse engineered. This would allow you to run a standard rails environment without giving access to your source code.
If you have the budget and really want to outsource this, the Github guys partnered with BitRock to build their cross-platform installable product (Github Firewall Install). BitRock has this case study on their website.