wdsrocha/dojo

Use proper pattern naming instead of "adapters"

Closed this issue · 4 comments

Initially, I thought that the project pattern to handle multiple online judges was the adapter pattern, but @RodrigoCMoraes noticed that each online judge "adapter" have to deal with a lot of stuff, like login, handling scraping errors, etc. It's not just an adapter.

At the same time, I don't know which pattern it should be... just factory maybe? Tbh it shouldn't really matter that much, but I would like to avoid the confusion for future contributors.

My current references:

Given that, what are your plans or strategies to solve this issue? Maybe sharing your reference for this Adapter Pattern at your chosen framework would make help in discussion.

Given that, what are your plans or strategies to solve this issue?

Not sure, I just wanted to store/share the information here on GH for now. But I see that it would be more valuable if I had planned something, will keep that in mind to update here later on and for future tasks.

Maybe sharing your reference for this Adapter Pattern at your chosen framework would make help in discussion.

Sure, just updated the description.

I renamed the adapters to clients. What do you think, @RodrigoCMoraes ? For example, the class UriClient uses the URI Online Judge's Webpage as its server, so I believe that it makes sense. And even though some demanding work is made at the client-side, that would just make it a fat client.

LGTM