java / devjava-content

55 stars 16 forks source link

[Proposal] Class Loaders Api #98

Open mrk-andreev opened 4 months ago

mrk-andreev commented 4 months ago

Request Issue

No response

Website Section

Learn --> Tutorials --> Mastering the API

Proposal Details

I would like to share class loaders api details and examples of usage in open source projects like Apache Ignite.

Author References

https://mrkandreev.name/

danthe1st commented 4 months ago

Do you plan this article to be about writing custom ClassLoader subclasses or do you also plan to include existing classloaders in the JDK (i.e. URLClassLoader)? Do you only plan for this article to be only about the class loading functionality of ClassLoaders or also include information about resources? While I think examples would be useful, I don't know whether the maintainers like this site to be about other projects functionality (articles about Ignite or Felix should probably be in other places, I don't know how much you plan to talk about these things). Nevertheless, what do you think about adding a simple custom ClassLoader that e.g. loads classes from a custom directory (depending on whether or not that fits your other content here) so people see how to get started with implementing one as well what's possible with that API.

Disclaimer: I am just an outside contributor.

mrk-andreev commented 4 months ago

I would like to share a general introduction about ClassLoader and guide about custom class loaders. I think that this topic is one of underexplored in the Java community and new developers may not know important details because it is not in hype.

I would like to focus on the existing experience of creating custom class loaders. Ignite and Felix is a good point of view to class loaders problems:

After my post, users will understand how ignite and felix use class loaders but it is not a guide about these projects.