Re: [web2py] Re: Question about web2py roadmap.

2015-02-11 Thread Julio F. Schwarzbeck
I beg to disagree, or perhaps I did not clarify in my original posting. Down in this thread, I believe you mention that (re)used helpers (could) go in modules, which I agree by the way, what I meant to say is that in a potentially complex application, where many common components are usually re

Re: [web2py] Re: Question about web2py roadmap.

2015-02-11 Thread Julio F. Schwarzbeck
I beg to disagree, or perhaps I did not clarify in my original posting. Down in this thread, I believe someone mentions that (re)used helpers (could) go in modules, which I agree by the way, what I meant to say is that in a potentially complex application, where many common components are usual

Re: [web2py] Re: Question about web2py roadmap.

2015-02-10 Thread Anthony
> I disagree that all queries belong in models. A complex query that needs > to be re-used in multiple places should go somewhere centralized (not > necessarily a model file, but perhaps a module). However, not all queries > need to be re-used. Furthermore, some queries are so simple, there i

Re: [web2py] Re: Question about web2py roadmap.

2015-02-10 Thread Richard Vézina
Carlos, You bring good points to consider and Anthony brings some perspective too. I don't think there is a single answer here, but I think that web2py allows someone to do what is right to do depending of the context... The fact that the book may be misleading if you applied simply it examples ca

Re: [web2py] Re: Question about web2py roadmap.

2015-02-10 Thread Carlos Cesar Caballero Díaz
I disagree that all queries belong in models. A complex query that needs to be re-used in multiple places should go somewhere centralized (not necessarily a model file, but perhaps a module). However, not all queries need to be re-used. Furthermore, some queries are so simple, there is no poi

Re: Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread Anthony
> > Take a webservice as an example, doesn't have a form to present. Does > the model need it? > > > >Just because one consumer of a model doesn't require a particular > attribute does not mean that attribute doesn't belong to the model. The > webservice might not need the model's validators

Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread Massimo Di Pierro
In any framework I know of helpers are developed using the language of the framework (here for example about Django http://stackoverflow.com/questions/1912351/django-where-to-put-helper-functions) In web2py I would put them in a module and import them where necessary. In web2py you can also us

Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread Vinicius Assef
On Sun, 08 Feb 2015 01:51:15 -0300 Massimo Di Pierro wrote > ... > Now the fact that one can use them in controllers does not mean one should > do that. You're right, but sometimes we need to generate HTML from controllers. I.e, when we use SQLFORM.grid() with custom links for e

Re: Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread Vinicius Assef
On Mon, 09 Feb 2015 09:40:42 -0300 Anthony wrote > >By definition, the model doesn't need the label to anything. >I'm not sure there is a canonical definition to which we can appeal. > > Take a webservice as an example, doesn't have a form to present. Does the > model need it? > >J

Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread Anthony
On Monday, February 9, 2015 at 10:49:10 AM UTC-5, Carlos Cesar Caballero Díaz wrote: > > > Can you point to an example of a query in the book that you think should > instead have been shown in a model? > > > All of them, or at least mention that queries should go in controllers, > even a si

Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread António Ramos
Documentation is important not only to find info but also to catch newcomers eyes. I hate to navigate on the online book and loose the index. i have to SCROOLL to the top countless times.So easy to fix right ? The documentation is very good but not very easy to deal with. I think web2py needs

Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread Richard Vézina
So, documentation should be improve!! Alone dev practices Team dev pratices Examples What should go where Richard On Mon, Feb 9, 2015 at 10:43 AM, Carlos Cesar Caballero Díaz < desarro...@spicm.cfg.sld.cu> wrote: > > Can you point to an example of a query in the book that you think should >

Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread Carlos Cesar Caballero Díaz
Can you point to an example of a query in the book that you think should instead have been shown in a model? All of them, or at least mention that queries should go in controllers, even a simple query, will represent a problem, if we need to change it and is used many times, new users, that

Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread Richard Vézina
I don't think "God" class is a big concern in web2py... End user don't really need to write class... Sure you can, but since page is tide to a function and you have controllers files that you can use as an class like container to regroup your stuff. Sure I could write class, but considering work an

Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread Carlos Cesar Caballero Díaz
What about some kind of views code generator for "advanced" developers or teams?, all the form generation is implemented, so, should be relatively easy write something like that, that generate an html form from the model (or controller) to a view. Cheers. El 08/02/15 a las 17:38, p...@cancamu

Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread Anthony
On Monday, February 9, 2015 at 8:55:47 AM UTC-5, Carlos Cesar Caballero Díaz wrote: > > > > Does the book actually specifically recommend that all queries go in > > controllers? If so, can you point that out, as it should be changed. > > > > No, but in all examples, queries are in controllers,

Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread Carlos Cesar Caballero Díaz
Does the book actually specifically recommend that all queries go in controllers? If so, can you point that out, as it should be changed. No, but in all examples, queries are in controllers, sufficient for a reader to infer that. Anyway, nothing about web2py requires you to put queries i

Re: [web2py] Re: Question about web2py roadmap.

2015-02-09 Thread Anthony
> By definition, the model doesn't need the label to anything. I'm not sure there is a canonical definition to which we can appeal. > Take a webservice as an example, doesn't have a form to present. Does the > model need it? > Just because one consumer of a model doesn't require a particu

Re: [web2py] Re: Question about web2py roadmap.

2015-02-08 Thread pang
On Sunday, February 8, 2015 at 5:51:15 AM UTC+1, Massimo Di Pierro wrote: > > Now the fact that one can use them in controllers does not mean one should > do that. > But the FORM helper is extensively used in the controllers in the web2py manual. And complex forms usually contain tables, or may

Re: [web2py] Re: Question about web2py roadmap.

2015-02-08 Thread Vinicius Assef
Actually, the labels are part of the visualization layer. HTML widgets and CSS classes, as well. By definition, the model doesn't need the label to anything. Take a webservice as an example, doesn't have a form to present. Does the model need it? So, we conclude the label (and other artfacts) d

Re: [web2py] Re: Question about web2py roadmap.

2015-02-07 Thread Massimo Di Pierro
I am sorry people read example like this and do not understand it. All web frameworks have helpers (Rails does, Django does, etc.) and helpers are to be used in views. Web2py helpers are quite useful because they provide a complete extensible set (other frameworks do not do that) and they can be

Re: [web2py] Re: Question about web2py roadmap.

2015-02-07 Thread Anthony
> I personally do not use html helpers *at all*, but I can see why for some > folks it can be a time saver. > I lean towards sticking with HTML, but there are cases where the helpers are useful -- see http://stackoverflow.com/questions/8091487/what-are-the-benefits-of-building-html-markup-wit

Re: [web2py] Re: Question about web2py roadmap.

2015-02-07 Thread Julio F. Schwarzbeck
Anthony, your last paragraph is quite interesting. I work for a large corporation, which for good or bad, has back-end web programmers, but also simple html designers. The concept of embedding HTML helpers A(), FORM() in controllers, or modules is frowned upon and it was one of the main reasons

[web2py] Re: Question about web2py roadmap.

2015-02-06 Thread Anthony
> You asked, "Can you share examples...?". > > Here are links to a couple of app pages i remember finding difficult to > achieve using *my *level of understanding of standard web2py techniques, > for the version available at development time. To be sure web2py has > improved since then. > >

[web2py] Re: Question about web2py roadmap.

2015-02-06 Thread Anthony
Just use pure HTML as usual and (a) make sure the "name" attributes of form fields correspond to the names of your database table fields, and (b) at the end of the form, include the following: {{=form.custom.end}} in place of: form.custom.end includes the two hidden fields used by web2py for

[web2py] Re: Question about web2py roadmap.

2015-02-06 Thread Dan Feeney
Hi Joe, When I needed to create a custom form, I followed this: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Custom-forms I still used the widgets serialized by the web2py model code and only modified the layout. However, it looks like they have some helpful goodies in th

[web2py] Re: Question about web2py roadmap.

2015-02-06 Thread JoeCodeswell
Dear Anthony, You said, "And if you need a completely customized form, you can do so by writing a formstyle function, using form.custom, or with hand-coded HTML. With the latter two options, if you need to re-use the form code, you can put it in a template and "include" it where needed." Thank

[web2py] Re: Question about web2py roadmap.

2015-02-06 Thread JoeCodeswell
Dear Anthony, Thanks for *ALL your service* to web2py and your replies to this discussion. First, let me state emphatically,* I am a grateful user & supporter of web2py*. My questions and comments are my effort to improve it *for my Workflow, *which is, as i indicated before, *View* (as in M*V

Re: [web2py] Re: Question about web2py roadmap.

2015-02-06 Thread Richard Vézina
As a single dev for a relative big app, I tend to put as much stuff as possible in controller because I read and code there all the time, so it is much easier to debug trouble shoot, etc. I often had to look very long cause a malfunction due to a refactoring because the offending code forgotten in

Re: [web2py] Re: Question about web2py roadmap.

2015-02-06 Thread Anthony
> In the very first web2py code example in the manual, in the image blog > example, we find this code in the controller: > > def index(): > images = db().select(db.image.ALL, orderby=db.image.title) > return dict(images=images) > > Accessing from controller to the dal, in a simple query

Re: [web2py] Re: Question about web2py roadmap.

2015-02-06 Thread Carlos Cesar Caballero Díaz
I know that web2py is very flexible, that's why I'm here and i'm working with web2py since almost 4 years, but this is my point, with two examples: In the very first web2py code example in the manual, in the image blog example, we find this code in the controller: def index(): images = db

[web2py] Re: Question about web2py roadmap.

2015-02-05 Thread Anthony
> >1. *I* find customization difficult: > 1. adding buttons > 2. specifying custom validation > 3. specifying custom widgets > > Can you share examples of what you were trying to achieve and what you tried? Anthony -- Resources: - http://web2py.com - http://web2py.co

Re: [web2py] Re: Question about web2py roadmap.

2015-02-05 Thread Anthony
> > > >I find customization difficult: > >adding buttons > > As you have python in views, you can manipulate server side DOM in your > view, i.e add/remove class names, create id for elements, etc. Or you can > make it through javascript. It's up to you. > > I know it's not the best way, bu

Re: [web2py] Re: Question about web2py roadmap.

2015-02-05 Thread Vinicius Assef
An inline answer. On Wed, 04 Feb 2015 14:11:51 -0300 JoeCodeswell wrote >... > >I find customization difficult: >adding buttons As you have python in views, you can manipulate server side DOM in your view, i.e add/remove class names, create id for elements, etc. Or you can make it t

[web2py] Re: Question about web2py roadmap.

2015-02-05 Thread Anthony
On Thursday, February 5, 2015 at 12:35:35 PM UTC-5, Leonel Câmara wrote: > > It also depends on how you choose to look at it. From my point of view the > message for a label for a field *is* part of the model. The only > difference is that you aren't putting it in a database (which you certainly

[web2py] Re: Question about web2py roadmap.

2015-02-05 Thread Leonel Câmara
It also depends on how you choose to look at it. From my point of view the message for a label for a field *is* part of the model. The only difference is that you aren't putting it in a database (which you certainly could). The view should only be concerned with how to display the label not with

Re: [web2py] Re: Question about web2py roadmap.

2015-02-05 Thread Richard Vézina
Yes man!! web2py is very flexible and you need really few lines of code to actually have webapp working that it greatess strengh... But Joe is right about one point, documentation is pretty dispersed and new undocumented feature are added very often... You have already exposed many of these undo

Re: [web2py] Re: Question about web2py roadmap.

2015-02-05 Thread Anthony
Rather than speaking abstractly about "breaking MVC," it would be helpful to see code examples along with an explanation of why they are problematic and how they can be improved. I believe one of the motivations behind MVC (or MTV if you prefer the Django/Flask terminology) is to de-couple inde

Re: [web2py] Re: Question about web2py roadmap.

2015-02-05 Thread Richard Vézina
Joe, Do you know form.custom ? It allows to customize in view (or controller but begin and end should be present in view) generated form from SQLFORM. I think, that MVC is not really respected at all in web2py... I think that when there is a possible hack that can brings incredible feature and m

Re: [web2py] Re: Question about web2py roadmap.

2015-02-04 Thread Carlos Cesar Caballero Díaz
I am agree with many of JoeCodeswell´s points, in my experience, expert developers reject web2py mostly because, even in the doc, users are aimed to break the mvc writing code in controllers that belongs to models or views. El 04/02/15 a las 12:11, JoeCodeswell escribió: Dear Dave, Thanks f

[web2py] Re: Question about web2py roadmap.

2015-02-04 Thread JoeCodeswell
Dear Dave, Thanks for the reply. I partially agree. I agree that, "SQLFORM already takes a lot of the drudgery out of form" [now my words] generation from an existing table. However, for me, two things apply to SQLFORM: 1. It breaks MVC, meaning if *I* want to customize the form *I* do it in

[web2py] Re: Question about web2py roadmap.

2015-02-02 Thread Dave S
I find this post to be a lot clearer in terms of understanding what Joe is getting after than the posts earlier in the thread. I'm thinking that SQLFORM already takes a lot of the drudgery out of form design, and so I'm missing what Joe thinks is missing. I haven't used the MS web design tools

[web2py] Re: Question about web2py roadmap.

2015-01-31 Thread JoeCodeswell
Dear Leonel, I agree that you can do and *should* both. For my web2py projects, I am BOTH Developer and Administrator, *at* *least initially*, before i hand it over to my user. Regarding *my suggestions to improve* the help web2py gives me with the *Administration Tasks for my users*, my sugg

[web2py] Re: Question about web2py roadmap.

2015-01-30 Thread Leonel Câmara
I strongly agree with Massimo on this. By making administrative tasks easier you take that burden out of many developers. Not every developer is part of a big team that has one guy just to take care of administrative stuff. This is very true in the startup market where I think web2py has an adv

Re: [web2py] Re: Question about web2py roadmap.

2015-01-29 Thread JoeCodeswell
Dear Richard and Niphlod, Thanks for your responses. Richard, your understanding is the indeed meaning of what i was trying to express. Regarding my suggestions for improving web2py support for web-devs, i have 2 suggestions i can think of right now: - When writing a Plugin or a Wizard or s

Re: [web2py] Re: Question about web2py roadmap.

2015-01-29 Thread Richard Vézina
I am not sure where it is going... My understanding, is that Joe explain what he means by admin and devs (that I did already understand in the first place, but he make it clear)... And what I understand, is that he think that web2py help more admins in their day to day work then developers... If m

Re: [web2py] Re: Question about web2py roadmap.

2015-01-29 Thread Niphlod
In that POV, you'll always identify an "administrator" as a person who "clicks" on existing apps he didn't code and a "developer" of apps someone that "clicks" on fruits of his mind. That's basically comparing oranges and bananaswordpress is hardly a framework. It's an application that does

Re: [web2py] Re: Question about web2py roadmap.

2015-01-29 Thread Richard Vézina
So how could we serve Web Developers better? Richard On Thu, Jan 29, 2015 at 2:34 PM, JoeCodeswell wrote: > Dear Richard, > > Regarding your comment, "I don't understand the dichotomy of your > question?". > > I have been thinking about it. Here's what i have come up with. > > I am a Website Ad

Re: [web2py] Re: Question about web2py roadmap.

2015-01-29 Thread JoeCodeswell
Dear Richard, Regarding your comment, "I don't understand the dichotomy of your question?". I have been thinking about it. Here's what i have come up with. I am a Website Administrator for a WordPress site that I host because: - I don't care to write/read/understand ANY WordPress/PHP code

Re: [web2py] Re: Question about web2py roadmap.

2015-01-28 Thread Richard Vézina
I mean, I think web2py serve each others as much... don't, don't go there... :( Richard On Tue, Jan 27, 2015 at 2:03 PM, Richard Vézina wrote: > Joe, > > I don't understand the dichotomy of your question? I don't think web2py > serve each others as much... > > Richard > > On Tue, Jan 27, 201

Re: [web2py] Re: Question about web2py roadmap.

2015-01-27 Thread Richard Vézina
Joe, I don't understand the dichotomy of your question? I don't think web2py serve each others as much... Richard On Tue, Jan 27, 2015 at 12:17 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > I never thought about it in those terms. I think it serves web developers > by taking care

[web2py] Re: Question about web2py roadmap.

2015-01-27 Thread Massimo Di Pierro
I never thought about it in those terms. I think it serves web developers by taking care of administrative issues for them. On Tuesday, 27 January 2015 11:14:06 UTC-6, JoeCodeswell wrote: > > Dear web2py-users, > > Here is my question about the roadmap goals for web2py development. > > Will the