Skip to content

016 Naming the folders

chempkovsky edited this page Nov 9, 2022 · 17 revisions

Reminder

  • View (or ModelView) is the structure that the WebApi service sends to and receives from the client. For each entity, the developer must create at least one view.
  • View (or ModelView) is a Data Transfer Objects (DTO)
  • For a given entity, the View (or ModelView) is a subset of the properties of the given entity and a subset of the properties of the direct and indirect master entities (in terms of the master-detail relationship).
  • From the point of view of Sql constructions, for a given entity (table) View (or ModelView) is an sql View.

Notes

  • According to the agreement specified in the article 015 Preparing projects for application launch, we will generate Angular components and services in the folders
    • src/app/components
    • src/app/services
  • before generating Angular typescript classes for each ModelView we need to create subfolders for them. This article is devoted to the simple method of naming such a folders.

Naming the folders for Monolithic App

Run JavaScripts Wizard

  • To name the folder
    • Run Visual Studio and Open PhonebookSolution solution
    • Right Click app of the src-project (Angular project) and select JavaScripts Wizard menu item to open the Wizard dialog
Click to show the picture

project structure

First page of the Wizard

  • On the first page of the dialog the destination folder is shown. The destination folder is the folder in which the generated file will be created. Click Next-button
Click to show the picture

project structure

Second page of the Wizard

  • On the second page of the Wizard we select DbContext that will be used to choose the entity for the View. Select PhBkContext.csproj and the PhBkContext class using the drop-down lists. Click Next-button.
Click to show the picture

project structure

Third page of the Wizard

  • On the third page of the Wizard
    • select the View for which we need to get the name
      • in the picture below we have selected PhbkPhoneTypeView-View
  • Click Next-button
Click to show the picture

project structure

Fourth page of the Wizard

  • On the Fourth page of the Wizard we choose 01100-.interface.ts action type.
    • in the enter file name-edit-box you will get the name in the form
      • xxxxxxxx.interface
Click to show the picture

project structure

  • copy generated name without the .interface-suffix. It can used as a name of the folders.
    • in the picture above we have selected phbk-phone-type-view-name

Create subfolders

  • Having the name gotten on the fourth page of the Wizard we create two subfolder:
    • src/app/components/xxxxxxxx
    • src/app/services/xxxxxxxx
  • in the picture below we have created
    • src/app/components/phbk-phone-type-view
    • src/app/services/phbk-phone-type-view
Click to show the picture

project structure

Naming the folders for Micro frontend App

Clone this wiki locally