picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.85k stars 615 forks source link

Why Pico? #355

Closed yonas closed 8 years ago

yonas commented 8 years ago

Pico looks very interesting. I'm curious about the story behind Pico.

Why was Pico created?

How does Pico differ from the other popular alternatives, like middleman, nanoc, jekyll, pelican, etc?

mayamcdougall commented 8 years ago

I'm probably not the perfect person to answer this (afaik, @PhrozenByte is still away at the moment), but I'm going to give it a shot.

Pico was created about six years ago by @gilbitron as a "side project". You can read his original post if you're curious, but keep in mind that it's not an accurate representation on the current state of the project.

Although, Pico's been around a while, it's seen quite a bit of development over the last year due to @PhrozenByte's revival of the project. Unfortunately, I can't say much about the in-between time, as I've mostly only been around this last year. When I first discovered Pico, it was at version 0.8, and essentially dead. It hadn't seen an update in almost two years!

I'd actually like to hear @PhrozenByte's story of why Pico was revived and who was responsible, so hopefully he'll chime in when he returns home. I suspect @theshka also played a role in the decision to revive Pico, but he seems to have left the project behind as his last participation was several months ago.

At the moment, I'm working on revising Pico's Documentation, which is a bit sparse. I've got an About Page that you can check out if you're interested. It's a work-in-progress (and thus not on the official website yet) but the content is essentially done.

I haven't tried most of the alternatives you've mentioned above. I came to Pico from a database-driven CMS, and could give you a hundred reasons why I prefer it over one of those.

I believe the overall goal of Pico could be summed up as "to provide a simpler, more intuitive, and more easily extendable platform" than the alternatives.

Using Markdown (& YAML) for page content brings simplicity and ease-of-use.

Using Twig for Theming provides a powerful framework for building your website layout.

And finally, Pico can be extended by creating Plugins directly using PHP. These plugins can hook into Pico's infrastructure and allow you to extend its features without having to modify Pico itself.

And again, I've never had a chance to use the alternatives you've mentioned. I'm sure they provide some or all of these features as well (especially, say, using Markdown). Ultimately, it probably comes down to the fine details of the implementation.

Hopefully this helps to inform you a little. We love to have new users, so stick around give Pico a try if you think it'd be right for you. :smiley:

Not that I haven't tagged him enough in this, but @PhrozenByte could really give you a better technical overview than me. He's been away from home this last week, but should be back (and back on GitHub) sometime soon.

yonas commented 8 years ago

Thanks for your detailed response @smcdougall :)

I come from a Drupal background, and there seems to be a lot of common technologies here (PHP, Twig, YAML), which caught my attention. A Pico-Drupal bridge would probably not be hard to develop.

I'm looking forward to hearing from @PhrozenByte .

PhrozenByte commented 8 years ago

@smcdougall summarized it quite well. :+1:

The main difference to the alternatives you've mentioned is, that Pico is no static website generator (I don't know any of them apart from Jekyll, that's just what they say on their websites). Pico doesn't generate static HTML pages (however, we're planning to officially support this with Pico 2.0) which can be uploaded somewhere, it's a PHP application running on your server (like Drupal). Pico serves dynamic websites. This adds flexibility and allows things like a admin or search plugin, what wouldn't be possible with a static website generator.

The main difference to other flat-file CMS (i.e. not static website generators, however, this mostly also applies to them) is Pico's actual simplicity. Many alternatives argue that they are simple, but they aren't. Maybe in terms of usability (what doesn't mean that Pico isn't simple in terms of usability, it IMO definitely is), but not in terms of processing and the actual source code. Since Pico 1.0 this is a bit veiled (because of the very extensive code documentation), but Pico's core is below 1000 lines of code (see the lines of code statistics below). The first version of Pico released in 2012 had just 114 lines of code.

The original author, @gilbitron, unfortunately isn't involved in Pico's development anymore, thus it's hard to say why Pico has been created initially. The only thing I can say is why I've chosen Pico - and that was because of Pico's simplicity and the very logical and easy to comprehend workflow (i.e. "how to do things"). And not to forget this: Pico uses technology I already know (PHP, Markdown, YAML, Twig) - so why should I choose alternatives I don't know? Additionally, the plugin system is dead simple (basically just a bunch of hooks/callbacks) but extremely powerful at the same time.

The history of my "takeover" (:wink:) of the project can be quickly explained: I wanted to use Pico 0.9 for one of my projects (because I love how Pico does things, see above), but I didn't like the condition of the source code (bad code documentation, messy coding standards, various smaller bugs) and missed some minor features. So I decided to do a code refactoring and open a PR (Pico 1.0). @theshka, the maintainer of the project at this time (I really hope he comes back some time soon :cry:), liked my improvements and caused @picocms (the new owner of the project after @gilbitron sold it) to add me as a Collaborator. That's it. Since then I'm developing Pico.

I hope this has given you an idea of the "What" and "Why" of Pico. Please don't hesitate to ask if something is not clear :smiley:

$ cloc --by-file-by-lang lib/* index.php
       5 text files.
       5 unique files.                              
       0 files ignored.

http://cloc.sourceforge.net v 1.60  T=0.02 s (287.4 files/s, 116334.4 lines/s)
-----------------------------------------------------------------------------------------
File                                       blank        comment           code
-----------------------------------------------------------------------------------------
lib/Pico.php                                 147            617            631
lib/AbstractPicoPlugin.php                    21             96            146
lib/PicoTwigExtension.php                     20             95            123
index.php                                      4              7             15
lib/PicoPluginInterface.php                    8             82             12
-----------------------------------------------------------------------------------------
SUM:                                         200            897            927
-----------------------------------------------------------------------------------------

-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
PHP                              5            200            897            927
-------------------------------------------------------------------------------
SUM:                             5            200            897            927
-------------------------------------------------------------------------------
gilbitron commented 8 years ago

Just to fill in the story about why Pico was created in the first place: I wanted something I could throw up on a server that would turn markdown files into web pages. I was frustrated with the complexity of existing CMSs (e.g. WordPress) and while they are great in many situations, it was just too much hassle for a small personal blog. At the time I was inspired by projects like Dropplets but wanted something that was stupidly simple. So I made it. PHP, Markdown and Twig were just technologies I was familiar with at the time, which made creating Pico simple and quick.

After Pico became popular I didn't have the time to maintain it so I sold it. I was a bit disappointed at first that the new owners didn't seem to do anything with it, but it's nice to see folks like @PhrozenByte moving things forward again.

yonas commented 8 years ago

@PhrozenByte @gilbitron Thanks guys, I think I'm going to be using Pico as the perfect lightweight compliment to Drupal. With so many similar technologies, people in the Drupal community would have a very easy time making Pico their favourite flat-file CMS. Cheers :+1:

mayamcdougall commented 8 years ago

Don't forget, we're here to help if you need it. :smiley: