![]() However, we shall be using one of the main features of an object-oriented system namely that of data encapsulation. In this particular tutorial, not all the features are demonstrable. #VISUAL PROLOG TUTORIAL FULL#We shall create and design a familyBLL class in the familyBLL package to take full advantage of the object-oriented features of Visual Prolog. Now, build the project to ensure that everything is in order. If you now take a peep into the folder on your hard-disk, where these files are stored, you would notice that the IDE has created a separate folder (called familyBLL) within the main project folder to store all the files of this particular package. On clicking Create the project tree will now look like this: Now right click at the top of the tree and from the menu that is presented click on the New item as shown below:įrom the Create Project Item dialog that is presented, select Package (the first item in the list on the left hand side) and give the name of the package as familyBLL (as a mnemonic for Family Business Logic Layer you should ideally choose something which is meaningful). Once you have setup the GUI of the famil圓 project, the main project tree would look something like this: But before all that, let us complete the program in a step-by-step fashion. However, for completeness sake, some ideas regarding object-oriented would be mentioned in this tutorial also, wherever relevant. They are separately explained in the tutorial "Introduction to Classes and Objects" and you are requested to read that tutorial for details. This tutorial cannot get into all the details of object oriented programming present in Visual Prolog. ![]() In short, the raison-de-etre of the programis taken care of by that layer.Īs Visual Prolog is a strongly object-oriented language, the business logic would now be represented by an object. Note that we are using the phrase "business logic" instead of merely the "logic", because it indicates the program's business side. That package would act as a business logic layer. Now, we shall take that logic and put it into its own package within the project. #VISUAL PROLOG TUTORIAL CODE#Earlier, the code for the logic was intermingled within that presentation layer. The GUI of the program is technically known as the presentation layer. ![]() We will assume that the project is entitled famil圓. ![]() Important: We are also assuming that you have created the AncestorDialog dialog in the GUI and given the code, so that that module has defined a predicate called getName to retrieve the name of the ancestor entered in that dialog. We shall assume that you have performed those GUI construction procedures correctly, and hence they are not repeated here. #VISUAL PROLOG TUTORIAL SERIES#In this tutorial, you would need to setup the project's GUI exactly as explained in the "Fundamental Visual Prolog - GUI" tutorial in a series of sequential steps before the section titled "Getting the Main Code into the Program". 6 Connecting the Business Logic Layer to the GUI.5 Understanding the Business Logic Class. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |