Uncategorized

Organic Groups and Message Stack in Drupal 8

Organic Groups

The heroes: @RoySegall@pfrenssen @damiankloip@chx et al.

For years Organic Groups has been one of the proven solutions for multi-sites functionality, in the form of one code base, one database, and one dashboard to rule them all. After so many years and seeing so many different implementations, such as Harvard’s OpenScholar, OpenAtrium, and many others, I’m even more confident OG is doing many things right.

Most of OG7’s concepts are being migrated to OG8, but obviously this is also a good time to fix some old mistakes. One of the mistakes was treating users and content (i.e. non-user entities) alike. But, well, you know – they are not. Because when we came to re-think of it, membership really makes sense only for users. For example, if the membership state is activepending or blocked, that should indeed be applied only to users. So we’ve changed it:

  • A reference between a group content and a group is done via an entity reference field with a default storage. The link between them is simply registered as a row in the DB.
  • A reference between a user and a group is also done via an entity reference field, however the field storage is custom. It’s the OgMembership entity you know from OG7.

Group module

At DrupalCon, a few people asked for my opinion on the Group module. I’m happy to say that none of them were surprised that I was very positive about it – which is probably another great case for open source.

So to repeat the answer I gave back in New Orleans, if Group is working for you, and satisfies your needs, go ahead and use it. For completeness here’s my critique on some of it’s core concepts:

One of the core concepts of Group is that a group isn’t a node. It’s a Group entity. That’s fine, also OG can have any entity as a group, but I’d argue that 90% of the time your group should be content. Because more often than not, groups need to have published/unpublished status. Or because groups need to have privacy options, and even in Drupal 8 we have only {node_access} table, not an {entity_access}.

Furthermore, there are quite a few cases where a single group content should be attached to multiple groups. This is where the power of OG kicks in, doing all the heavy lifting of making sure permissions are being handled correctly. I can assure you this is not a trivial task.

OG alternatives have always been there, and choosing the right tool for the problem is important. Group is actually solving a subset of the challenges OG deals with. If it works for you, go ahead and use it. I know you’ll be in good hands with it because Group’s author @kristiaanvandeneynde is a great person and a wonderful developer.

Message stack

The heroes: @RoySegall@jhedstrom@mccrodp et al.

The message stack is mostly ported to D8, and it has already reached a good place. I’m still not cutting an alpha release, because it requires polishing and might have a few data structure changes.

There are no big differences here in terms of concepts, although worth mentioning @bojanz’s suggestion to rename message type to message template. Suddenly it makes it much clearer what the intention of message template is.

If you would like to contribute you are most welcome to the repos: MessageMessage notify and Message subscribe

 

Load more 501
Load more 502
Load more 503
Load more 504
Load more 505
Load more 506
Load more 507
Load more 508
Load more 509
Load more 510
Load more 511
Load more 512
Load more 513
Load more 514
Load more 515
Load more 516
Load more 517
Load more 518
Load more 519
Load more 520
Load more 521
Load more 522
Load more 523
Load more 524
Load more 525
Load more 526
Load more 527
Load more 528
Load more 529
Load more 530
Load more 531
Load more 532
Load more 533
Load more 534
Load more 535
Load more 536
Load more 537
Load more 538
Load more 539
Load more 540
Load more 541
Load more 542
Load more 543
Load more 544
Load more 545
Load more 546
Load more 547
Load more 548
Load more 549
Load more 550
Load more 551
Load more 552
Load more 553
Load more 554
Load more 555
Load more 556
Load more 557
Load more 558
Load more 559
Load more 560
Load more 561
Load more 562
Load more 563
Load more 564
Load more 565
Load more 566
Load more 567
Load more 568
Load more 569
Load more 570
Load more 571
Load more 572
Load more 573
Load more 574
Load more 575
Load more 576
Load more 577
Load more 578
Load more 579
Load more 580
Load more 581
Load more 582
Load more 583
Load more 584
Load more 585
Load more 586
Load more 587
Load more 588
Load more 589
Load more 590
Load more 591
Load more 592
Load more 593
Load more 594
Load more 595
Load more 596
Load more 597
Load more 598
Load more 599
Load more 600
Load more 601
Load more 602
Load more 603
Load more 604
Load more 605
Load more 606
Load more 607
Load more 608
Load more 609
Load more 610
Load more 611
Load more 612
Load more 613
Load more 614
Load more 615
Load more 616
Load more 617
Load more 618
Load more 619
Load more 620
Load more 621
Load more 622
Load more 623
Load more 624
Load more 625
Load more 626
Load more 627
Load more 628
Load more 629
Load more 630
Load more 631
Load more 632
Load more 633
Load more 634
Load more 635
Load more 636
Load more 637
Load more 638
Load more 639
Load more 640
Load more 641
Load more 642
Load more 643
Load more 644
Load more 645
Load more 646
Load more 647
Load more 648
Load more 649
Load more 650
Load more 651
Load more 652
Load more 653
Load more 654
Load more 655
Load more 656
Load more 657
Load more 658
Load more 659
Load more 660
Load more 661
Load more 662
Load more 663
Load more 664
Load more 665
Load more 666
Load more 667
Load more 668
Load more 669
Load more 670
Load more 671
Load more 672
Load more 673
Load more 674
Load more 675
Load more 676
Load more 677
Load more 678
Load more 679
Load more 680
Load more 681
Load more 682
Load more 683
Load more 684
Load more 685
Load more 686
Load more 687
Load more 688
Load more 689
Load more 690
Load more 691
Load more 692
Load more 693
Load more 694
Load more 695
Load more 696
Load more 697
Load more 698
Load more 699
Load more 700
Load more 701
Load more 702
Load more 703
Load more 704
Load more 705
Load more 706
Load more 707
Load more 708
Load more 709
Load more 710
Load more 711
Load more 712
Load more 713
Load more 714
Load more 715
Load more 716
Load more 717
Load more 718
Load more 719
Load more 720
Load more 721
Load more 722
Load more 723
Load more 724
Load more 725
Load more 726
Load more 727
Load more 728
Load more 729
Load more 730
Load more 731
Load more 732
Load more 733
Load more 734
Load more 735
Load more 736
Load more 737
Load more 738
Load more 739
Load more 740
Load more 741
Load more 742
Load more 743
Load more 744
Load more 745
Load more 746
Load more 747
Load more 748
Load more 749
Load more 750
Load more 751
Load more 752
Load more 753
Load more 754
Load more 755
Load more 756
Load more 757
Load more 758
Load more 759
Load more 760
Load more 761
Load more 762
Load more 763
Load more 764
Load more 765
Load more 766
Load more 767
Load more 768
Load more 769
Load more 770
Load more 771
Load more 772
Load more 773
Load more 774
Load more 775
Load more 776
Load more 777
Load more 778
Load more 779
Load more 780
Load more 781
Load more 782
Load more 783
Load more 784
Load more 785
Load more 786
Load more 787
Load more 788
Load more 789
Load more 790
Load more 791
Load more 792
Load more 793
Load more 794
Load more 795
Load more 796
Load more 797
Load more 798
Load more 799
Load more 800
Load more 801
Load more 802
Load more 803
Load more 804
Load more 805
Load more 806
Load more 807
Load more 808
Load more 809
Load more 810
Load more 811
Load more 812
Load more 813
Load more 814
Load more 815
Load more 816
Load more 817
Load more 818
Load more 819
Load more 820
Load more 821
Load more 822
Load more 823
Load more 824
Load more 825
Load more 826
Load more 827
Load more 828
Load more 829
Load more 830
Load more 831
Load more 832
Load more 833
Load more 834
Load more 835
Load more 836
Load more 837
Load more 838
Load more 839
Load more 840
Load more 841
Load more 842
Load more 843
Load more 844
Load more 845
Load more 846
Load more 847
Load more 848
Load more 849
Load more 850
Load more 851
Load more 852
Load more 853
Load more 854
Load more 855
Load more 856
Load more 857
Load more 858
Load more 859
Load more 860
Load more 861
Load more 862
Load more 863
Load more 864
Load more 865
Load more 866
Load more 867
Load more 868
Load more 869
Load more 870
Load more 871
Load more 872
Load more 873
Load more 874
Load more 875
Load more 876
Load more 877
Load more 878
Load more 879
Load more 880
Load more 881
Load more 882
Load more 883
Load more 884
Load more 885
Load more 886
Load more 887
Load more 888
Load more 889
Load more 890
Load more 891
Load more 892
Load more 893
Load more 894
Load more 895
Load more 896
Load more 897
Load more 898
Load more 899
Load more 900
Load more 901
Load more 902
Load more 903
Load more 904
Load more 905
Load more 906
Load more 907
Load more 908
Load more 909
Load more 910
Load more 911
Load more 912
Load more 913
Load more 914
Load more 915
Load more 916
Load more 917
Load more 918
Load more 919
Load more 920
Load more 921
Load more 922
Load more 923
Load more 924
Load more 925
Load more 926
Load more 927
Load more 928
Load more 929
Load more 930
Load more 931
Load more 932
Load more 933
Load more 934
Load more 935
Load more 936
Load more 937
Load more 938
Load more 939
Load more 940
Load more 941
Load more 942
Load more 943
Load more 944
Load more 945
Load more 946
Load more 947
Load more 948
Load more 949
Load more 950
Load more 951
Load more 952
Load more 953
Load more 954
Load more 955
Load more 956
Load more 957
Load more 958
Load more 959
Load more 960
Load more 961
Load more 962
Load more 963
Load more 964
Load more 965
Load more 966
Load more 967
Load more 968
Load more 969
Load more 970
Load more 971
Load more 972
Load more 973
Load more 974
Load more 975
Load more 976
Load more 977
Load more 978
Load more 979
Load more 980
Load more 981
Load more 982
Load more 983
Load more 984
Load more 985
Load more 986
Load more 987
Load more 988
Load more 989
Load more 990
Load more 991
Load more 992
Load more 993
Load more 994
Load more 995
Load more 996
Load more 997
Load more 998
Load more 999
Load more 1000

Related Articles

Leave a Reply

Back to top button