Just picking up on the point about legacy database column names and readable view names. Rather than map these in the controller, I think I would prefer an "alias" passed to SQLField in the model so that any mapping is done once.
On Oct 30, 1:19 pm, Timothy Farrell <[EMAIL PROTECTED]> wrote: > See my comments below... > > noobpythoncoder wrote: > > <snip /> > > > I Iike the tight MVC paradigm, security, and other good practices > > built into web2py, but sometimes I wish there was a way to more > > quickly prototype the front-end, eg test the functionality of SQLFORMS > > in different views from a user experience perspective, without > > worrying about this matching the controller side so much at that early > > development stage. > > This is precisely why there isn't "tight MVC" in web2py. It's loose > because of the "passing Python objects that make HTML" thing. Even the > idea of HTML-helpers is not MVC friendly. This builds the argument for > using XML-based templates (such as Genshi/Kid/ZPT/SimpleTAL). One of > the ideas is that you should be able to view these templates in a normal > HTML editor/browser and get a good feel for what they look like. That > would be a truly independent View. While Genshi doesn't adhere to this > completely (it uses <xi:include ... />), I can still open my templates > in a browser and get a general idea of what I'm looking at (compare with > any text-based template language viewed in a browser). Unless you have > really good editing/viewing software that can parse templates (I haven't > seen it), then you're on to Yarko's idea about a minimal application to > render your templates for viewing/testing.> If anyone knows a way of doing > this that I have overlooked, and doesnt > > involve simply copy n pasting html forms, please write. But if this is > > a bad idea in web2py - even at prototyping phase - please offer a > > constructive alternative. > > This may be obvious to others but it wasn't to me at first (since I > didn't start out working on a team). I work with more old databases > than new ones so the fieldnames are often cryptic and don't describe the > data they contain. Whenever making a template, it's bad to pass in the > resulting object directly from a query because you end up referencing > database fields with cryptic names and it makes your templates less > readable and less reusable. Instead, define a clear interface for your > templates with human-readable names for the fields and use the > controller to map the database results to what the template requires.> Though > my teams first web2py app is nearly fully prototyped, with > > about a third of the backend done, I would like to hear how others are > > rapidly prototyping in web2py while retaining a good balance at > > allowing for the development of the backend controllers etc as their > > apps near production standard. > > > Perhaps if it were possible in web2py to switch between a security > > lenient development phase and secure production phase, a quicker front > > end development may be possible? Ok, this is probably a stupid idea, > > but I was thinking back to my php.ini days. ;-) > > How about a trunk and branches/tags in subversion? That's what I do. > Wait are you talking about for your projects or web2py? > > <snip /> > > tfarrell.vcf > < 1KViewDownload --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---