Plans for v2
If you want we can discuss the version 2 here and make some plans :)
So, I assume that there will be definitely a version 2 of dropplets @Circa75 ? If so, we can go further and propose some features we'd like to see in future. Furthermore, we should decide if we set up a complete new project structure or if we should invest some time to refactor the existing code.
Yup... let's assume that there will definitely be a version 2. Like I said... I can't do it on my own, but it seems that won't be the case. Hoping to get more developers involved. Spread the word.
Proposal: arbitrary post metadata, accessible to the theme. Which means something like YAML, performing like Jekyll's front matter.
How about if we make a hole new project of dropplets.
- drop support for php 5.3
- use psr-2 or symfony syntax
- a new folder structure
- use composer (for dev)
- https://github.com/nikic/FastRoute for routing
- new template system like plates, twig or something like my system where you can chose what you want to use
- use classes and stop mixing php and html
Standardising some of the components that make up Dropplets as @prisis suggests is a good idea. A template system is definitely a good idea, and using a coding standard will help keep code quality consistent (note, I said help, not enforce).
As far as coding standards go, a styleguide for PHP and CSS/LESS/SASS would probably be useful. There are many available. Here's an example. Maybe with that could be an .editorconfig.
@jrsinclair What do you mean a template system? There's already one in Dropplets, mostly using <?php echo( $context_specific_variable ); ?>
Regarding template systems, I was just echoing @prisis. Something like Twig or Plates or even Handlebars gives you a syntax for templating that is a bit more concise and expressive than plain old php templates. Because they're a different syntax than regular PHP, it helps reinforce the separation of concerns. They also have the advantage that you can compile them to get slightly better performance.
The Drupal community 'recently' made the switch to using Twig for Drupal 8 after many years of old-style php templates.
@jrsinclair I'm familiar with Handlebars and am definitely interested in integrating some sort of templating system for Dropplets.
@benlk Style preprocessing was definitely on my mind as well.
@prisis I'm thinking we should create a new branch for v2 rather than a new project... thoughts?
@Circa75 sorry :D, I did meant a new branch haha
Yeah some, but give me 1-2 more days :)
You get my vote for Handlebars templates. It's ridiculously easy to use and we can use it for any JavaScript templating as well.
I started to work on v2 structure: https://github.com/prisis/dropplets/tree/develop
Hey guys, do you like the structure?
Yeah... that looks good to me.
If you like to change something, say it :) else I will start to make the next steps
It really does look good to me... anyone else have any input?
switching to use neatly defined CommonMark (cmark) instead if the ambiguos defined original markdown would be awesome. in general usage nothing changes, but all the edge cases are now free of random results depending on which lib you used. http://commonmark.org/ https://github.com/jgm/CommonMark
Hmmm. I'd prefer PHP Markdown Extra myself, but I can respect the reasoning behind using CommonMark.
@jrsinclair .. me too, kind of. but in reallife usage i found the features from Extra not worth bothering and tables are just a pain to write. and since there are some of the bigger players involved in the making of CommonMark my bet is that those specs will grow once the early nik-naks are ironed out, of which i havent found any myself.
What I'd love to see is an option to turn off the Dropplets button on every page and instead go to an admin page to sign in instead which then brings the control panel back if signed in.
I was going to write this into the current version of Dropplets, but if you're developing a V2 then I'll offer my services for the second version instead!
Similarly, I'd like an option to turn off the admin functions entirely - I don't use the web interface at all, and have received password reset emails in the past. I FTP new entries to the site.