Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Streamline and make form/crud operations more efficient in web applications?

When looking back at last weeks work (identical to many others), I've found myself spending the major part of my time putting together forms of which POST-data are used to perform database CRUD operations through my MVC-models.

When reflecting over this, it becomes a bit worrying. It's not really appropriate to spend the amount of time I am spending on doing the most basic part in the applications design.

What would be an appropriate way to reduce this time and effectivizing the creation and handling of forms?

Thanks

like image 535
Industrial Avatar asked Jul 10 '10 16:07

Industrial


People also ask

What is CRUD in web programming?

CRUD (Create, Read, Update, Delete) is an acronym for ways one can operate on stored data. It is a mnemonic for the four basic functions of persistent storage.

What is CRUD in Dev?

What is CRUD? CRUD is an acronym that comes from the world of computer programming and refers to the four functions that are considered necessary to implement a persistent storage application: create, read, update and delete.

What is crud data?

September 21, 2022. CRUD is the acronym for CREATE, READ, UPDATE and DELETE. These terms describe the four essential operations for creating and managing persistent data elements, mainly in relational and NoSQL databases.


1 Answers

Why is making forms and doing crud operations with POST data not appropriate for you?

A web application is all about interacting with a database, using a user interface. Any attempt to spend less time on creating forms by using tools or frameworks, will have side-effects. In my opinion, you want your forms designed elegantly, because your users will interact with them, maybe very frequently. Every form should be designed to be as simple and straight-forward as possible.

You could benefit from the support of a user interface/user interaction designer. Explain to this person what the purpose of the form is, and what the data represents that is being submitted. You could also provide field names and validation rules per field name. The job of the interaction designer is to provide you with the HTML for the form, which you can plug into your existing framework. Let the interaction designer also build the client side validation code using a good JQuery plugin.

Your job is now reduced to receiving the POST array, maybe perfom some extra server-side validation and form-value sanitizing, and writing the data to the database, preferrably using model functions.

I strongly advise against using form generators or scaffolding.

like image 67
Symen Timmermans Avatar answered Oct 06 '22 01:10

Symen Timmermans