3 ms·
> It is kind of a universal tool: you can make simple web sites, you can use it to build complex systems. It is always better if you have developers that know w
by KronisLV 5y ago
> It is kind of a universal tool: you can make simple web sites, you can use it to build complex systems. It is always better if you have developers that know what they are doing.
Here's a question: suppose that you want to use WordPress as a starting point for a CRUD app with some basic permission controls, the ability to dynamically add content and maybe even write your own search logic which respects those permissions.
Example:
1. Upon opening your site, you'll be presented with a list of Foos
2. Each Foo will have a description, a configurable amount of maximum Bars, and a summary of how many Bar instances have already been added, as well a location on a map below the list (a pin, think Leaflet.js)
3. Upon logging in to the site, you'll be able to open each Foo and see all of the Bars under it
4. In this list you can click on a Bar to open its view, which shows all of the data added it: typical stuff like text, numbers, dates, times etc.
5. With the appropriate permissions, you can either edit the Foos/Bars that you have access to, or edit all of them as an admin. As a user, you can only view them.
(just an example that i made up, vaguely like a CRUD that i created in PHP with one of the regular web development frameworks)
How would you go about that? Are there any resources that you would recommend?
For example, if one were to use Slim, they'd look at their documentation: https://www.slimframework.com/docs/v3/ https://www.slimframework.com/docs/v3/
Similarly, Laravel has pretty decent documentation for developers: https://laravel.com/docs/8.x https://laravel.com/docs/8.x
Whereas with WordPress, i don't think that there is such an informative, guided resource for implementing things like that: https://wordpress.org/support/ https://wordpress.org/support/
A lot of it seems to focus on how to maintain installs of WordPress or how to work with its built in concepts (like pages/posts/etc.), but there's nothing along the lines: "Here's how you're supported to mess around with its internals in an idiomatic way and introduce custom views, validations, persist the data in the DB and add whatever you need to cover what constitutes a business process". Maybe i haven't dug inside of it enough.
Are you just supposed to hack things together with a custom theme or custom widgets, custom post types and storing most of the information into custom fields that are attached to the post? Why does the documentation have such a lack of PHP in it, then? Is there a separate set of developer docs somewhere?
Actually, i wonder if there's some super lightweight boilerplate theme, that attempts to do almost no styling and has very basic layouts, to be used as a boilerplace, e.g. what the likes of Skeleton are for CSS: http://getskeleton.com/ http://getskeleton.com/
- acomjean 5y agoI don't think you'd want to build a crud application in wordpress. Wordpress probably won't help you there much. You could probably turn it into a "plugin" but even then you'd be writing a lot of your own code. We're working on switching to wordpress for the volunteer organization I work at. Right now all the "information/kinda static" content is on wordpress with pages and posts. Its a win, anyone with permission can edit. Our custom application isn't there and has its own separate database and code. We're thinking of moving the whole thing into a sort of plugin, but we're very symphony based.. Which we like
- KronisLV 5y ago> Right now all the "information/kinda static" content is on wordpress with pages and posts. Its a win, anyone with permission can edit. Our custom application isn't there and has its own separate database and code. This is a nice approach - getting to leverage WordPress for the typical use case at which it is good, using something bespoke for the more advanced use cases. I've actually done something a bit similar in the past (the particular app i made used Lumen which is essentially stripped down Laravel, but the concept was close enough). It's just that many made WordPress seem like a pretty much universal tool and while i've seen some pretty advanced things be done with plugins, i personally didn't quite feel like it's well suited for certain tasks where you'd typically reach for a general purpose web framework instead.
- yurishimo 5y agohttps://developer.wordpress.org/ https://developer.wordpress.org/ has everything you're looking for. Is it as organized as Laravel's docs? No. Not even close. But most of the information is there. The PHP side of WordPress has been very stable for over 5 years at this point. All the new stuff is happening in JS unfortunately...
- KronisLV 5y agoThanks! This does indeed seem more like what i was looking for, couldn't for the life of me find it in their main navigation menu on the site.