Hi,
My dilemma is how should I write my module to be "next-gen" ?
Not from a code point of view but from a design/layout point of view.
We wrote our modules for 2.6.x like every beginner would have done:
write everything in init.pp.
But now, the fashion is to use parameterized classes and Hiera which we
will use with puppet 2.7.x.
I mainly followed/watched what Example42 was doing. They were using
$classname::{install|remove|disable|blah} to actually call an action in
their old modules. It was almost a sub class ($subclass.pp) per action.
It was easy to read and possibly to maintain.
But now Alessandro from Example42 seems to put everything back in
init.pp with his nextgen modules...
I like the idea of segregating types or action per files to avoid
mistakes during edits but at the same time I am wondering why this
change for example42, is it a limitation for parameterized classes ?
Like everybody, I'd like to write my module using the best and most
flexible way so it will be easy to modify and to maintain. I don't like
to redo my modules from scratch each time :)
So, any inputs/insights are welcome. What direction should I/we take ?
I really believe that puppetlabs or a set of gurus should set these
guidelines so everybody would develop the same way. At the moment, it's
like "there is more than one way to do it" (perl) but a lot of people
are after a "this is the best way to do it", to not be confused with
"there is only way to do it" :)
Note: I like the puppet style guide but it only talks about syntax not
how to design module the best way.
-Thomas
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.