Welcome Guest, Not a member yet? Register   Sign In
Customizable CRUD
#31

[eluser]Atasa[/eluser]
I also have to say this too.
My point of view about validation and all kinds of user interaction is to use client side technology (e.g. JavaScript).
It is faster more interactive and many times easier to implement plus you don't have to write extra server side code.
In other words JS it is made for this kind work also.

Cheers
#32

[eluser]gyo[/eluser]
Good Atasa, I'm going to try DataGrid!
But I have to disagree about Javascript; you can't rely on client-side validation since the user may hack it in a breeze, plus js may be disabled and your system nullified. I want to rely on server-side validation since YOU control every single data the user can input and nobody can change its behavior (though a smart user could exploit that too).

After writing this I'm thinking that you could be talking about JS to create an AJAX validation, then you rely on server-side code and the application would be more user friendly, while all the validation code would be easier to implement. Did I guess right? Big Grin


cheeers
#33

[eluser]gyo[/eluser]
I quickly tested your datagrid and let me say some words.

I prefer using base_url() and site_url() functions provided by CI's URL helper so you have url consistency among your application; the curious thing is that the current datagrid in CRUD lib is done the same way, except for pagination which will be implemented. It relies on CI's Table class to easily create tables from arrays, and the data that CRUD interprets is: the fields name (if not overridden) for the table headings, and the fields values for the rows, plus an additional column for all the operations links as Edit, Delete....

What I would like to see is an implementation of a more functional datagrid in CRUD and keep pumping this library! Wink


Btw thanks for your contribution! I appreciate it!


see ya!
#34

[eluser]gyo[/eluser]
[quote author="timj" date="1203990632"]I like what I'm seeing so far, however, I am getting the following error in my view file, once for every record in my table:

Undefined property: Crud::$options
Filename: libraries/Crud.php
Line Number: 115

As far is I can tell, $options is a conditional (custom options) and I don't see this referenced in your User Guide. I've not assigned any custom options, why am I getting this error?[/quote]


Sorry timj I think I didn't see your post!
You can try to donwload again the code since I uploaded it a couple of times (dirty me Wink, and if the bug persists please post your controller code so I can help you finding the problem.


Bye!
#35

[eluser]Atasa[/eluser]
[quote author="suashi" date="1204389941"]I quickly tested your datagrid and let me say some words.

I prefer using base_url() and site_url() functions provided by CI's URL helper so you have url consistency among your application;
[/quote]
That's a really small thing you change it any time and I agree.

[quote author="suashi" date="1204389941"]the curious thing is that the current datagrid in CRUD lib is done the same way, except for pagination which will be implemented. It relies on CI's Table class to easily create tables from arrays, and the data that CRUD interprets is: the fields name (if not overridden) for the table headings, and the fields values for the rows, plus an additional column for all the operations links as Edit, Delete....
What I would like to see is an implementation of a more functional datagrid in CRUD and keep pumping this library! Wink

Btw thanks for your contribution! I appreciate it!


see ya![/quote]

Can you explain what do you mean by "more functional datagrid"?
Perhaps Ajax enabled table.
Because a datagrid is a datagrid.
I thing we have a disagreement here.
I don't see any datagrid in your crud.
You have a general library that does all the operations together difficult to find out which function calls which and then calls another etc.
After some point you get completely lost (I least I do).
To tell you the truth I haven't even looked before in your library code.
And I haven't done it because as a said from my very first post that I like to create a model
for what you do in your library perhaps, and of course in the example code, I used the CI table class there no other as far as I know.

More over, the edit delete functions also have to pass to the datagrid library to display them,
because this library is not aware if you want to display data with edit delete functions
or just to display them.


As for the next post I agree up to a certain point for what you said about JavaScript.
It is a long issue I thing and didn't express myself the right way.

Cheers
#36

[eluser]gyo[/eluser]
Quote:Can you explain what do you mean by “more functional datagrid”?
I mean an abstracted one, and your example gave me the idea to abstract it by implementing plugins, so it may be possible to completely change it without touching the core lib.
Btw if you run the example provided you can see the datagrid running.


Quote:You have a general library that does all the operations together difficult to find out which function calls which and then calls another etc.
After some point you get completely lost (I least I do).
Here I completely agree with you! I notice that the lib has too many calls to functions and you may get confused, that's what I'd like to change (maybe with your help) to gain better performance and code.


Quote:More over, the edit delete functions also have to pass to the datagrid library to display them,
because this library is not aware if you want to display data with edit delete functions
or just to display them.
Yeah! It would be nice the ability to configure the options too.



Anyway! Sincerely I thought you used the lib Wink... and I'd like to see your improvements if you want and have the time!


bye!
#37

[eluser]Atasa[/eluser]
No I don't use anything before I feel it is in a production state, and unless it is my code, so I know every inch of it.
I will keep posting here whenever possible.
I am a commune guy anyway.
I like to know what i use, to create, to play and share.

By the way,
Just today discovered Yungchen Lhamo, she is a very very nice Tibetan singer.

Have fun!
#38

[eluser]louis w[/eluser]
I like your crud library. I am researching different options and like how yours offers simplicity.

One thing I would like to see is the ability to tie db tables together. For instance, if I was making a blog post editor I would want to be able to pick the author name from a different db table.
#39

[eluser]Goedel[/eluser]
Yes, we need some way to pass a full query.

Something like:

$query= 'Select id,name, field1, field3 from table_name where blabla';
$data['output'] = $this->crud->generate($settings, $fields,$query);

The changes to Crud.php should be minimal...
#40

[eluser]gyo[/eluser]
Hi!

I understand the point of louis and I think it's a great idea to implement such functionality!
But I don't understand what Goedel is trying to say... sorry! Big Grin
Why should you pass a query to the lib if it's automatically grabbed from the table structure? I'd like to do something like:

$fields['fieldname']['relation'] = array('related_table', 'related_field');

but I'm still planning the best way to do it; of course any idea is welcome! Wink


cheers
gyo




Theme © iAndrew 2016 - Forum software by © MyBB