E
x
c
e
l
P
T
P

Training on Model–view–controller MVC in India

August 21, 2013

Model–view–controller (MVC) is a software architecture pattern which separates the representation of information from the user’s interaction with it. The model consists of application data, business rules, logic, and functions. A view can be any output representation of data, such as a chart or a diagram. Multiple views of the same data are possible, such as a bar chart for management and a tabular view for accountants. The controller mediates input, converting it to commands for the model or view.

MVC is popular as it isolates the application logic from the user interface layer and supports separation of concerns. Here the Controller receives all requests for the application and then works with the Model to prepare any data needed by the View. The View then uses the data prepared by the Controller to generate a final presentable response. The MVC abstraction can be graphically represented as follows.


Model
The model is responsible for managing the data of the application. It responds to the request from the view and it also responds to instructions from the controller to update itself.
View
A presentation of data in a particular format, triggered by a controller’s decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.
Controller
The controller is responsible for responding to user input and perform interactions on the data model objects. The controller receives the input, it validates the input and then performs the business operation that modifies the state of the data model.
Sample Code:

Class MyCtlr
{
public:
virtual CDialog* CreateInstance();
}

Class MyDialogCtlr
{

public:
MyDialog* m_pDialog;
MyDialogModel* modelData;
CDialog* CreateInstance();
};

MyDialog* MyDialogCtlr::CreateInstance();
{
m_pDialog = new MyDialog;
return m_pDialog;
}

Class MyDialog: public CDialog
{
public :
Bool InitDialog();
MyDialogModel* m_pModel;
MyCtlr* m_pCtrlr;
CTextBox *m_pTextBox;
};

MyDialog::GetModel()
{
return m_pModel;
}

MyDialog::MyDialog():CDialog()
{
m_pModel = new MyDialogModel;
}

MyDialog::InitInsatnce()
{
m_pTextBox = new CTextBox;
}

OnOk()
{
m_pModel->m_csText = m_pTextBox.GetText();
}

class MyDialogModel
{
public:
CString m_csText;
};

MyDialogModel::MyDialogModel()
{
m_csText = _T(“Arti”);
}

singleton Model class
OnShowDialog()
{
MyDialogCtlr ctlr;
MyDialog *pDialog = static_cast(ctlr.CreateInstance());
ctlr.SetModel(pDialog->GetModel());
if( wxOK == pDialog->DoModal() )
{
}
else
{
}
}

At Excel PTP We give Training as Onsite, Offsite or online as per Trainee Candidates Requirement to learn on Regular track or Fast rack.

Eligibility & Course Duration

You can take this training only with having basic computer knowledge or we can clear that up for you. The total duration for the course is 4 to 6 months (5 days a week 4 hours / full day only practical things)

  1. MCA / BCA / MBA IT  Candidates
  2. BE /B tech / IT / EC candidates
  3. Msc IT / Bsc IT Candidates
  4. Diploma in Computer Engg. Candidates can apply
  5. Others graduate too for non Technical IT courses.

Live Project Training

The course doesn’t end here, every student once completed the course successfully has to work on an international live project under a technical in some of the reputed IT companies. This strongly helps students of MCA, BE, BCA, MSc IT and BSc IT to have their final semester project completed as well gives a practical experience working under with an IT company.

Small Task, Demo & Live Project-:

It is very compulsory to work on an international live project under a technician in some of the reputed IT companies. This helps students of MCA, BE, BCA, MSc IT and BSc IT to have their final semester project completed as well gives a practical experience working under with an IT company.

For more information you can contact us at our email Ids as: info@ExcelPTP.com or visit our Office at office Address.