Re: [web2py] a proposal for form improvement

2014-09-05 Thread Vinicius Assef
I don't agree with killing a way to send formed html to client.

Web2py is for backend development, in spite of most clients run js,
some of them, don't. There are non-js clients. wget is one of them. I
know, it's not widely used, but depending on your application, it is a
client of it.

As I explained at the other message, I don't agree with killing a way
to generate backend form html.



On Fri, Sep 5, 2014 at 2:56 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
 Please find attached a welcome4.zip with contains the following files:

 controllers/default.py
 views/layout.html
 vides/default/index.html
 modules/jform.py
 static/js/jform.js
 static/js/jform-bootstrap2.js
 static/js/jform-bootstrap3.js

 My proposal is the following:
 1) deprecate SQLFORM (but keep it for backward compatibility)
 2) replace

 form = SQLFORM(table).process()
 ...
 {{=form}}

 with

 form = JForm(table)
 ...
 {{=form}}

 what is the difference? SQLFORM generates html. JForm generates JSON
 metadata which is then converted into the form client-side by the js in
 jform.js.
 why?
 - it is much faster because all rendering is done client-side
 - it can optionally submit the form via Ajax without having to change your
 code.
 - it is much easier to style and create widgets for different css
 frameworks.
 For example include the right one:
 static/js/jform-bootstrap2.js
 static/js/jform-bootstrap3.js (I only provide a layout for bs2 and not bs3)
 - it is much more powerful because you can customize widgets in JS.

 We could also add a JTable, a JMenu and a JLogin and keep all the styling
 info in JS files as opposed to Python files.
 This would make web2py leaner and cleaner.

 Thoughts?

 Massimo





 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] a proposal for form improvement

2014-09-05 Thread Don O'Hara
This is a very intriguing development. It would be interesting to see
real-world usage  statistics (what percent of apps are all or mostly js UI, vs. 
traditional backend-sends-html UI),
but since that would be pretty hard to get, the next best metric would be for 
developers to 
give an indication of how much work is front-end or back-end or hybrid.

Could a wrapper be written around JForm to send HTML if desired? (or is that 
too kludgey). At
least then one engine could generate the data to be consumed up the stack.

On a philosophical level, it goes to a primary question: what is the purpose 
of web2py ? From its
humble beginnings as a teaching tool, it has come a long way. Massimo, have you 
(or any of the
core architects) published a roadmap for the next few years? 


Don

On Sep 5, 2014, at 13:05, Vinicius Assef vinicius...@gmail.com wrote:

 I don't agree with killing a way to send formed html to client.
 
 Web2py is for backend development, in spite of most clients run js,
 some of them, don't. There are non-js clients. wget is one of them. I
 know, it's not widely used, but depending on your application, it is a
 client of it.
 
 As I explained at the other message, I don't agree with killing a way
 to generate backend form html.
 
 
 
 On Fri, Sep 5, 2014 at 2:56 AM, Massimo Di Pierro
 massimo.dipie...@gmail.com wrote:
 Please find attached a welcome4.zip with contains the following files:
 
 controllers/default.py
 views/layout.html
 vides/default/index.html
 modules/jform.py
 static/js/jform.js
 static/js/jform-bootstrap2.js
 static/js/jform-bootstrap3.js
 
 My proposal is the following:
 1) deprecate SQLFORM (but keep it for backward compatibility)
 2) replace
 
form = SQLFORM(table).process()
...
{{=form}}
 
 with
 
form = JForm(table)
...
{{=form}}
 
 what is the difference? SQLFORM generates html. JForm generates JSON
 metadata which is then converted into the form client-side by the js in
 jform.js.
 why?
 - it is much faster because all rendering is done client-side
 - it can optionally submit the form via Ajax without having to change your
 code.
 - it is much easier to style and create widgets for different css
 frameworks.
 For example include the right one:
 static/js/jform-bootstrap2.js
 static/js/jform-bootstrap3.js (I only provide a layout for bs2 and not bs3)
 - it is much more powerful because you can customize widgets in JS.
 
 We could also add a JTable, a JMenu and a JLogin and keep all the styling
 info in JS files as opposed to Python files.
 This would make web2py leaner and cleaner.
 
 Thoughts?
 
 Massimo
 
 
 
 
 
 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.
 
 -- 
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 --- 
 You received this message because you are subscribed to the Google Groups 
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] a proposal for form improvement

2014-09-05 Thread Cliff Kachinske
SQLFORM is still gonna be there, just deprecated. Which I believe means bug 
fixes only at this point.

As long as there are gluon.html and gluon.sqlhtml you can continue as 
accustomed.



On Friday, September 5, 2014 1:06:17 PM UTC-4, viniciusban wrote:

 I don't agree with killing a way to send formed html to client. 

 Web2py is for backend development, in spite of most clients run js, 
 some of them, don't. There are non-js clients. wget is one of them. I 
 know, it's not widely used, but depending on your application, it is a 
 client of it. 

 As I explained at the other message, I don't agree with killing a way 
 to generate backend form html. 



 On Fri, Sep 5, 2014 at 2:56 AM, Massimo Di Pierro 
 massimo@gmail.com javascript: wrote: 
  Please find attached a welcome4.zip with contains the following files: 
  
  controllers/default.py 
  views/layout.html 
  vides/default/index.html 
  modules/jform.py 
  static/js/jform.js 
  static/js/jform-bootstrap2.js 
  static/js/jform-bootstrap3.js 
  
  My proposal is the following: 
  1) deprecate SQLFORM (but keep it for backward compatibility) 
  2) replace 
  
  form = SQLFORM(table).process() 
  ... 
  {{=form}} 
  
  with 
  
  form = JForm(table) 
  ... 
  {{=form}} 
  
  what is the difference? SQLFORM generates html. JForm generates JSON 
  metadata which is then converted into the form client-side by the js in 
  jform.js. 
  why? 
  - it is much faster because all rendering is done client-side 
  - it can optionally submit the form via Ajax without having to change 
 your 
  code. 
  - it is much easier to style and create widgets for different css 
  frameworks. 
  For example include the right one: 
  static/js/jform-bootstrap2.js 
  static/js/jform-bootstrap3.js (I only provide a layout for bs2 and not 
 bs3) 
  - it is much more powerful because you can customize widgets in JS. 
  
  We could also add a JTable, a JMenu and a JLogin and keep all the 
 styling 
  info in JS files as opposed to Python files. 
  This would make web2py leaner and cleaner. 
  
  Thoughts? 
  
  Massimo 
  
  
  
  
  
  -- 
  Resources: 
  - http://web2py.com 
  - http://web2py.com/book (Documentation) 
  - http://github.com/web2py/web2py (Source code) 
  - https://code.google.com/p/web2py/issues/list (Report Issues) 
  --- 
  You received this message because you are subscribed to the Google 
 Groups 
  web2py-users group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to web2py+un...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/d/optout. 


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] a proposal for form improvement

2014-09-05 Thread JorgeH
Yes.

And bear into account that web development is migrating towards js based 
interfaces.  



On Friday, September 5, 2014 1:37:55 PM UTC-5, Cliff Kachinske wrote:

 SQLFORM is still gonna be there, just deprecated. Which I believe means 
 bug fixes only at this point.

 As long as there are gluon.html and gluon.sqlhtml you can continue as 
 accustomed.



 On Friday, September 5, 2014 1:06:17 PM UTC-4, viniciusban wrote:

 I don't agree with killing a way to send formed html to client. 

 Web2py is for backend development, in spite of most clients run js, 
 some of them, don't. There are non-js clients. wget is one of them. I 
 know, it's not widely used, but depending on your application, it is a 
 client of it. 

 As I explained at the other message, I don't agree with killing a way 
 to generate backend form html. 



 On Fri, Sep 5, 2014 at 2:56 AM, Massimo Di Pierro 
 massimo@gmail.com wrote: 
  Please find attached a welcome4.zip with contains the following files: 
  
  controllers/default.py 
  views/layout.html 
  vides/default/index.html 
  modules/jform.py 
  static/js/jform.js 
  static/js/jform-bootstrap2.js 
  static/js/jform-bootstrap3.js 
  
  My proposal is the following: 
  1) deprecate SQLFORM (but keep it for backward compatibility) 
  2) replace 
  
  form = SQLFORM(table).process() 
  ... 
  {{=form}} 
  
  with 
  
  form = JForm(table) 
  ... 
  {{=form}} 
  
  what is the difference? SQLFORM generates html. JForm generates JSON 
  metadata which is then converted into the form client-side by the js in 
  jform.js. 
  why? 
  - it is much faster because all rendering is done client-side 
  - it can optionally submit the form via Ajax without having to change 
 your 
  code. 
  - it is much easier to style and create widgets for different css 
  frameworks. 
  For example include the right one: 
  static/js/jform-bootstrap2.js 
  static/js/jform-bootstrap3.js (I only provide a layout for bs2 and not 
 bs3) 
  - it is much more powerful because you can customize widgets in JS. 
  
  We could also add a JTable, a JMenu and a JLogin and keep all the 
 styling 
  info in JS files as opposed to Python files. 
  This would make web2py leaner and cleaner. 
  
  Thoughts? 
  
  Massimo 
  
  
  
  
  
  -- 
  Resources: 
  - http://web2py.com 
  - http://web2py.com/book (Documentation) 
  - http://github.com/web2py/web2py (Source code) 
  - https://code.google.com/p/web2py/issues/list (Report Issues) 
  --- 
  You received this message because you are subscribed to the Google 
 Groups 
  web2py-users group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to web2py+un...@googlegroups.com. 
  For more options, visit https://groups.google.com/d/optout. 



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.