Looking over the comments I want to say I am surprised the attitude of some people towards this project, but given this is Hacker "Hate On PHP" News, I am not. I am disappointed to see people nitpicking over the way some things have been coded. As someone who's used Dropplets on a couple of small sites now, I've found it to be a breath of fresh air compared to Wordpress.
Not only is Dropplets a lot more simple to work with compared to other CMS's/blogging platforms written in PHP, it works. It's easy to write themes for it, it's easy to publish content and easy to make it do whatever you want. It's perfect for those times when you want something lightweight that isn't bloated Wordpress.
So I am going to surprise you all by not weighing in on the dick-measuring contest that is language comparison. You can write bad code in any language, PHP just makes it easier to do so. I think this is a great project and if you have a problem with the way it's coded, remember it's open source and anyone can contribute.
This is the other problem with a lot of people that frequent this site, but not limited to this site. They're quick to complain and point out problems with other peoples code and their choice of language, but rarely ever put their keyboard where their mouth is and actually bother to make a difference by contributing to an open source project.
So my advice to anyone who came here to comment on the choice of PHP or the way it's coded would be to take it elsewhere and learn to compliment someone else's work. It's attitudes like the ones I am seeing that make people (like the author of this project) not want to release their work as open source because people are far too critical and judgemental of others.
Not everyone who's criticizing the code is necessarily hating on PHP. There is a difference between good PHP and bad PHP and perfectly valid reasons to suggest things need to be changed.
And I believe people have been contributing, at least, issues have been opened up and at least one commenter has mentioned rewriting (possibly forking) it.
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.
The presentation is awesome. Super clean, I love the logo and the video's that let you know just what this thing is. The blurbs of text were enough to get me interested enough to watch the video. The videos were clean and to the point. Damn, for me this is what all landing pages for projects like this should be. I'm not sure if I'll use your product but I'll certainly bookmark the page to learn from later.
A small rant: I think it is bad practice to hide content below the page height. I just wanted to close the website because I thought 'nothing to see here' before I accidentally scrolled and more content was revealed.
It has really faint text semi-transparent text on a semi-transparent background which is covered by a Twitter icon, at least in my Chrome with my browser height.
If I zoom out all the way, there's still no indication you can scroll down, because the page "helpfully" hides everything from you.
I read this comment before actually going to the site, which is fortunate, because I'm certain I would've missed the rest of the content if you hadn't pointed that out.
I rarely complain about design issues on websites but this a case where things should really be changed.
Apparently the author would agree with you. The front page reads, "Dropplets is not a CMS, it's just for pure blogging and nothing more which is a good thing."
Exactly. From just scanning the website my impression was Wordpress without a DB dependency. Even though Wordpress is used a lot as a CMS and this might eventually take that route they are clearly pushing blogging.
Since there seems to be some discussion about the code quality for Dropplets, I just wanted to clarify that Dropplets is really just a proof of concept. I'm not a developer, nor do I want to be. I'm good at creating concepts like Dropplets, but that's where my skills as a developer ends. I decided to publish Dropplets with the hope that developers that actually knew what they were doing would help me take the concept to the next level. I stated this on Dropplets.com as well.
Certainly, learning to use Composer (http://getcomposer.org) to manage the packages such as PHPass and Markdown and autoload will clean up a lot of the mess, also updating packages is as easy as running a shell command (or even in my case a batch file..)
I'm a bit worried about the amount of mixedin html and php I see too -- one of the benefits of sticking with an existing templating system (though people will say that's superfluous since PHP is a templating system) is that data passed into templates can be automatically escaped, whereas just mixing in adds the possibility of an xss issue.
It also looks like he's using index.php pages as a way to protect his files possibly? I think he need to look into proper .htaccess protection and url routing - ensure that only predetermined urls can even resolve to anything.
Overall it looks interesting and there's definitely a place for it conceptually but as others have pointed out, the style of PHP is a bit behind what's considered best practice. Still, that can be easily fixed.
Side note: I love how this has been in development since at least February (when the Twitter was launched). Too many half-baked projects get posted to HN the weekend they're launched and then never end up progressing much further. The fact that this has been in the works for a while gives me the confidence to try it, knowing this isn't as fly-by-night as a Show HN weekend project.
The concept and simplicity make me think of Ghost's (http://ghost.org/features/): free, open source, near-minimalist, and self-hosted.
The seemingly only advantage is that Dropplets doesn't require a database, and its landing page is amazingly beautiful, clear, and to the point (though Ghost's "features" page is slick as well).
On a more technical note, click events seem to be propagated up the player on the landing page, closing it when toggling HD for example.
But Ghost uses node.js which almost nobody can actually host themselves, because the hosting that people already pay for doesn't (and perhaps wont) support it. Node may be hip and all, but PHP still seems like the right choice for something as simple as blogging software to me.
Yes, almost nobody. Certainly, everybody CAN get a VPS from Digital Ocean. But should I tell my friends that have never touched a commandline and really struggled with just uploading Wordpress.org (and running the installer) to their shared hosting to start administering a VPS running Linux.
The abysmal HN crowd, no problem. But I bet most people running a WP installation on their shared hosting are not as proficient as you believe.
Stuff like Wordpress and Ghost exist to have a sharecrop of cheap hosting services with it pre-installed — with Ghost it just looks like JS was the language the developer (a front-end dev on Wordpress. . .) was most familiar with, And That's Fine
Yep. It's also not self-hosted. Other than the fact that these are both CMS's with modern design on their landing pages, I don't see the correlation. They're very different types of software.
"You can host it on your laptop, or you can host it on a public server. The code is open, and so is the MIT license."
It's currently not public, so I would imagine at the moment it's all hosted on their servers, but according to their blog[0], they're going public on the 14th of October, meaning it should be self-hostable from then, one would assume.
The video was down for me, but maybe the uploader makes it easier then some other systems? When I try to teach non tech people to use a db-less CMS with no online admin, they get Markdown (they can at least copy and paste my example pages). But uploading files, WinSCP, FileZilla, etc and opening its NOT in word... this blows their minds. So if anyone has seen the uploader and it makes it super simple, it might be worth checking out.
This looks awesome. Kudos to the author for doing this. Not a big fan of PHP, but I love everything else about this project - from a product perspective.
Not getting into the code.
I tried playing with the demo and the 'admin panel' (by pressing the dropplet icon in top left) didn't show up for me in Chrome on Windows 7.
The screen moved slightly to the right (say 2 px) so I knew it was supposed to move...but it didn't go the full way.
This looks promising. I'm gonna give this a try since I'm looking for a simple and lightweight CMS for my blog. Speaking of which, anyone have any recommendations about that (apart from Jekyll)? I still haven't found what I'm looking for and I'm on the verge of coding my own blog in plain HTML instead of just installing something like Wordpress but that may be a pain in the ass to manage once I have more than handful of posts on my host.
I started playing with Anchor last week. I like it thus far, because it really focuses on blogging, something WordPress kinda deemphasized two years ago.
Plus, it's pretty. Which is always a nice bonus.
----
If you're not averse to paying for something, Statamic looks really awesome.
They both look pretty good, thanks for the suggestions!
As long as its price is reasonable, I don't mind paying for a CMS, but it looks like Anchor fit to my needs better than Statamic. All I want from a CMS is to have its own search and markdown support. That's it. I don't care much about themes and all that. I'm perfectly fine with having white background and black text on top of it centered on the page as a "theme".
Having tried it out before, I found the format used for blog posts to be incredibly arbitrary. It requires your twitter username for every post, and a bunch of other things. Plus, instead of using key/value pairings with yaml or something similar, it required that your headers be in a specific order.
It seems cool, it also seems like a little bit of work could be put into making it more accessible to people who didn't write it.
I tried to set this up a few months ago. Apparently I was formatting post headers incorrectly, because I couldn't get any posts I wrote to show up on the site after upload. No error messages or anything.
It's pretty, but the workflow isn't much better than Jekyll. I would have been happy if there was a post editor in the admin panel, but that's apparently not going to happen.
looks great! definitely will have to try this out.
it's a little discouraging, however, that the issue queue has so many pull requests, comments, etc. without comment.
i love the concept of simplicity and i'm sure the maintainers have a roadmap in mind. it'd be nice if that was communicated a bit so i can know how simple they plan to keep it.
This is very nice looking, but I have to nitpick about the "30 second" install. It takes 30 seconds, assuming you've already installed an operating system, a webserver, PHP, and set everything up securely. For a beginner that is really non-trivial. Still better than Wordpress, though.
It looks really good, but I hate a lot about the demo theme. Why does anything move without me doing anything? Will the annoying bottom bar always be there? What if I can't find a high-res artsy photo? Was it necessary to knock off Medium's (distinctive) menu icon?
Not sure if it's the same for everyone or not but I'm having issues playing the videos on Chrome.
The videos either just stay on the Dropplet background with the music playing, or it just goes away. In all this the BG music keeps playing though like it's playing like normal.
Jekyll requires you to generate your site. Dropplets generates pages on each request.
Jekyll runs on your machine, and is written in Ruby. Dropplets runs on your server, and is written in PHP.
Jekyll's posts require very minimal metadata, and use a key/value pairing system with YAML. Dropplets' posts require a ton of metadata, and the same metadata for every post, and in a specific order, and you can't add arbitrary metadata.
----
I don't think Dropplets has categories, but I may be mistaken.
Amazing. Since the dissolution of Posterous, I've been looking for something simple and easy. And with the theming abilities, it looks like it might just be perfect for me. Can't wait to give it a try today!
I love the design, concept and copy, but will someone please explain what Dropplets uses in lieu of a database? (I may have missed something, but I don't think that was explained in detail.)
warning: typical HN nitpicking (I know, typical, but it was just my first reaction upon seeing the code & I want to be honest).
I looked at the code and my first impression wasn't good. These are minor issues but such "smells" are red flags (to mix metaphors) and warn me away from the codebase
why would you set a get var called "filename" to request an RSS feed? There is no actual file called `rss`, so it's not a file name. So the filename get var is really maybe a file name, maybe some other non-file resource being requested. This is confusing & unintuitive, makes the code harder to read & parse.
too many ternaries!! Why are you testing against a specific string ("false") to indicate a boolean value? This is a major smell as it suggests the author doesn't know the proper use of basic PHP data types.* Why are you adding a ternary if to test posts_per_page size rather than just setting it to `null` to indicate "all posts" in the first place? How can pagination be true with unlimited posts per page anyway? Make posts_per_page null by default, remove redundancy in pagination config var name, make it a bool, and you're left with:
I don't mean to condemn the efforts of the author: everyone starts somewhere and this looks like a pretty dang cool project, but smells like these make me walk away immediately because they indicate this code is going to be confusing and hard to work with. One last one: functions.php. This will send a cold chill down the spine of any PHP dev familiar with the bad old days. Group code logically, write reusable modules, and use namespaces (well skip this last one if you want to support old/cheap hosting)! No need to code like its PHP 4 anymore :)
* Yes I see that it's a user defined setting in settings.php or config.php and an argument could be made that a user would understand "on"/"off" more easily than true/false, but this is a trivially solved by a comment & would make the code more robust and readable. More robust because string comparison in PHP is case sensitive, so if the user sets the setting to "OFF" it will effectively be "on." Boolean solves this.
I've no certainty here, but I strongly suspect that it's a Perlism that PHP partially took.
In Perl, $a == $b would be true -- just like in PHP. However, in Perl, you use string comparison ($a eq $b) when you want to compare strings. PHP doesn't seem to have string comparison outside of ==.
As a CFML developer who has had to bear the brunt of gleeful derision, you won't get an apology from me. :-)
Modern CFML running on Railo is an awesome environment to work in: PHP-like hackability, a very consistent language spec, native JVM performance, first-class java library integration, and it's a 100% pure open source software stack.
Whereas PHP has a much slower runtime, a horrific language spec, and nothing similar to the benefit of running on a common runtime like the JVM.
You wrote nasty code in PHP that you don't clearly understand, and aren't immediately either researching (and then documenting!) why you did what you did, or failing that, recoding for sanity. Once those little hacks calcify it's all down the tubes from there.
My only recommendation would be to use the new password api going forward and password_compat for versions less than 5.5. I don't see a php version requirement in their docs though.
The code is unfortunately written in straight procedural PHP. It is kind of spaghetti code. The end result is quite pretty, but it ignores all of the best practices in PHP development right now.
Also the last time I tried to set it up, it required that I have a twitter account.
There isn't any caching. But, everything other than the index page can be generated fairly quickly, because you're not making database calls, only file system calls.
The index page could take a little longer.
Regardless, it's fairly quick, but it generates the output on each request. Which is to be expected, almost every other tool that isn't manually generated is the same.
Not only is Dropplets a lot more simple to work with compared to other CMS's/blogging platforms written in PHP, it works. It's easy to write themes for it, it's easy to publish content and easy to make it do whatever you want. It's perfect for those times when you want something lightweight that isn't bloated Wordpress.
So I am going to surprise you all by not weighing in on the dick-measuring contest that is language comparison. You can write bad code in any language, PHP just makes it easier to do so. I think this is a great project and if you have a problem with the way it's coded, remember it's open source and anyone can contribute.
This is the other problem with a lot of people that frequent this site, but not limited to this site. They're quick to complain and point out problems with other peoples code and their choice of language, but rarely ever put their keyboard where their mouth is and actually bother to make a difference by contributing to an open source project.
So my advice to anyone who came here to comment on the choice of PHP or the way it's coded would be to take it elsewhere and learn to compliment someone else's work. It's attitudes like the ones I am seeing that make people (like the author of this project) not want to release their work as open source because people are far too critical and judgemental of others.