Hi, i’m new to Yii, still learning and loving it a lot. So the thing is that i have to build a product retrieval system, which is based on Amazon web services.
First i have created the necessary tables to hold the information about the products. Then i’ve created the model class using the awesome Gii. After that i generated the CRUD using Gii again. Now i’m kinda stuck. So Gii provides a form to let the users populate the tables with the necessary info. Now in my system/app i have no need for a form input, for any of the main tables that would hold the product information. The tables should auto populate with data gathered from Amazon API. Only a few tables can have form related to the input fields.
So can anyone please guide me in the right direction, on how would i start implementing the functionality. Should i remove this code from the corresponding view and write the functionality in the Controller class.
<div class="row">
<?php echo $form->labelEx($model,'type_id'); ?>
<?php echo $form->textField($model,'type_id'); ?>
<?php echo $form->error($model,'type_id'); ?>
</div>
Or should i generate a separate view files. Right now i can’t seem to find any headway. How to start ? What should be the workflow sequence for a typical application built using Yii. Where would i put the business logic? Of course i know that the business logic should always reside within the Controller class as per the MVC paradigm. But should i write all of the application logic in a single controller class.
I’ve read about modules and components. But the dilemma i’m facing is that i don’t know when is the right time to separate the necessary logic into its respective modules or components.
I’m already following the Web Application Developement with Yii and PHP 2nd Edition, and i admit that its a fantastic book. I’ve read it two times till now. But i’m getting stuck when i get down to build my projects. Just don’t know where to start. My application would not follow a similar flow diagram like the book example.
I would be enormously happy if anyone could provide any sort of guidelines or links that would atleast head me in the right direction.
Thanks,
Maxx