We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Your phalcon development enviroment - Please comment I believe its important.

Hello everyone,

Recently I found a new job. A large web development shop. And they are using code igniter everywhere and everthing was unpleasant. They wish to move new foundation for their future and their current wise guy was creating an cms solution which based very very hacked version of code igniter.

Then they ask my opinion. I mostly say I dont care, I can write php code anywhere and one ore two times I slightly trying to promote phalcon.

Response was intertesting, Everyone agrees Phalcon is a good if not best however none of them use it, mostly they are going to avoid it.

And this was very same response to on web rants. Everyone agrees Phalcon was good (even they never use) and some how they event can't try.

Then I came to conclusion. Even a copy cat lamer can alter Invo or Vokuro to do someting easly and this guys even can't do this.

Why ?

My answer was they can't setup phalcon.

To support my theory could you share your development setup here plase. And share your toughts how hard was your development enviroment.

I'm using windows desktop with orecle virtual box which has debian linux, nginx, php-fpm. In old times building from source takes time but now it was coming from repository. It wasy very easy to setup.

My best regards.

Vagrant box with linux + windows.



12.1k
edited Oct '17

I think the best solution (we use it on our project) is docker-compose + git. You can package your default project and the team can use it just modifying few lines of config and running two git clone (one with the phalcon project, the second with the docker-compose environment). Maybe you need a couple of days to package everything but believe me: then it's fool proof.

By the way: Using docker-compose means that you can recreate a very complex structure. We use in productio: several servers with nginx and php-fpm. One with beanstalk, one with memcache. A mysql server stand alone and everything behind a proxy. (multimodule, multisite, multiserver with control variables managed by the phalcon debugbar)



9.7k
edited Oct '17

Ancient Toshiba notebook with Linux Mint and a new SSD. Bluefish editor. Works at the beach and in the cafe overlooking the beach. A Galaxy 5 delivers full speed 4G Internet.

When back at the desktop, I plug in a USB3 hub, a couple of monitors, and a keyboard/mouse. A Linux Mint server sits unused on the same network. For multiple user testing, I upload to a virtual server.

There is Windows, as an alternative boot, left over from for a project last year. This year I needed only one Windows application and it works in Wine. Yeah! First time ever. Something works in Wine. The Windows application, Wine, and Windows will disappear next month.

Never need Composer or anything in the cloud for development. Phalcon is from deb https://packagecloud.io/phalcon/stable/ubuntu/ xenial main. Copy to a VPS for end user testing. Every Web site runs on Ubuntu or CentOS, which makes it really easy to replicate to my notebook.



9.7k

Which brings us to some questions about your Web development shop environment. Do they use Windows or Linux servers? Phalcon should be easy on Linux. Do they use Windows on the desktop or a mixture of Windows+Linux?



11.9k

Thanks for replys. And it seems there where some mis presenting (and mis understanding) due of my lack of english language.

I'm not looking for solution for my new colleagues, they are too old for this kind of radical change. If I put my psr autoloader and able to use namepaces that will be good enough.

I'm looking for clues why people does not adapt phalcon. ?

From my perspective phalcon should have more recognition. Lack of new boold means trouble. Form search does not working, phalcon site fronend spikes cpu, Forum editor become slow when your post getting bigger. From my perspective those symptoms are trouble.

So we need new people, lots of them.

And my theory, people who can't use linux as development enviroment, can't use phalcon.

To prove my theory I'm asking everyone what is your development setup....

If responses prove my theory (so far 4 linux 0 windows) to promote phalcon we need ready to run windows package. something like xamp with phalcon plus vokuro.

My best regards.

Simply - community in bigger frameworks is bigger, phalcon is harder to debug and fix if there is any bug.



9.7k
edited Oct '17

Try to find a Web hosting company that includes Phalcon. Most Web sites are built by agencies for small businesses. The small businesses want cheap hosting with no complications. The agency wants to use the same framework for everyone so they can charge everyone for creating code when all they do is copy the code they download for the first customer.

If you want Phalcon to be big, you convert Laravel to Zephir and compile Pharavel.

Volt is not plug compatible with Twig. There are many little differences separating Phalcon from the main frameworks. If you attempt to make Phalcon plug compatible, you may end up reducing Phalcon's performance to the point where Phalcon is not an advantage. There are both advantages and disadvantages of being different to Symfony. Phalcon wins on speed of execution. I am not missing any of the "monster framework" bloat.



11.9k

Phalcon is harder to debug

After 4 years, load of projects, I did not buy this.

I start using phalcon for create a auto dialer which can dial 7.500.000 phone numbers per month (in single server). No problem even it was running very stupid SQL schema.

Then I created web video webchat website which has websocket chat. Also I create lots of mini projects for this or that. a payment api, a callcenter app which has javascript sip client embedded.

Now I have an hybrid cms system top of the phalcon which can be a single page application or regular web page same time without any code or config change, which can support bookmarking f5 anything you name it. I'm burying alive JS frontend frameworks, just simple jquery and some tricks because of phalcon. (ofcourse I can run same thing with other problems however they cannot this fast with this large amout of my own php files)

And I did not need to debug phalcon in any single time. Maybe move some boiler plate code in zephyr.

Anyone who runs cheap hosting should run phalcon, I handle tons of loads with digital oceans cheapest nodes. Our callcenter system was based on zend and barrelly handles 100 operators at 80$ droplet new one uses 10 dollars and doest not blips. Man I had thousand some times hundred thousand rows for pagination which barrely slows. Phalcon reduces overhead dramatically. If there is a demand, cheap hostings will provide support.

And from my viewpoint using template in template language bit overkill. View Templates makes code complicated. Also five years ago I use plain php views in zend because I did not find anybody who can use templates cleanly. Templates is mess, plus you have to have learn template language in template language.

Instead I'm using static classes for templates which returns simple objects which has some predefined variables and very easy to access in IDE.

My code still evolves however old ones still works phalcon latest version (just one change in config). Even I'm using phalcon in very unorthodox vay.

I'm continuously search Web about php frameworks, especially phalcon. Phalcon appears every this years best framework, top 10 framework every kind of php framework showdown and I did not find any meaningful complaint against phalcon except that phalcon is harder to debug and it seems they are debug and fixing laravel daily.

After some time I just realise all of those people can't install phalcon so they can't use phalcon, because they can't recommend or bash or complaint or praise. They just say

Uh oh yea, we see that benchmark. It was scary. PHP can't go that fast, it must be so dangerous or forbidden. Please just go away...

And why should I convert Laravel to zephyr ? Is phalcon a bad framework ? I don't think so.

And converting Laravel does not solve the problem, those guys still can't setup so they can't use Phalaravel framework either.

And If I try to convert something. I prefer phalcon based Wordpress. Which I'm really really thinking loudly in these days.

Any one who complete a project with phalcon does not look back again.

My Humble Regards



9.7k

You are way ahead of me in usage. Although I have more than one project running, my projects have only a little bit of unusual code.

I mention Laravel because most of the PHP framework jobs advertised here are for Laravel. I expect anything plug compatible with Laravel would grab a lot of users faster than any other project written in Zephir.

Wordpress is more popular than Laravel. Wordpress compiled through Zephir could be popular. I do not know if you could make a Phalcon based Wordpress work easily. Most of the Wordpress sites I worked on were riddled with core code changes. Converting Wordpress to something modern, like Drupal, was usually a case of writing off the Wordpress site and building from scratch with Drupal. The latest version of Wordpress might have a better architecture to work with.



20.4k

I use Vagrant with a shell script that I keep maintained that will spin up a VM, install Phalcon and everything else I need including my own base application. This makes everything quick and easy for me. I simply create a new project in PHPStorm, copy my vagrant and shell file in, run vagrant up, make a cup of tea, come back to my desk and everything is there ready to go. I used to work on a laptop running Linux Mint, but I spilt beer over it last xmas and it died. I now have to do a lot of music and video production work as well, so I am on a Windows 10 system now. All my Vagrant development environments run Linux and I think a good familiarity in working with Linux is important for a web developer.

I have a Debian 9 server with Phalcon installed via packages. Previously I compiled.

Adoption of Phalcon is slow for 2 reasons I believe - both of which have already been mentioned.

1) It's harder to debug. If I get an error due to the framework, the best I can hope to do is look through the .zep files on GitHub. I can't inject my own code in the framework's code to figure out where the problem is. With something like Laravel, I have the source code right there that I can tweak and change.

2) It's harder to install. For someone like myself or others who have full, root control over an entire server, it's not a big deal. Getting the Phalcon extension added to third party servers however, is much more difficult, if not impossible. Again, with something like Laravel, it's just a matter of downloading the source code or cloning the repository.



9.7k

Performance anxiety is a big issue for anyone planning to launch a Web site. The switch from PHP 5 to Phalcon/Zephir is a significant help but PHP 7 reduced the difference and is less work. It is hard to justify using Phalcon without direct comparisons of the latest releases. Does anyone have a comparison?

The performance of Phalcon's router and ORM pushed me into putting selective code in front of the router and using only PDO for reads. I did not find good documentation on either approach. I expect this is producing some negative comparisons where Phalcon fails to perform better than a light weight PHP 7 framework.

For some of my projects, switching from hosting on magnetic disks to SSD based hosting has improved performance several times greater than any version of PHP or Phalcon or Zephir. I would use Phalcon for more projects if there was a good reasonable cost local host offering Phalcon+PHP 7+SSD.



9.7k
edited Oct '17

"spilt beer over it last xmas and it died" You need a Toshiba with a waterproof keyboard or sign up early for Dry July, https://www.dryjuly.com/.

"I am on a Windows 10 system now" Why the switch?

" Vagrant with a shell script" Can you copy the vagrant thing after installation so that you can use a copy with everything installed?

On Windows I used to just install Apache, PHP, and let rip with dozens of Web sites. I never used Phalcon or Zephir there. Today I have many licenses for each version of Windows and each version of MS Office. I cannot use anything on Windows because Microsoft introduced too many deliberate incompatibilities. Nothing M$ works with anything else M$ because you have to buy a different version of one or both. I stick with Linix to save a few days every quarter when M$ changes something to be less compatible. Plus the money saved does finance craft beverages.

Nothing to do with Phalcon uptake but I do use an external keyboard just in case my liquid refreshment escapes the cylindrical container while above the hardware input device.