Discussion Of Program Design Under Yii Philosophy

Hi Community,

I submit to an open discussion the following consideration in designing a program that inputs data into two tables: a parent table called customer and another child called invoice. This example is very simple but ilustrative. To process an invoice a need the information of the customer.

I am going to explain two aproachs to optimize the operation of the user, that is, the faster way to introduce the data, this is the main goal of the system, looking for the best interaction between the user and the program.

First of all, I will create a model and CRUD for the table customer and the model and CRUD for the invoice table.

My first aproach is to ensure that a valid customer context is present before I allow access to

managing the invoices. So, the user has first to know the customer id searching him in the option manage customer, and when he finds the customer data in the gridview, I will give the option Create Invoice.

In the second aproach, i will grant the user to create invoice directly, and inside the form I will allow the input of the customer id, but the user will use a search form in order to find the customer because we are talking about thousand of customers.

So, my question is, using YII which is a very powerful framework with his own philosophy, what will be the better aproach for the user, I am not talking about simplify the code, here is more important the fast and secure operation of the uset than build a faster program.

Thanks in advance for your opinion.