Jump to content

Statistics and GUI admin module question


eincande
 Share

Recommended Posts

Hello Everyone,

I'm starting my journey with pw admin module development so i hope i'm not asking to much newbie questions. :*)

I have to handle some classic tabular datas coming from an csv file and manage them in an admin module

I am hesitating to use the page system to stores them as i will have to make a lot of statistics on them.

I'd rather plan to use a dedicated table and direct SQL queries for it as the "selector approach" seems more for finding and filtering stuff rather than for complex stats.

First: am i wrong and selectors are way more powerful than i think ?

Second, i get a little lost in the admin module GUI classes. I followed the available tutorials on process module creation, form creation, datatable, etc but i have no clue how to handle simple stuff like tabs panel navigation , putting a "new item" button upright, displaying some filters, etc. like in the User module. Is there some available doc on that topic ? I could do it all "by hand" but i'm sure there is a better approach.

Third : Is there some kinda CRUD module that could handle external table datas ?..worth asking, right ? ;)

Thank you in advance for anyhelp :)

Emmanuel

Link to comment
Share on other sites

Firstly, check out this:

http://processwire.com/talk/topic/4147-excel-like-crud-in-pw-using-handsontable/

As for selectors and pages/fields vs a dedicated table and direct SQL. I have taken both approaches with PW and will continue to use both, depending on the complexity of the data. You can do an awful lot with selectors, but I do think that sometimes it makes more sense and is in fact necessary to use a dedicated table/sql. Of course you can always load all the data into an array and use php to do your calculations - it really depends on the volume of data you are dealing with and also how often this data is updated. One approach I have taken is to have a script that runs after data is changed. This script calculates all the stats etc and populates PW pages/fields with the data that is to be displayed to the end user.

One tool that might save you some time is diogo's custom admin pages module: http://mods.pw/4Y

Hope that helps as a starting point. I am sure others will chime in with more ideas.

Link to comment
Share on other sites

Thank you adrian..again... :)

Handsontable seems amazing but somehow it is too complexe from what i need.

I really want to start by coding myself a basic CRUD system based on a single table. No Jquery or Fancy stuff in the beghinning. If i don't get my hands dirty, i will never  feel secure about pw and I won't feel confortable working for a client if i cannot react fast to a system failure ;)

I have to handle thousands of records and i think i will keep them in a regular table. That's why i must know the "low level" PW API to interact with it, build forms, use tabular datas and pagination, hooks, etc. Stuff i did a lot of time in PHP but i want to use processwire API and "way of doing it". Not just put some alien code in it :)

Beside the fact that PW is pretty impressive and the community friendly, i must say that the "developper" doc is missing somehow, especially if you don't have enough time to read all the classes yourself and figure out how to make them work together. But i will continue as PW is really worth it :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...