Thank you. very valuable feedback. The point of the new grid is that it 
comes with a mtable.html template. We can change it to make it look more 
datatable.

On Thursday, 12 September 2019 09:53:36 UTC-7, John Bannister wrote:
>
> Hi Massimo,
>
>  
>
> Some feedback for you on the new grid (which is looking very cool) and 
> which I played with  a bit today.
>
> Basically I  connected  to a  MySQL db and loaded some existing medium 
> sized tables (~400K records) and sort of compared it with web2py grid 
> (standard web2py)  and also datatables (using server side processing on 
> py4web which is still at an experimental stage) .
>
>  
>
> Assuming that any grid component should  be able to load, display, 
> paginate, search, filter, import, export and have CRUD functionality, I ran 
> a small comparison.   
>
>  
>
> Main things I was looking for were:-
>
> 1:  Initial load times (crucial for larger tables) 
>
> 2:  End user experience (look and feel, filtering, useablitly etc.)
>
> 3: Functionality
>
>  
>
> (1)    For initial  load times (and I haven’t put in any timing stats) 
> for sure the new py4web grid wins hands down followed closely by datatables 
> and finally web2py grid. As the web2py grid doesn’t run on py4web we cannot 
> really compare apples and pears but all tests were run on same machine 
> using same database.
>
> (2)    This is slightly subjective but for now I would go with datatables 
> followed by web2py.grid and finally py4web.grid for the following reasons:-
>
> a.       Datatables (to me) looks a lot better than the web2py.grid even 
> after restyling it to get is as close (looks wise) to datatables. 
>
> b.      Web2py.grid filtering/extended search (to me) is streaks ahead of 
> the other two. It is probably one of the most usefull tools when working 
> with big tables (even though the load time if you have a table with many 
> referenced fields is a bit tedious). Datatable search(ing) is pretty good 
> though a bit hungry when doing the searching server side and I still 
> haven’t managed get the server side to filter properly on referenced fields 
> but in general it works pretty much okay.  The filtering on the new grid is 
> very unintuitive by comparison and I was not able to build any sort of 
> query (but that could just be me).
>
> c.        Pagination/Load More doesn’t work for me particularly for 
> larger tables where it is much easier (in my opinion) to use standard 
> pagination with first and last etc unless there is a query builder similar 
> to web2py.grid available to filter out a set of records. Even then first 
> and last are still very useful for larger sets
>
> (3)       Here web2py.grid has to win hands down J followed closely by 
> datatables (after a lot of hair pulling). Whilst I understand this is v1.0 
> of the py4web.grid, there are a few (in my opinion) fundamental things that 
> need addressing.
>
> a.       Referenced fields in the grid are displayed as [linked id’s]. 
> Clicking on them does nothing. Would be good to show the referenced records 
> _format and clicking on the link should display the record (either in view 
> or edit mode). This is semi-working in the _dashboard app but there is no 
> way (apart from the back arrow) to get back to the original table/record.
>
> b.      Adding a new record that has referenced fields does not work yet 
> (certainly there is no dropdown list to chose from)
>
> c.       Similarly changing a record with a referenced field needs a bit 
> of work.
>
> d.      Import/Export functionality 
>
>  
>
> Conclusion:-
>
> I think for a v1.0  the grid is very cool and shows a huge amount  of 
> potential. 
>
> Having said that (for me) the ideal grid for py4web would be something 
> that has the following :-
>
> 1: Web2py.grid type extended search form.
>
> 2: Look and feel of (slightly extended) datatables
>
> 3: Speed of py4web.grid as is currently is. 
>
>  
>
> Disclaimer:-
>
>  
>
> Please note that the above is purely my opinion and is intended purely to 
> provide my own feedback on the py4web new grid.
>
>  
>
> (bucket list is running over) J
>
>  
>
> Best Regards
>
> John
>
> *From:* web2py@googlegroups.com [mailto:web2py@googlegroups.com] *On 
> Behalf Of *Massimo Di Pierro
> *Sent:* 12 September 2019 08:32
> *To:* web2py-users
> *Subject:* [web2py] py4web has now a grid ...
>
>  
>
> ... it is incomplete. It is experimental. The API is subject to change. 
> But I could use some community feedback:
>
>  
>
> from py4web.utils.publisher import Publisher, ALLOW_ALL_POLICY
>
>  
>
>  
>
> # exposes services necessary to access the db via ajax
>
>  
>
> publisher = Publisher(db, policy=ALLOW_ALL_POLICY)
>
>  
>
>  
>
>  
>
> # expose as /examples/grid
>
>  
>
> @action('grid')
>
>  
>
> @action.uses('grid.html')
>
>  
>
> def example_grid():
>
>      return dict(grid=publisher.grid(db.person)) 
>
>
> embed in template with [[=grid]] in templates/grid.html as in web2py. 
> The difference from web2py is that the grid communicate with the server 
> via ajax and the style is in static/components/mtable.html
> Still does not access authentication based access control but will add it 
> very soon.
>
>  
>
> You can try it.
>
> https://github.com/web2py/py4web/blob/master/apps/examples/__init__.py#L41
>
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/web2py/cc53051f-104c-4b20-97a6-c32f8220d052%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/web2py/cc53051f-104c-4b20-97a6-c32f8220d052%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d9ca8a0c-2c43-4b68-bb48-f926794fda70%40googlegroups.com.

Reply via email to