SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Location
    MA, USA
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Looking For Feedback: What do you think about this array structure?

    I'm creating a personal CMS (no flames please lol).

    I'm working on the interface users will use to create new plugins/modules/addons. I came up with this idea last night while lying in bed last night, and starting working on it this morning. This is what I've come up with so far.

    The back end is OO, I plan on sticking to the PSR guidelines, and no, I don't want to use Drupal or Wordpress :-p (trying to head off any unhelpful comments here).

    A parsing class will parse this array to build what the site needs regarding routing and permissions. It's still a work in progress, but I think I have something to go on. I'm an intermediate developer and it would be great if I could get positive constructive criticism from the community.

    This is a little description of the array:
    http://paste2.org/aOesgmey

    Here are a couple examples of how it would be used to create a hello_world plugin:
    Single Page Simple Example - http://paste2.org/AEfnCKmA
    Single Array Complex Example - http://paste2.org/z3p7kLX0
    Multiple Pages and Blocks Example - http://paste2.org/8JGbCBwh
    Overrides Example - http://paste2.org/UOLd20DX

  2. #2
    SitePoint Enthusiast Strider64's Avatar
    Join Date
    Aug 2012
    Posts
    34
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    What is OO? Do you mean Object-Oriented Programming? If you do mean OOP then to be honest you are wasting your time and effort.

    I also want to add what you're talking about has nothing to do with setting up a personal Content Management System, I have (still creating) a CMS website <snip/>

    PSR guidelines are nice, but in my opinion it is more important to write proper code with commenting than sticking to something that few people follow faithfully.
    Last edited by Mittineague; Aug 4, 2013 at 21:18. Reason: removing unnecessary link

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Location
    MA, USA
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I meant the back end is Object Oriented. And the whole point of mentioning that stuff was to head off any discussion about it.

    And the PSR guidelines are mainly focused on code naming conventions and white space (spaces vs tabs), not the actual algorithms you're creating. Just like the PEAR and Zend coding styles. They have nothing to do with the code itself, just how it looks and making it easier to know what's what when you're looking at it (maybe not quite so much with PSR-0, but that's just a recommended namespace/folder structure for auto-loading classes if that's your thing, and haven't really looked too far into PSR-3 yet).

    But this thread doesn't have anything to do with that. I'm just curious about feedback regarding the data structure.

    And this data structure does have a lot to do with setting up a CMS if it's part of the API you're creating for plugin developers. In the back-end I'll be parsing that array and setting up and creating the features/routes/permissions for pages and blocks, along with allowing other plugins the opportunity to override any settings and add to the settings without having to touch another plugins code base, while at the same time allowing the back-end to check for any conflicts inside the plugin overrides, and any conflicts with other 3rd party plugin overrides, before executing the overrides so it can exit gracefully instead of having strange side effects or just blowing up on you.

    And I believe this structure will allow me to add to it in the future without breaking existing plugins; like adding more properties (i.e. permissions); or different content types (i.e. pages, blocks).

    So with those things in mind, is there any additional feedback?


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •