• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.