Re: agx: Moving forward

Martin Aspeli <[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.devel
Message-ID <[email protected]>
Daniel Nouri <daniel.nouri@...> writes:

> I'm maybe being too picky.  You're right:  One class per module is
> common practise with AT projects, for better or worse.  With Genesis we
> shouldn't really have that 1:1 relationship anymore.  Genesis aims to be
> a general purpose code generator, and the one class per module is really
> only an AT convention, and it feels all javaish and clumsy to me.  But
> that's really details we shouldn't be getting into now.

It's nice if it's configurable, but it's hard to make any decent rules unless
it's an all-or-nothing approach. How is Gensis to decide where you want your
classes? Also, as classes get longer, having multiple in the same file makes it
difficult to find the one you're looking for, and makes it harder to grep only
in a specific context.


> Of course I should use docstrings.  But do the empty docstrings that
> ArchGenXML generates for me really help?  Because thank you ArchGenXML,
> I think I can type in the triple quotes my own when I need them!

I quite like that it leaves the blank ones there to make it patently obvious
that whoever didn't fill in the documentation in the UML or in the code really
ought to have done so. :)

Still, that kind of thing is very easily made configurable.


> > Well sure, but it's obviously a file that isn't finished. How can you 
> > judge a CASE tool by people leaving unfinished files around?
> 
> Well, empty files that lie around seem like "common practise" for the
> projects that I see.  It's really nasty for someone who tries to get
> into the project and contribute to see those empty files around.  So I
> say "Death to the ArchGenXML generated code in Genesis"!  Working around
> the ArchGenXML stuff in a project that aims to learn from its
> predecessor's mistakes is no fun.

Sorry, this doesn't really make sense. If people want to abuse a tool, we can't
very well stop them. How is AGX to know that your class is empty or unfinished?

As for using AGX to spec out Genesis, it seems a resonable way to get started.
Turn your argument around: if they discover the files it generates are difficult
to work with, they're more likely to fix that in the new code.

The bigger picture is that model-driven, properly documented code is a very good
idea. Simply hacking up some python here and there is likely to leave us with a
new mess to clean up. At least if there is a UML model that's up-to-date of the
internal software design, it's easier to understand and easier for people to
contribute.

Whether the whole genesis project will be done using AGX is a little doubtful,
since it's not really about content types, which is what AGX now predominantly
produces. But starting out with models seems like a worthwhile goal to me.


> > Last I heard, the "compromise" was to call it "AGX Codename Gensis",
> > which  I think achieves exactly the opposite of reducing confusion. :)
> 
> I think I agreed with Jens on the Snowsprint.  Anyone who wants to spend
> more cycles on this, please speak up now.

Sorry, agreed on what? A total rename or to keep the AGX moniker?

Martin






-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.