Re: Mantissa Wiki Tutorial

Robert Gravina <[email protected]> Wed, 20 Feb 2008 10:14:43 +0900
Newsgroups gmane.comp.python.quotient.dev
Message-ID <[email protected]>
On Feb 19, 2008, at 10:49 PM, [email protected] wrote:

> I'm sorry for that curve, but when you need to throw together a  
> mountain quickly, sometimes the result is kind of rocky :).

True, but one of the greatest things I've appreciated about Divmod  
frameworks is that they don't get in way, and have a consistent,  
logical API. Look at some of the other ORM's and OO databases - they  
need books of documentation, and/or a pain when you start to use them  
(I'm looking at you, SQLAlchemy and ZODB! :)). With Axiom, I can get  
by with the small amount of documentation on the web site and a few  
short examples. The lack of docs hasn't been a problem in using Axiom  
at all, and that speaks volumes (ahem, excuse the pun) about the API  
design.

I think we all would just like Mantissa to be the same pleasant  
experience. And I'm sure it's either there or almost there, it's just  
a more complex beast (it is an application server, after all) and  
I've only just started to work with it so can't constructively  
comment there... Just please don't make it like Plone, please!

> This use-case (throwing together an app with a simple "front page"  
> and without much in the way of /private et. al. is something we  
> will be specifically addressing. [...snip...]
> In other words, much of the incidental complexity, which I would  
> guess is causing the lion's share of your pain here, will be  
> removed, but the inherent complexity of doing what Mantissa does  
> will remain.   I don't know enough about your experiences to say  
> which one is really the larger factor though.

Maybe if I share my use-case, it might help?

I work for a small web-design agency. Clients usually want to  
maintain their own site content, so we create administration forms  
for them so they can do that. Sometimes the content is simple (e.g. a  
FAQ entry) and sometimes more complex (e.g. Information about a radio  
show, some header graphics, mp3 files etc.). Most of the time, that's  
the only login-required use of the site. From here, content is  
generated from this data, and everyone's happy.

There may be a few simple forms around the site that users can  
interact with - subscribing to a newsletter, contacting the site  
owners - but usually nothing too complex.

If you like you can check out some examples:

This site here was done in Drupal - a news site. I didn't create this  
one, so not sure how much is done through the admin section of the  
site, and what Drupal provides etc.
http://www.newmatilda.com/

This one, for a radio station, I created in Plone. Radio presenters  
login and maintain their radio show page, and a few admin users log  
in to maintain other content like the events you see on the home page.
http://www.2ser.com/

These sites have more functionality than I mentioned above, mainly  
because the systems provide a lot of that. I realise Nevow or  
Mantissa is not a content management system - but really, we don't  
all of that most of the time. All we really need is:

1) A way to generate page content from data in a database
Nevow templates and Axiom are great for this:

2) Login, user accounts, and forms for clients to maintain their content
One of the Nevow form libraries provides most of what we need. I  
should be able to create nice custom admin sections based on this.  
Most sites will probably need to list content, with options to add/ 
edit/delete items - so that could be maybe reused between sites.  
Doesn't need to be as complex as a full-blown CMS, just enough to  
take some of the tedious work out of creating CRUD UIs. The only part  
I think I need Mantissa for is login/user accounts.

All other functionality you see in those two example sites above  
could probably be done in Nevow fine. I'd rather develop some  
reusable blog, poll etc. components and use those in Nevow than spend  
that time fighting with these huge content management systems when I  
want to do something simple.

If Mantissa could allow me to do those two things, without providing  
too much extra baggage, that would suit the data-driven web site use- 
case very well, I think.

> We might still have a boilerplate generation tool at the end of  
> this phase, but the current one was really a misguided attempt to  
> learn something from Rails.  The lesson from Rails is really: have  
> less boilerplate so you don't need a pile of tools to generate all  
> the boilerplate for you ;).

Actually earlier when I thought Wiki tutorial was broken - the  
problem was with axiomatic project, and I didn't pay attention to JPs  
comment at the top of the tutorial about that, sorry!

> Quite possibly.  It sounds like you are in a grey area, where you  
> may or may not find Mantissa useful once we've documented it and  
> cleaned it up. It might be worth dealing with a slight impedance  
> mismatch to get all the features that Mantissa offers (navigation,  
> access control, a deployment environment where you can launch  
> multiple applications simultaneously, etc) but it might still just  
> be more hassle than it's worth.

That's what I'm trying to figure out at the moment.

I'm about to embark on a small site now to try out Nevow or Mantissa.  
We currently have a Flash-only site for the agency, here:
http://www.digitaleskimo.net/

I'm going to create a web version of that, basically (although with a  
different design - I've attached a draft it to this email, because it  
helps in understanding). Initially it will be used as a fallback site  
in case the user doesn't have Flash installed, but it will replace  
the Flash site eventually. So staff will want to be able to login to  
maintain simple page content, portfolio (e.g. site name, URL,  
description, screenshot, thumbnail etc.), specify which portfolio  
entries should appear on the home page etc.

I suppose if it wasn't for the login functionality, Nevow and Axiom  
would do the trick. But seeing as I'd like to have user accounts and  
login, Mantissa is needed?

Actually I spoke with the others, and they are fine with open  
sourcing this as like a large tutorial/example for Nevow or Mantissa.  
I fully expect my code to not be tutorial worthy on first attempt,  
but I'd be happy to write something up and refine it as I go as this  
helps me as much as it helps others. Are you Divmod guys interested?

> Developers will still have to decide for themselves, but my hope is  
> that Mantissa will soon provide a pleasant enough experience that  
> it will be the default choice, unless your application is somewhat  
> specialized (no database, need to integrate with an existing  
> database, no user accounts at all, an incompatible model of access  
> control, URL compatibility with an existing site that has  
> incompatible "controller" semantics, etc).


OK so given I want to create that site I just outlined. Should I:

1) Start with Nevow and Axiom, ignoring the admin section for the  
time being
2) Start with Mantissa 0.6.18
3) Start with the development version of Mantissa, that has the new,  
improved API?

Cheers,

Robert
de.jpg (image/jpeg, 14 KB) - not displayed