Welcome Guest, Not a member yet? Register   Sign In
Number of views
#1

[eluser]elmne[/eluser]
I would like to find out the best approch for an application development.

What's the best approach to minimize the number of views that are generated for an application?

For instance, say that each contoller represents a functionality within the system that requires

add
view
edit
delete

Then for each of the above, the following 9 views would be needed
Quote:
add_info.php
confirm_added.php - that displays to let user know item is added to the system

search.php
view_results.php - for viewing search results

select_edit.php - for searching item to edit
edit.php - to display fields to be altered
confirm_edit.php

select_delete.php
confirm_delete.php


If there are 10 functions in the system, that means a total of 10 functions times 9 views which gives 90 views.

Ofcourse this becomes unrealistic as the more the application increases in functionality, the greater the number of views. Yet most of these views display form fields.

The other option would be to use Codeigniters form helper and create form tags within controllers, so that there are standard views for

Add
Confirmation
View
Edit
Confirmation
Delete
Confirmation


However, the problem then becomes almost the same, whereby the contollers become so extensive/long because they are now holding form fields for add/edit/view/delete

and moreso, formatting output with html becomes a bit restricted, such as embedding fields in a table or <DIV> layout which can then have css applied to it.


So, what's the best/recommended way to implement views?


Messages In This Thread
Number of views - by El Forum - 06-13-2010, 01:26 PM
Number of views - by El Forum - 06-13-2010, 03:29 PM
Number of views - by El Forum - 06-13-2010, 03:55 PM
Number of views - by El Forum - 06-13-2010, 07:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB