3 ms·
i do rails and php and frequently switching between the two made me write halfmoon (https://github.com/jcs/halfmoon https://github.com/jcs/halfmoon). it's basi
by there 15y ago
i do rails and php and frequently switching between the two made me write halfmoon (https://github.com/jcs/halfmoon https://github.com/jcs/halfmoon). it's basically a tiny framework for php that has a syntax like rails (where php allows it - php 5.4's new short array syntax should clean things up quite a bit once it comes out). it uses an existing php port of activerecord (http://phpactiverecord.org http://phpactiverecord.org) so all of the finders, associations, and validations work much the same.
as you can see by the code, it doesn't aspire to be a full port of rails, but it does routing, controllers, models, and views similarly enough. it's probably closest to the syntax of rails 2.2.
i use it in production for a handful of low-traffic sites (http://hntrades.com http://hntrades.com, http://4m.blandroid.org http://4m.blandroid.org, http://domainical.org http://domainical.org) and mostly hack on it when i'm working on a project and need a new feature or find a bug. it doesn't have any community or documentation outside of the README, but the project works well enough to keep me sane when i'm writing php.
- alinajaf 15y agoI'm genuinely interested in your reason for not just using rails full-time. Is it because of the perceived deployment difficulty?
- there 15y agosometimes the project needs to use existing php libraries or code, sometimes it needs to be portable and php is easier to host and maintain, and sometimes i just don't want to deal with setting up and maintaining another rails site.