Jump to content

October CMS Builder plugin


GuruMeditation
 Share

Recommended Posts

I'm sure a lot of you are familiar with October CMS. It reminds me of PW in a number of ways. Anyway, they are currently developing the Builder plugin which is basically a plugin that makes it easier to create other plugins. I'm sure most coders on here wouldn't need anything like this, but for us novices it looks great.

A List of features:


* Initialize a plugin
* Create and edit plugin database tables
* Create model classes
* Create back-end forms and lists
* Manage plugin permissions
* Create back-end controllers
* Define back-end navigation menus
* Manage plugin versions, migrations and database seeder scripts
* Manage plugin localization files

And more! It's coming soon!

Does anything similar exist for PW? If not, could it possibly attract new novice users to create modules? I personally like the database table creation.
 

https://www.facebook.com/octobercms/videos/vb.558195297627271/972023579577772/?type=2&theater
 
Thoughts?

Link to comment
Share on other sites

There doesn't seem to much in there that ProcessWire doesn't already have in one form or another.

What, specifically, would you hope an equivalent PW module would achieve?

This is where PW frustrates me. I'm currently writing a module, and I am by no means an expert like most people on here, but writing a module in PW is a game of trial and error and a pain in the arse for idiots like me. I've had to look through other modules and core files to find what I'm looking for (are new users going to bother looking through the core code for the information they need?). There's a serious lack of documentation concerning module creation. I really don't see a PW module that can compete with the OctoberCMS plugin to be honest in terms of simplicity for creating other modules. As far as I can tell from the video, OctoberCMS makes it easy to create custom plugin database tables that keep all the plugin data within that table as rows. From what I've gathered with PW we need to delve into the world of Fieldtypes, and that isn't an easy task. But what do I know, I'm retarded when it comes to all this.

  • Like 1
Link to comment
Share on other sites

I understand your point. The information you need for building a module is not documented in one place but spreaded through the forum and sometimes you even have to look in the core to find what you need. However it takes a lot of time and effort to make documentation and even more time to write them in such a way that even beginners can understand them. Comparing with October CMS doesn't say much and neither does Processwire have a community like Drupal contributing to documentation. The history and nature of Processwire is totally different.

But maybe there are more sources as you think that could help you making your own module:

https://processwire.com/api/modules/
http://wiki.processwire.com/index.php/Module_Creation
https://processwire.com/talk/topic/1641-learning-module-development/
https://processwire.com/blog/posts/new-module-configuration-options/
http://modules.processwire.com/modules/process-hello/

Things that are not covered for you in those posts you can always ask here in the forum.

  • Like 4
Link to comment
Share on other sites

To store data in a database table there's no need for any custom fieldtype. These are only needed if you want to create custom fields. If your module does just need a place to store e.g. configuration, you could also just use standard sql queries and if that's to bare bone there's always the option to let a orm library handle it or rather any library that abstracts the sql queries for you. 

There's also the option to use the module configuration automatisms to store information, which is stored json encoded, but might be enough for smaller configurations.

It's true that fieldtype development is not very well documented officially, but it's actually not much different from what the teaser video in the starting post does show besides the UI factor. It needs a table column setup (getDatabaseSchema()) and some runtime to database conversion (sleepValue()) and db to runtime conversion (wakeupValue()). While the fieldtype events plugin is mentioned in the forum as kind of entry point to fieldtype development I found it a bit overwhelming at first, as it's starting out as multi-value field and is therefore more complex than it would need to be in the beginnings. With just extending the core fieldtype class and changing up those three methods you should be able to get a fieldtype working and then you can add functionality like sanitization or subfields and so on on top of it. 

  • Like 3
Link to comment
Share on other sites

The point I was trying to make with my last comment, was that the OctoberCMS builder plugin seemed like its main task was creating something that handles a new data structure (and create the associated files). For that - in Processwire - it's not needed, because of the way we can combine templates and fields. In that essence, ProcessWire admin interface IS the builder.

This module you're building - what is it's purpose? As you mentioned you're not an 'expert' (not that many of us are!), so maybe there are different ways of doing what you need without going down the module route.

  • Like 1
Link to comment
Share on other sites

I probably came across as a bit negative but that wasn't my intention. To make my point clearer, I suppose what I'm getting at is this: As a novice, the OctoberCMS plugin looks a lot more appealing to me as it appears to take away the mundane tasks of creating a module/plugin with a visual tool. To create a module in PW, you need to trawl through the code or the forum. As for what module I'm creating, well it can be found here. I have spent a lot of time on that module, most of which involved searching the forums and looking through other modules for the answers. It's a shame because PW is so simple to use, but the information and documentation is lacking in my opinion. But I'll go with the majority and admit that PW is probably too advanced for me personally in this respect. I can understand most things that are documented correctly, or have tools to take away the tedious elements, but sadly PW lacks in these areas (to me).

Take that as you will, but it is just my opinion.

If you're still looking for an example of what I mean, then I'd probably mention the lack of information regarding installation, uninstallation and upgrades when creating a module. I've lost count of the amount of times I have tested my module only for things to break because I made a mistake. And when my module breaks, the whole site breaks, leading to me having to delete all my module information from the database to get it back up and running.

  • Like 1
Link to comment
Share on other sites

@GuruMeditation,

  1. You and everyone on this forum are an important part of this ProcessWire Community.
  2. Learning the many things about ProcessWire can be difficult, I know it's taken me a long time.  I'm still learning about module development.
  3. I would hope that you don't give up or think that your concerns have no merit.  The fact that you bring them up, means that we are made aware and I know there are many people on this forum willing to help with anyones understanding.
  4. Everyone's level of understanding is different, however I believe you will get there.
  5. Things in ProcessWire are changing all the time, unfortunately the documentation doesn't always translate into concepts that novices (me included) can quickly understand.  I know I work with things and eventually the lightbulb comes on and I can move on.
  6. Finally,  ProcessWire is a great tool that can help you do many things. There are many things to learn and I hope that you will continue to ask questions, as we all learn something new when people give freely of their knowledge as they do on this forum.
  • Like 7
Link to comment
Share on other sites

@cs

@GuruMeditation,

  1. You and everyone on this forum are an important part of this ProcessWire Community.
  2. Learning the many things about ProcessWire can be difficult, I know it's taken me a long time.  I'm still learning about module development.
  3. I would hope that you don't give up or think that your concerns have no merit.  The fact that you bring them up, means that we are made aware and I know there are many people on this forum willing to help with anyones understanding.
  4. Everyone's level of understanding is different, however I believe you will get there.
  5. Things in ProcessWire are changing all the time, unfortunately the documentation doesn't always translate into concepts that novices (me included) can quickly understand.  I know I work with things and eventually the lightbulb comes on and I can move on.
  6. Finally,  ProcessWire is a great tool that can help you do many things. There are many things to learn and I hope that you will continue to ask questions, as we all learn something new when people give freely of their knowledge as they do on this forum.

I can't argue with anything you have said. I agree with it all. I just think the documentation could be improved and also tools could be developed to make module development easier and also more secure. PW will become more popular over the next few years, and I'd hate to see an influx of badly written insecure modules due to a lack of documentation. I also appreciate your feedback. PW is without a doubt the best CMS / Framework out there, and believe me I've tried them all. That's why I get passionate about these issues.

  • Like 3
Link to comment
Share on other sites

As a novice in real PHP programming (not this coding trial&error thing...) i've to say this kind of documentation is not that great, too.

The great API overview don't really help if you need a advice how to create a specific thing with a module. You have to search for a similar module and study how this is done in this module....then you find out that there are more than once possibilities and i don'T know which is the best/actual option...and so on.

Ryan's blog entries are great stuff to read....but it is all like a puzzle to start with a own bigger module...small ones are written fast and straight with one or two simple functions/methods that output some markup or a textformatter. But if i take a look on the project of GM with the forum part i could feel a little bit what this topic causes...

@GM - but the October CMS builder is nothing you search for - it is more like building inputfields and forms for datasets....and this is what PW does per default...set a special template, fields, userrights and relations via pagetable and your backend UI is ready to use - no module creation needed! THIS is one of the biggest reasons why i switched to Processwire i could create so much without create a proprietary module! You look for a documentation about module creation and a actual collection of best practice.

But you are right just two (1, 2) official resources of docs for module creation and some links on other modules as examples are a all a good PHP developer need, but someone that is familiar with the frontend usage of API and has some experience with basic hooks and this stuff, that is willing to go one stepp further - this step is a bigger one in the PW universe...;)

Not that i missing something - if i would need a forum i would probably go the hard way with templates, fields, and some frontend magic - but to have this a module like kongondo's great blogmodule would be a real good alternativ and much faster setup for sure.

To get something really positive from this threat we could define a short list what kind of things are need a better documentation or better examples maybe we can collect a link list of best practice code from some github repos and a little description on them?

Best regards mr-fan

  • Like 3
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...