Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^2: Modules design pattern: abstraction vs incarnation (providing not so static data)by Discipulus (Canon) |
on Nov 20, 2020 at 16:04 UTC ( [id://11123909]=note: print w/replies, xml ) | Need Help?? |
hello haj and thanks for looking at my long post, did you also followed links I provided? Forget for the moment my Game::Term project and focus on the Perl::Teacher one. In Perl Automateaching -- part 1: brainstorming I presented the idea and I asked for suggestions on the implementation (how to judge perl documents) while in automateaching -- part 2: proof of concept I sketched out some viable approach to accomplish my task. In my mind Perl::Teacher and all its classes are the teaching framework and must be written by me. This is what I named abstraction in this post. No one line of code has stil been wrote for the Perl::Teacher module, so I have really took no techincal decisions at the moment, only the decision to process perl documents using PPI (ie: no code given into STDIN). By other hand all lessons contained in courses can be written as separated modules by anyone. This is what I named incarnation in this post. So in the future peraphs haj will publish on CPAN Perl::Teacher::Course::EN::PerlIntro and this will contain Perl::Teacher::Course::EN::PerlIntro::01_safetynet and Perl::Teacher::Course::EN::PerlIntro::02_strictures and so on. I hope the above satisfies your Are users supposed to write their own modules? question. I presented my doubts about how to design this Perl::Teacher class and its interface in Module design for loadable external modules containing data and shown a brief example in Re^2: Module design for loadable external modules containing data That said you are right to challange my point of view, and you are right when saying that objects are the incarnations all correct but does not change the point, or at list my point of view. > Also, you seem to use scripts to store particular objects. Here I dont follow you: where this sentence comes from? If from my post I must have wrote something in the very wrong way. About OO frameworks: > You might fare better if you decide to embrace them as soon as they help to solve your problem. I am pretty sure that almost no one needs to use all the features of Perl itself, yet many of us are Perl fans, and quite happy with it. Well.. you turned the example in a nice way :) and yes, erase the all word from my sentence and will be the same of your. I will embrace them with happines when they help me in some way. Read above posts: I dont see any gain using roles. I hope the above clarify your doubts, hoping now you can clarify mines :)
L*
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
In Section
Meditations
|
|