1

I questionning myself : is it better to use Paster for creating content types, browser view, portlet, etc... or ArchGenXML ?

Which one of those two create the better source code ?

Is there an advantage of using one or the other ?

Thanks.

Jihaisse
  • 977
  • 5
  • 24

2 Answers2

4

They're two quite different things.

Paster creates an initial skeleton. Once it's done, you're on your own.

ArchGenXML needs a UML model first, and then it can create quite complex systems of code. As long as you modify your code only within prescribed regions of the .py file, you can change your model and rerun ArchGenXML as often as you wish.

Either one only generates code as good as its authors have provided, and while I use ArchGenXML extensively, I see a fair bit of deprecated code generated. otoh, I've never seen it generate completely invalid code.

I use ArchGenXML because I like having my original source in UML

Auspex
  • 2,175
  • 15
  • 35
  • 2
    You can add some content even after creating the skeleton with paster, see the addcontent command. like "paster addcontent portlet" – Jihaisse Mar 01 '12 at 15:29
  • Certainly, but each use of paster creates a number of files, and then it's done. Anything you've already generated with paster is done. That's not a bad thing, it's just a matter of what you want it for. – Auspex Mar 02 '12 at 23:58
1

Just to give you another point of view:

I think that ArchGenXML is a tool for someone that doesn't really want to get his/her hands dirty for as long as possible a tool that let you take a little more time planning and a little less time coding (I see this as a negative point) . Paster on the contrary is just a comfort to speed up some work, and you will get your hands dirty very soon.

I started coding in Plone using paster, then after a while when I felt secure, I abandoned it (like the babywalker :D ). And then you learn to run, and after some time you get old and lazy and you realize that, after all, paster is still your friend. ArchGenXML, on the other hand, I think that's an obstruction for your learning.

Plus, if you use paster and in the end of the project your code sucks you can blame just yourself (I see this as a good point).

These are just my 2¢.

Giacomo Spettoli
  • 4,476
  • 1
  • 16
  • 24
  • That's insulting and just plain wrong. Paster doesn't even hold your hand - it just generates some skeletons you could almost as easily rip off from some other project. It doesn't make the slightest difference whether you use one or both (I've done that on a project, too), if your code sucks it's your fault. In either case, you _will_ get your hands dirty quickly. Neither one generates much of the code you will need to make any kind of unique product. They generate the boilerplate that nobody should ever need to write themselves. – Auspex Mar 03 '12 at 00:02
  • 1
    First, the real insult is to claim that something that has been clearly stated as "personal opinion" could be wrong. Second, I can't really see anything offensive in my answer expecially nothing offensive to you. And third if you really think that my answer is offensive I encourage you to flag it as inappropriate and we'll see how it goes. Anyway for what it’s worth, my answer was supposed to be semi-serious. For what concern the matter of the discussion, I still respect your personal opinion – Giacomo Spettoli Mar 03 '12 at 02:25
  • You don't think "a tool for someone that doesn't really want to get his/her hands dirty" and "an obstruction to your learning" is insulting? Please, a little respect. It hadn't even occurred to me that I could flag the answer as inappropriate. – Auspex Mar 03 '12 at 16:45
  • I can rephrase the first sentence in a more diplomatic way: "a tool that let you take a little more time planning and a little less time coding (I see this as a negative point)". The second phrase is just my opinion about the tool and I can't rephrase it. Really, Derek, I did not want to offend anybody. You do have my respect as a fellow plonista :) – Giacomo Spettoli Mar 03 '12 at 17:15
  • I didn't expect that just a little question like this could make such words. I just wanted a personnal opinion. I used a lot AGX and I'm new with paster, I just wanted to know if one is better than the other. And, oh, BTW, is AGX still maintained ? – Jihaisse Mar 05 '12 at 08:03