Welcome Guest, Not a member yet? Register   Sign In
making backend forms - best practices
#1

[eluser]introvert[/eluser]
Hello,

I'm working on CI backend and my code is getting really messy (repeating itself).

I have a few Admin/Backend class controllers which preform create/edit/save operations on models and I want to simplify the process of admin form creation.

I've been thinking of making universal edit/save in Backend controller which could be used by all other backend controllers to minimalize the code.

I would just pass the form properties (label names, field names, validation rules etc.) and avoid creating repeated code all over the backend controllers.

I use DMZ Datamapper, which I think its great and I've been thinking about using its form extension which basically builds the form based on the data passed to functions.

What do you think about that?

Do you use any better practices using DMZ Datamapper or base MY_controller?

Many thanks in advance!




Theme © iAndrew 2016 - Forum software by © MyBB