Jump to content

Sample code for MarkupAdminDataTable usage?


Gadgetto
 Share

Recommended Posts

11 hours ago, kongondo said:

Sometimes it's easier to just look at the core code examples. Admin Data Table is used, for instance, on the templates and fields listings. Other times, just look at the class itself, e.g. here for MarkupAdminDataTable

 

Edit: oops, beaten to it by @gmclelland

Thanks anyway! 

Learning module development by reverse engineering because no other information or sources are available is usually a bad sign for a CMS. This could be a reason why ProcessWire is not more widespread.

Link to comment
Share on other sites

7 hours ago, Gadgetto said:

Learning module development by reverse engineering because no other information or sources are available is usually a bad sign for a CMS. This could be a reason why ProcessWire is not more widespread.

Could you elaborate "bad sign" a little more please? I guess you are right and I guess ryan does not really care ? 

Link to comment
Share on other sites

Just now, bernhard said:

Could you elaborate "bad sign" a little more please? I guess you are right and I guess ryan does not really care ? 

That's easy to explain: a developer centric CMS (which ProcessWire is by definition) - should ... you guessed it - support developers as much as possible. Not only for front-end development but also for extending and customizing the CMS.

Please don't misunderstand, ProcessWire is definitely worth the effort to get used to - no matter how complex it may be. I only fear that the platform will never come out of its shadowy existence if nothing changes in this direction.

I'm only a beginner and can't really assess the status of the system yet, but I get this picture after working with it for about 2 months.

The code examples from the module development documentation are rudimentary at best and don't even begin to show what ProcessWire can do.

--- sarcasm on ---

As a drastic comparison for you as a helicopter pilot, this would be as if you were put into the helicopter as a rookie and told you to fly off after you have just received a small brochure in your hand describing how to take a seat in the helicopter. All other things you should learn by only looking around and looking under the hood...

--- /sarcasm off ---

If it weren't for the excellent tutorials from you and some other developers, you wouldn't get very far. I guess Ryan is so deep in the system that he doesn't even recognize the problem of the missing documentation anymore. For him, as the inventor of the system, everything is a matter of course. I know that from myself...

For a freelancer a change of CMS always means a big risk - this is the main reason for my rant.

Link to comment
Share on other sites

4 hours ago, Gadgetto said:

As a drastic comparison for you as a helicopter pilot, this would be as if you were put into the helicopter as a rookie and told you to fly off after you have just received a small brochure in your hand describing how to take a seat in the helicopter. All other things you should learn by only looking around and looking under the hood...

I understand that you are exaggerating for effect, but your analogy is wrong in several ways.

1. Apart from in kidnapping scenarios, nobody is ever "put" into a helicopter. Rather a person chooses to get into a helicopter. And if an person chooses to get into the pilot's seat and start pushing buttons and pulling levers then it's their own responsibility to handle the consequences.

2. A company that manufactures helicopters usually does not teach people how to fly helicopters. Likewise a company that manufactures hammers usually does not include a brochure explaining how to build a house. It's not really the responsibility of the manufacturer to deliver comprehensive instruction to every person who might come in contact with their tool. Rather (as per point 1) the responsibility rests with the individual choosing to use the tool to pursue their own learning from any sources that might be available.

3. Despite there being no obligation on the manufacturer to produce it, the helicopter we're talking about does in fact come with loads of detailed mechanical documentation, written and video tutorials, demo helicopters that you can take apart to learn from, and a helpful community of pilots and engineers ready to answer questions. So it's not really true that there's only a small brochure that leaves most things undocumented - quite the contrary. It seems that your complaint is that you've found some small behind-the-scenes component (maybe a heated pilot seat that is more of an optional thing than a critical feature necessary for every flight) that is not explained in a way you can understand.

4. Now let's bring into the picture the fact that we're talking about a helicopter that is made available for free. The "company" that has produced this helicopter is actually just a small number of generous people who, after having finished their day jobs, put in unpaid hours to offer helicopters to the world at no cost simply because they want to share the miracle of flight. If after their day jobs and the unpaid time in the helicopter factory there aren't enough hours left in the day for those generous people to also open up a helicopter pilot training academy then I don't think we have much reason to complain about that.

5. The company that produces this helicopter operates on the collaborative open-source model. That means there's an open invitation for anyone who sees potential in the product to participate in adding further value to it. So if you, as an aspiring helicopter pilot, can see that it would be useful for other pilots to have some documentation on the heated pilot seat then you would be very welcome to write up a document and submit it to the CEO. I'm sure he'd be delighted to receive it.

 

  • Like 5
Link to comment
Share on other sites

6 hours ago, Macrura said:

just read the core, it doesn't take that long and you learn a LOT

Reading the core, you can learn how something works but not why it's done in this way and what is the best way to use it.

  • Like 1
Link to comment
Share on other sites

10 hours ago, Robin S said:

I understand that you are exaggerating for effect, but your analogy is wrong in several ways.

1. Apart from in kidnapping scenarios, nobody is ever "put" into a helicopter. Rather a person chooses to get into a helicopter. And if an person chooses to get into the pilot's seat and start pushing buttons and pulling levers then it's their own responsibility to handle the consequences.

2. A company that manufactures helicopters usually does not teach people how to fly helicopters. Likewise a company that manufactures hammers usually does not include a brochure explaining how to build a house. It's not really the responsibility of the manufacturer to deliver comprehensive instruction to every person who might come in contact with their tool. Rather (as per point 1) the responsibility rests with the individual choosing to use the tool to pursue their own learning from any sources that might be available.

3. Despite there being no obligation on the manufacturer to produce it, the helicopter we're talking about does in fact come with loads of detailed mechanical documentation, written and video tutorials, demo helicopters that you can take apart to learn from, and a helpful community of pilots and engineers ready to answer questions. So it's not really true that there's only a small brochure that leaves most things undocumented - quite the contrary. It seems that your complaint is that you've found some small behind-the-scenes component (maybe a heated pilot seat that is more of an optional thing than a critical feature necessary for every flight) that is not explained in a way you can understand.

4. Now let's bring into the picture the fact that we're talking about a helicopter that is made available for free. The "company" that has produced this helicopter is actually just a small number of generous people who, after having finished their day jobs, put in unpaid hours to offer helicopters to the world at no cost simply because they want to share the miracle of flight. If after their day jobs and the unpaid time in the helicopter factory there aren't enough hours left in the day for those generous people to also open up a helicopter pilot training academy then I don't think we have much reason to complain about that.

5. The company that produces this helicopter operates on the collaborative open-source model. That means there's an open invitation for anyone who sees potential in the product to participate in adding further value to it. So if you, as an aspiring helicopter pilot, can see that it would be useful for other pilots to have some documentation on the heated pilot seat then you would be very welcome to write up a document and submit it to the CEO. I'm sure he'd be delighted to receive it.

 

You are merely reflecting on a single paragraph of my posting which was not meant seriously.

IMHO, a free CMS is not really free just because it costs nothing. Especially a developer oriented CMS like ProcessWire, because here the users contribute to the project and put a lot of time and effort into the project to make it better, to extend it and to bring it forward.

Bu as I can see from the answers here, I might be wrong with my opinion.

 

Link to comment
Share on other sites

I think you both have valid points. If ProcessWire wants to get more exposure and usage (…more devs creating quality modules) there are lot's of places to advance or update documentation or educate better. Especially module development can easily be daunting to newcomers as it's basically "do what you want" besides some conventions around config / module info / process module callbacks. There could also be more (UI) components to make processwire modules really feel like integrated into the backend. Currently this is mostly on the module developer which is neither efficient nor works really well. Besides the InputfieldWrapper and MarkupAdminDataTable component I feel like there's a severe lack of consistency in the ProcessWire UI a.k.a. truely reusable UI components to be used by module devs. One can certainly do a lot with just those two, but that depends on the module.

It should be perfectly fine to talk about such shortcomings. Especially if it's the experience of someone new here it should be a clear sign about places to improve. What we should be aware though is that we're still talking about oss and resources are sparse. Ryan will do what he can in the places he thinks are most important. This might not necessarily align with what other people think is most important. E.g. from my years in this community I feel like Ryan sees ProcessWire much less as a CMF than many people use it as. So the developer turning the admin experience around by 180 degrees is not really the primary target group. This explains any lack of grand documentation in this place and maybe the quite a few modules needing to fill in the gaps.

  • Like 4
Link to comment
Share on other sites

Well said @LostKobrakai! Agreed 100%

10 hours ago, Macrura said:

just read the core, it doesn't take that long and you learn a LOT

IMHO that depends a lot on your skills. For me it took very long to understand how the backend works and what all those (process)modules do and how all this plays together. That's why I wrote my tutorial blog post (which by the way took also very long, so I perfectly understand that ryan does not have this time - especially if it is correct that CMF users are not the target audience (and that's what I meant in my short statement above where I said that I think that ryan does not really care). And even if you are highly skilled it would be a lot more efficient to read good docs than to read good code.

 

2 hours ago, Gadgetto said:

You are merely reflecting on a single paragraph of my posting which was not meant seriously.

IMHO, a free CMS is not really free just because it costs nothing. Especially a developer oriented CMS like ProcessWire, because here the users contribute to the project and put a lot of time and effort into the project to make it better, to extend it and to bring it forward.

Bu as I can see from the answers here, I might be wrong with my opinion.

I liked to read @Robin S answer and I'm sure it was not meant bad ? I agree with you that it would be a lot easier if we had proper tutorials (not just api docs and example modules) about all the backend stuff. I've mentioned several times that I think that the community management and teamwork on the project could be improved. It feels like ryan does all the work and if he has no time for something, it's just not done...

On the other hand writing my guest blog post was easy: I just asked ryan if he was interested and I got a login and started writing... It's for sure not a perfect documentation about the backend, but it's a first step and I invite others to follow ? 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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