Live data from Hacker News

Show HN: Rails-Inspired PHP Framework

github.com

31–40 of 46 posts

Re: Show HN: Rails-Inspired PHP Framework

#31
post #22

Instead of focusing on making a PHP framework that's like Rails, you should focus on "how can I boost developers' productivity in a unique way?" This is how libraries and frameworks become popular. If you try to model your software after existing software, it'll only ever be second-best, at best. Rails became popular despite few people knowing Ruby because it took full advantage of the language's expressiveness and e…

People keep bringing Cake up as some sort of state of the art PHP framework - it's not. It's right there next to CodeIgniter and Symfony1: best left to rot and not used for any new projects.

Look to Zend Framework 2, Symfony2, Silex, hell even Laravel 4 for quality products.

Re: Show HN: Rails-Inspired PHP Framework

#32
post #29

Earlier quoted context omitted.

Thanks! This also started as an experiment with the goal of being very lightweight and simple to get started with. Looking forward to seeing your public repo, apparently you can get a great discussion going on HN by putting it out there :)

Well since I am technically running my site with it (which i'm also not posting since it's just some bootstrap pages right now) I should probably get around to it sooner or later... I guess people will need another excuse to post Veekun's manifesto. It's not 'rails inspired' though since I don't know Ruby/Rails.

There's a rule of thumb in PHP:

Everyone should write their own framework, no one should release it.

The reason is that by rolling your own framework, you learn the ins and outs of a number of things. It's even better if it's a framework you've derived from a functional app.

I've rolled a number of my own frameworks including one for mobile (WAP) and the one underlying my open source project. The first was never shared publicly, the second is still the core of the app.

That said, the question I have for (both of) you is: What?

- What makes your framework better than X?

- What were your priorities in the architecture? What did you de-prioritize?

- What features did you consider absolutely mandatory? What did you decide to leave out?

- What made you take the approach you did?

Re: Show HN: Rails-Inspired PHP Framework

#33

If you want any new framework in PHP to be taken seriously I would start with a) a new concept instead of just another Rails-clone, and b) adhering to common standards and practices (tests, namespaces, PSR, Composer, etc). Or in other words, neither reinvent the wheel nor ignore its existence. Alternatively, since innovation isn't generally rooted in conformity, have some kind of reason to ignore all of the above.

+1

Plus, please use docblocks and document methods and classes.

Given there are some good PHP framework out there already, I would focus on something really new, something missing on the market. Personally, I'm putting down some concepts of a light PHP framework for Mongrel 2

Re: Show HN: Rails-Inspired PHP Framework

#35
post #33

If you want any new framework in PHP to be taken seriously I would start with a) a new concept instead of just another Rails-clone, and b) adhering to common standards and practices (tests, namespaces, PSR, Composer, etc). Or in other words, neither reinvent the wheel nor ignore its existence. Alternatively, since innovation isn't generally rooted in conformity, have some kind of reason to ignore all of the above.

+1 Plus, please use docblocks and document methods and classes. Given there are some good PHP framework out there already, I would focus on something really new, something missing on the market. Personally, I'm putting down some concepts of a light PHP framework for Mongrel 2

true. agree.

Re: Show HN: Rails-Inspired PHP Framework

#36
post #12

Just so if any one is interested, yet another php framework: https://github.com/oguzbilgic/hivli

Oh my... https://github.com/oguzbilgic/hivli/blob/master/lib/Loader.p...

I have written this code 5-6 years ago, there is definitely room for improvement :)

Re: Show HN: Rails-Inspired PHP Framework

#37
post #24

It's a good idea to use example.com domain in example URLs instead of mysite.com or other "real" domains. EDIT: Other tip for the readme: change the name to README.md and Github will render your Markdown formatted readme properly.

But the readme isn't Markdown formated?

It actually looks like a blend of asciidoc and... something...

Re: Show HN: Rails-Inspired PHP Framework

#39
post #22

Instead of focusing on making a PHP framework that's like Rails, you should focus on "how can I boost developers' productivity in a unique way?" This is how libraries and frameworks become popular. If you try to model your software after existing software, it'll only ever be second-best, at best. Rails became popular despite few people knowing Ruby because it took full advantage of the language's expressiveness and e…

People keep bringing Cake up as some sort of state of the art PHP framework - it's not. It's right there next to CodeIgniter and Symfony1: best left to rot and not used for any new projects. Look to Zend Framework 2, Symfony2, Silex, hell even Laravel 4 for quality products.

As a long-time CodeIgniter user I'm interested to know what Silex, Laravel etc have that CodeIgniter doesn't?

Re: Show HN: Rails-Inspired PHP Framework

#40

Earlier quoted context omitted.

People keep bringing Cake up as some sort of state of the art PHP framework - it's not. It's right there next to CodeIgniter and Symfony1: best left to rot and not used for any new projects. Look to Zend Framework 2, Symfony2, Silex, hell even Laravel 4 for quality products.

As a long-time CodeIgniter user I'm interested to know what Silex, Laravel etc have that CodeIgniter doesn't?

Sure, I'll list off a few reasons:

* One of the biggest contributors to the community edition left and wrote a nice blog post about it [0]

* CodeIgniter uses some very untestable patterns [1]

* The way it allows loading classes is horrible [2]

* It feels like a first-generation PHP framework because it is a first-generation PHP framework

* It tries to do almost everything. A framework should have the bare minimum, and use outside libraries or libraries that were developed without the framework in mind.

[0] http://philsturgeon.co.uk/blog/2012/12/5-things-codeigniter-...

[1] $ci =& get_instance()

[2] $this->load->library('typography');

Post reply on HN