Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's good code being written in PHP, but as far as I can see, not really in this project. JS, HTML, PHP are all mixed together, global functions and variables everywhere, no classes or objects.

Also they are not using an existing PHP framework so they'll have to reinvent the wheel many times for proper session handling, caching, encryption, and for countless other problems that have already been solved.



Once again, it's open source we are talking about here. You do realise the problems you describe are also prevalent in other content management systems and publishing platforms? Wordpress is the worse offender for global variables, the theming system in Wordpress mixes HTML,CSS,JS and PHP together, the code-base is a mixture of object-oriented and procedural code as well. But it powers most of the web. Any blog you visit is most likely powered by Wordpress and why is that? Because it works.

Dropplets might not have the prettiest code, but there aren't many projects out there that do. In-fact, Dropplets is no worse than Wordpress is and that hasn't stopped Wordpress being hugely successful. Why? Most people don't care how things are coded if they work. Dropplets works, Wordpress works. If it works, who cares really? As a developer, I don't care, I'm not a code purist. My clients don't care either if I use Wordpress or Dropplets for their site.

Frameworks do have the added advantage of giving you things like encryption, database abstraction and a structure to adhere to, but there's nothing wrong with wanting to do things for yourself, sometimes understanding things on a lower-level makes you a better developer. Besides, the overhead of a PHP framework would be too much for a project like Dropplets in my opinion. Considering it's database-less, you don't need any database abstraction, ORM, no custom-built session management or complicated caching libraries.

Even a framework as light as Codeigniter would be far too heavy to build something like Dropplets on-top of. And people need to realise the future of PHP is not within frameworks, the Composer package manager means we can include what we want in our projects like a framework without the added overhead: include only what you need and ignore everything else.

I was hoping to avoid a framework, language, code-quality discussion but I guess it's fair people raise their hands after I question the intent of the comments on this submission. At the end of the day, good code is important, but as developers we know that it just isn't possible to write good code all of the time without help.

This highlights why open source is important and I think if people truly care about good code, they should roll up their sleeves and help. You can't deny Dropplets is pretty-darn cool. Not nearly enough people contribute to projects like this. I've forked the project and am planning on helping clean up the code-base a little bit if it means more people will use it.

I thought the whole point of open source was getting your ideas and work out there so others can improve it, not criticise it. If we spent all of our time perfecting something, most open source projects in existence would probably not exist. Sometimes it's best to get something that works, but isn't exactly coded to God-like developer levels out into the public. Criticism stems open source. We need to embrace imperfection and achieve perfection as a whole over time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: