about me · drupal 8 symfony cmf sulu cms grav (flat file) october cms (laravel) pagekit. drupal 8...

50

Upload: others

Post on 08-Aug-2020

23 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine
Page 2: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

About Me

● Freelance Web Developer● PHPBench● CMS Developer

– yProximité

– Symfony CMF

– Sulu CMS

Page 3: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Never made a website!

Page 4: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Other Symfony-like CMS systems

● Drupal 8● Symfony CMF● Sulu CMS● Grav (flat file)● October CMS (laravel)● PageKit

Page 5: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Drupal 8

● Twig● Uses Symfony components● Uses Symfony CMF Routing component● Would seem to do everything that I require and

more.

Page 6: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Drupal 8● All files in web root by default● No PSR-0/2!● No Github!● Configuration in the database by default● Mouse-click configuration by default● Composer support nascent● DI container is global● .. basically its unfamiliar● Do I want to commit myself to this?

Page 7: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Bolt CMS

● Silex● Twig● Doctrine DBAL● Great default configuration

Page 8: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Bolt Manifesto (abbreviated)

● Simple, sophisticated and straightforward.● Targeted at editors and {front, backend}

developers.● Always open source.● Our code should be clean, well-organised and

legible. ● Always promote and maintain a welcoming and

inclusive community.

https://docs.bolt.cm/3.0/other/manifesto

Page 9: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Configuration

Subject Filename

Content Types contenttypes.yml

Menus menu.yml

Taxonomies taxonomy.yml

Permissions permissions.yml

Routing routing.yml

Page 10: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Content Types

app/config/contenttypes.yml

Page 11: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Backoffice form

Page 12: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Frontoffice Twig dump() of content on http://localhost:8000/pages/home-page

records implement array access

Page 13: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Field Types

● Text● Image / Image list● Repeater fields● Markdown● HTML● Geolocation● Video (Youtube)● etc..

Page 14: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

HTML

Page 15: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Markdown

Page 16: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Image, Video

Page 17: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Configuration

Subject Filename

Content Types contenttypes.yml

Menus menu.yml

Taxonomies taxonomy.yml

Permissions permissions.yml

Routing routing.yml

Page 18: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Menu

app/config/menu.yml

Page 19: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Menu

Page 20: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Menu

● Not dynamic● Very fast

Page 21: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Configuration

Subject Filename

Content Types contenttypes.yml

Menus menu.yml

Taxonomies taxonomy.yml

Permissions permissions.yml

Routing routing.yml

Page 22: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Taxonomy

app/config/taxonomy.yml

Page 23: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Taxonomy

taxonomies can be applied via. the content type

Page 24: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Taxonomy

grouping taxonomy

Page 25: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Taxonomy

tags and categories

Page 26: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Configuration

Subject Filename

Content Types contenttypes.yml

Menus menu.yml

Taxonomies taxonomy.yml

Permissions permissions.yml

Routing routing.yml

Page 27: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Permissions

app/config/permissions.yml

Page 28: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Permissions

● No per-object permissions

Page 29: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Configuration

Subject Filename

Content Types contenttypes.yml

Menus menu.yml

Taxonomies taxonomy.yml

Permissions permissions.yml

Routing routing.yml

Page 30: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Routing

app/config/routing.yml

Page 31: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Templates / Themes

Page 32: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Templates / Themes● Twig templating engine● `theme.yml` config file.● Templates fields.

Page 33: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Default Theme

● Foundation 6● SCSS● Gulp

Page 34: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Retrieving ContentIn Twig templates

See https://docs.bolt.cm/3.0/templates/content-fetching

Page 35: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Retrieving ContentWith PHP

Page 36: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Retrieving ContentWith PHP

● EntityManager != Doctrine ORM● EntityManager is “new”● Content retrieved with EntityManager does not

behave like “Legacy” content (e.g. record.link will not work).

Page 37: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Developer Tools

Debug Toolbar

Page 38: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Error Handling

Whoops Error Handler

Page 39: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Extending

● Install from the Web interface.● Install from CLI.● Local extensions.● Bot extension repository.● https://extensions.bolt.cm.● Configurations added automatically.

Page 40: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Extending

Page 41: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Example Extensions

● Bolt Forms: SF Forms, submission handling.● Bolt Members: User registration, profiles.● DTL Fixtures: Load, generate fixtures via. Alice.

Page 42: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Its not perfect.. yet!!

● No Multilang support.● Content types exposed by default.● Hacky route generation workarounds.● Container injection is favoured● Hacky date handling.● Experimental import / export functionality included but basically useless● No system / user namespacing in database tables, value fields etc.● Ignores errors by default, sometimes including Fatals (WSOD)● Composer extension handling can be confusing● Cannot use packagist deps in extension● Raw DBAL query builder.● Cannot currently override repositories for content.● No hierarchical content handling.● Cannot use custom repositories effectively.● Cannot query relations using the new EntityManager without raw DBAL

Page 43: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Its not perfect.. yet!!

● Lots of refactoring happened for v3.0.● System has both legacy and “new” systems.● Legacy system still used by core in some

places.● v4.0 should remove lots of legacy.

Page 44: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Issues I created

● github.com/bolt/bolt/issues/5469: Bug with repeating HTML field● github.com/bolt/bolt/issues/5465: Datetime● github.com/bolt/bolt/issues/5466: Bug with custom URL● github.com/bolt/bolt/issues/5470: Video + Markdown +

Repeater??● github.com/bolt/bolt/issues/5490: Category form population● github.com/bolt/bolt/issues/5494: Query builder● github.com/bolt/bolt/issues/5504: Strict variables● github.com/bolt/bolt/issues/5506: Custom repositories

Page 45: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Pull Requests I made

Page 46: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Pull Requests I made

* I did make some and will make more!

Page 47: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Its not perfect

But very few things are.

If you found a perfect CMS, I want to know about it!

Page 48: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Summary

● Alot of things work out-of-the-box● Small sites may not even need and PHP.● DX is generally very good, except when its bad.● Great support and very active community.

Page 49: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

Live Demo!

Page 50: About Me · Drupal 8 Symfony CMF Sulu CMS Grav (flat file) October CMS (laravel) PageKit. Drupal 8 Twig ... Twig templating engine

The End

● Talk to me on Twitter: @dantleech● Talk to Bolt on Twitter: @BoltCM● Talk to Bolt on Freenode: #boltcms● Visit the Bolt website: https://bolt.cm● Enjoy a drink!