Maybe you might have thought about this at some point, “Scriptcase uses the MVC templates?” Well, let’s get this thing straightened out once and for all.
First of all, do you know what is MVC?
The MVC (Model View – Controller) architecture came about in the mid-1980s at the Xerox Parc by Trygve Reenskaug, which began in 79 and later came to be understood as MVC. The entire original implementation was from this standard originally registered in the “Applications Programming in Smalltalk-80: How to use Model-View-Controller”.
MVC or Model View – Controller is nothing more than a form of development, it would be a standard software architecture (not to be confused with design pattern) separated into 3 spheres, or three-layered physical model. The first one refers to where all data manipulation happens (model), the second sphere would be the visual part where the interaction with the user happens (view), and the third and last would be to the entire control space (controller).
We can say that the basic ideas of the MVC are the separation of concepts and the reusability of the code.
As already mentioned, it is where all the manipulation of the data takes place, that is, here one does the writing and reading of data. In addition to application data, it is also formed by business rules, logic and functions.
The model is the most important organ of the execution process, it is responsible for just about everything the application is going to do. It knows what the application intends to do, and is the main computational structure of the architecture because it is responsible for doing all the modeling of the problem that is intended to solve.
In the background, it models all the data, as well as all the behavior of business processes.
In fact, it is a behavioral and data compact, completely independent of its display.
It may be the simplest to understand since it is basically the bed of interaction with the user, it is responsible for displaying the data, through HTML or XML. It can be any output of data representation as a table or even a diagram, in addition, it is still possible to have multiple views of the same data.
This sphere does not care to know where and how the information was taken, its only function is to display. The view depends on the model, in the sense that whenever the model data changes, there will be a change of the view, and finally, the views have the opportunity to change.
This is the guy responsible for receiving all user requests. It functions as a mediator, that is, it does the input mediation by converting commands to the other two spheres. It uses actions and imbues itself by a page, directing which model will be used and which view will be displayed to the user.
What are the advantages and disadvantages of using the MVC model?
- Allows the application to become scalable and portable;
- It is entirely possible that there is parallel development for both model, view or controller since they are independent of each other;
- The maintenance, updating, and testing of multiple systems are easy to maintain since MVC manages multiple viewers;
- Easy to create new platforms for the system;
- It takes a considerable amount of time to analyze and model;
- It requires some specific knowledge;
- It would not be the best option for small applications;
Okay, so how is all that related to Scriptcase?
Well, knowing now that MVC is nothing more than a ‘standard’ form of development we can understand how this relates to Scriptcase. Within the Sc the client does not develop stirring in the ‘source code’, this because this tool works as visual development.
The code itself tends to follow the MVC template by default, however, in the back end, it is not recommended using Scriptcase to maintain source code. But why that?
Look, even if you have knowledge and the ability to make modifications, at the moment you realize, for example, some kind of correction where the customer needs to update, Sc will generate a new code over the modified code, being so it will erase any modification made to the source code.
So does Scriptcase NOT work under the logic of MVC?
Well here is an important point that should be clarified, Scriptcase follows the development model understood as MVC oriented OO, that is, Model View – Controller Object Oriented.
This is because it is understood that for the development with the quality of large and organized things, it is important to have an object-oriented construction. It is no use to use object orientation if you do not use some architecture standard, because of that, MVC becomes an excellent alternative.
Therefore, Scriptcase is positioned within the trends of success for the development of applications with technology-oriented to objects, a tendency that is very much based on the process organization of the application in layers and the observation of the standards used within the market of IT.