Support

Home Forums Event Espresso Premium Where did the EE4 documentation for developers go?

Where did the EE4 documentation for developers go?

Posted: August 17, 2018 at 7:06 pm

Viewing 9 reply threads


sara.bosman

August 17, 2018 at 7:06 pm

Until about half a year or so ago, there used to be a good documentation for developers, with e.g. a searchable object browser and some decent examples. This has all gone. Where did it go? Today there is of course http://developer.eventespresso.com/, but frankly, it sucks big time, even for a blog (no categories, no search…). And then there is the Github repo, which is not much more than an annotated code repo. Try finding an action hook or a specific function – good luck with that. I’m glad I finished most coding when the documentation was still online, so I know my way around a little. If I had to start today, I’d probably choose another framework, due to lack of documentation.
Any ideas or comments on that? Am I missing something?


Josh

  • Support Staff

August 17, 2018 at 8:07 pm

Hi,

I’m not aware of any documentation being taken down. The developer documentation resides here.

If you have any further feedback about the dev team’s documentation efforts, feel free to open an issue on GitHub. The developers welcome any ideas for improvement.


sara.bosman

August 18, 2018 at 3:55 am

I remember where it was: code.eventespresso.com
See https://web.archive.org/web/20160111044236/http://code.eventespresso.com/ for a snapshot


Josh

  • Support Staff

August 20, 2018 at 1:43 pm

You can access the same information that was there, with the added bonus of the information being up-to-date, by opening up the Event Espresso plugin in an IDE. One of the troubles with the code.eventespresso.com site was the information was out of date and was time consuming to keep up-to-date with newer versions of Event Espresso.

For example, the old auto-generate code site had this for the EE_Gateway class:

http://code.eventespresso.com/class-EE_Gateway.html

which had a list of methods & properties.

The same information is in the class file found here, or open the EE_Gateway.lib.php file in your IDE:

https://github.com/eventespresso/event-espresso-core/blob/master/core/libraries/payment_methods/EE_Gateway.lib.php

You’ll note the current version has new methods that weren’t listed in the code.eventespresso.com site as its information was out of date.


sara.bosman

August 21, 2018 at 5:50 pm

I’m puzzled; how can an auto-generated site be out of date?
Apart from that, what you’re actually saying is: we simply don’t provide any documentation anymore, just browse the code yourself. The code site was far from ideal, but at least it was searchable, didn’t require me to browse through hundreds of lines of code in search of a usable function, and showed some useful info like inherited methods and properties. And already then I expected a lot more from your documentation: a decent table of contents, introduction, class diagrams, code examples, tips, hooks listings etc… Put a trainee on the job, it can’t be that difficult, can it? I mean, really, browsing through code is considered plan Z and a last resort for developers.
To be honest: as it is today, I wouldn’t choose EE again, if only out of sheer protest against all the great libraries that are written without proper documentation.


Josh

  • Support Staff

August 21, 2018 at 8:18 pm

Thank you for leaving this interesting feedback. I’ll try to elaborate a bit further because I did mention earlier that documentation is provided but maybe I can do a better job explaining this.

First though, since you asked:

how can an auto-generated site be out of date?

It’s autogenerated from whatever the version of the plugin was given to the PHP doc generator at the time. Each time there was a new version, someone would need to manually update the PHPdocgenerator site & rebuild it to include the new version of EE. So it was autogenerated, but not wired up to a code repository or anything like that. So it was usually out of date.

Along with that, we found from chatting with developers that they said they preferred searching the code base with their IDE or even on Github over the code.eventespresso.com site. So that was one of the reasons they took that site down. The other was the amount of work/time it took to keep the site up to date (sometimes there are 3 or more updates a month) so the site generator would have to be manually updated each time to stay up to date.

didn’t require me to browse through hundreds of lines of code in search of a usable function, and showed some useful info like inherited methods and properties

If you use an IDE like PHPstorm or even SublimeText3, you’re probably familiar with their excellent search tools, and how you can click on methods in the code and it will show links to method definitions and class properties.

And already then I expected a lot more from your documentation: a decent table of contents, introduction, class diagrams, code examples, tips, hooks listings etc

This comment makes me wonder if you’ve actually looked at the documentation, because the documentation does indeed have a table of contents. You’ll find it here:

https://github.com/eventespresso/event-espresso-core/tree/master/docs#table-of-contents
If the TOC is lacking in any way please let us know what we can do to bring it to a decent standard.

Each topic has an introduction. For example, the Messages system documentation has an overview:
https://github.com/eventespresso/event-espresso-core/blob/master/docs/E–Messages-System/messages-system-overview.md#messages-system-overview

Another example, of the model class diagram
https://github.com/eventespresso/event-espresso-core/blob/master/docs/G–Model-System/model-querying.md#what-models-exist

The documentation also has code examples, tips, and a hook reference. A few examples include a variety listed here:
https://github.com/eventespresso/event-espresso-core/tree/master/docs/T–Tutorials
and here:
https://github.com/eventespresso/event-espresso-core/blob/master/docs/D–Addon-API/using-new-payment-method-addon-skeleton.md
and here:
https://github.com/eventespresso/event-espresso-core/blob/master/docs/E–Messages-System/registering-message-template-packs.md#step-three-register-your-new-template-pack
and that hook reference:
https://github.com/eventespresso/event-espresso-core/blob/master/docs/A–Best-Practices/ee-actions-and-filters.md

and really, most articles in the documentation are packed with code examples and tips.

The documentation is far from a complete start-to-end guide but the dev team does make an effort to keep the documentation articles up-to-date and when they add a new component that needs documentation, that gets done.

If you have some constructive feedback about the documentation that’s been provided we’d love to hear it.


sara.bosman

August 22, 2018 at 3:19 am

Thanks for your elaborated answer.
I am fully aware of all the references you mention, so let me give you a concrete example. Say I need to generate a sequential invoice number (a very common problem), and conclude that the best moment is right after paying for an event. The steps:

1. Following the info on https://github.com/eventespresso/event-espresso-core/blob/master/docs/A–Best-Practices/ee-actions-and-filters.md, I conclude I need an action hook.
2. The (very limited) overview on https://github.com/eventespresso/event-espresso-core/tree/master/docs/I–Filter-and-Action-Hooks-in-EE doesn’t help me any further, so I do a search in my IDE for ‘AHEE__’. This gives me too many hits (635).
4. I suspect the hook might have the word ‘registration’ in it, so I do another (regex) search for ‘AHEE__\w*registration’. This gives me only 62 hits
5. The hook AHEE__EE_Registration_Processor__trigger_registration_update_notifications looks promising. As there is no documentation, I try to find the do_action, having no other option than doing another search and/or opening several files. I find it in EE_Registration_Processor.class.php. There I find the function trigger_registration_update_notifications() having two parameters: $registration and the mystical $additional_details.
6. To find out what parameters $registration has, I do a random var_dump, as it is not documented. I implement the hook, and lo behold, I have an invoice number that automatically increments.
7 Alas, the hook also seems to be called each time I update the registration, e.g. by adding a transaction. I suspect I need $additional_details. Finding out what it is, is a little more tricky (again, it is undocumented), but after some more file opening and searching, I’m lucky enough to stumble upon ‘array(‘manually_updated’ => true)’. This finally solves my issue.

Would you say that is the normal line of working with a third party library? From the fact that people prefer browsing code through their IDE, I would conclude that the current documentation is inadequate, not that it is unnecessary. In my case, I think a decent documentation of the action hook and when it is invoked and its parameters (and I mean more than “Oh, that’s an array”) and the EE_Registration class with some examples would have saved me a lot of time.


Darren Ethier

August 22, 2018 at 5:58 am

Hi Sara,

Thanks for raising your concerns about developer documentation. I also appreciate a concrete example of where it is currently lacking.

As Josh pointed out there were a number of reasons to abandon the auto-generated code.eventespresso.com site. The concrete example you gave would not really have been helped any better by that site because it is merely auto-generated from phpdoc blocks (which your IDE search would have come across anyways). IDE’s (such as phpstorm and sublime) also do a really good job of hot-linking methods/classes etc so that serves the same benefit as code.eventespresso.com did too.

I’d like to take a moment to address this question

> Would you say that is the normal line of working with a third party library?

I think “normal” is always a bit relative. Things like size of the library, number of developers working on it, the complexity of the library, whether the developers even care etc. all contribute to the amount (and usability) of documentation that library has. So in my experience its been hit and miss in the libraries/frameworks/plugins I’ve worked with. I do agree with you that when I encounter a library that has useful and complete documentation it’s refreshing and sometimes (not always) saves time over doing a process similar to what you described.

What I think is important for me to be clear on, is that our team DOES take seriously developer documentation (some insight into that can be found here: http://developer.eventespresso.com/changes-with-developer-documentation/). So we take pains as developers on the team to try and keep that documentation up to date with new features and systems (for instance, take a look at the documentation we’ve been working on in our Gutenberg branch.

Generally speaking though, we do not cover everything (things like hooks etc that you’ve pointed out). The reason for this is quite simple, time. Being a small team, we have to make choices about things we spend our time on and so we’ve decided that we will focus more on documenting overall systems and major bits of code, other code that we perceive might be self-explanatory in the code itself we leave as is for now. We don’t always get those decisions right but this allows us time to work on the bugs/features etc that affect our codebase. So its the age old, “We document, but not as much as we like”.

Another important thing is that we pay attention to people who write helpful feedback on where the documentation is lacking and what they had trouble figuring out. If we see a pattern in questions or requests from developers show up as issues in github (or elsewhere) that reveal a deficiency in documentation, we’ll try to address that by improving/writing additional documentation. That’s why Josh was reaching for a concrete example from you in this thread so we could consider that in future documentation updates.

Hope that helps!


sara.bosman

August 23, 2018 at 3:11 am

Thanks for the concern and time. Still it saddens me that so much great software is being developed without proper documentation (Google is another example – great tools, crappy documentation). To cut the discussion short, what would help me most (ordered by importance, high to low):

1/ list of all EE_ classes in db_classes, especially with a brief description of each db field (which I now have to inspect with PhpMyAdmin or var_dump’s) and inherited methods/properties (which are harder to find), and if possible its own methods/properties
2/ list of all action hooks and filters, at least with one or two lines on when it is invoked, and which parameters I can use (could even be a simple table)
3/ documentation on EE4 Model querying exists, but still lacks information and examples; under time pressure I often end up manually building SQL queries (I know, using the EE4 Model querying would be better for forward compatibility, but its syntax is still somewhat obscure to me in many cases)

That would be great.


Josh

  • Support Staff

August 23, 2018 at 5:37 am

Thanks for the feedback!

Viewing 9 reply threads

The support post ‘Where did the EE4 documentation for developers go?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso