The organization of programming work--llorch Basic tutorial of Visual Studio (i)

Source: Internet
Author: User


A generic example illustrates:
  • This series of blogs discusses only the basics of the tool and does not discuss any language.
    • Don't even discuss shortcut keys:-)
    • You can complete this tutorial with the mouse
  • The IDE default refers to Visual Studio Community Edition. At the end of this series of articles, you can skillfully use it to write programs.
  • The default layout state after Visual Studio startup is called the main window, and the project name displayed in the title bar of the main window is not necessary.
  • Several symbols describing menu actions are defined on the basis of daily spoken language and Windows Explorer: [], {},/, >>, =, (,).
  • check that a setting item is represented by:
    • [Window name]/{menu name}/{submenu name}/{Set item Item name}= Set value of item
  • For example, the default Debug configuration:
    • [Main Window]/{solution Configuration Manager}=debug
  • When checking multiple settings items, write each one in the same way as a single set item
  • When you check that a setting item has multiple values , parentheses are used to separate them with internal commas, such as:
    • [Solution Explorer]/{project name}/{reference}= (system,system.core,system.data,system.xml)
  • To perform a left-click sequence is to replace the last check with "/", such as exiting the IDE:
    • [main window]/{file}/{exit}/
  • The connection symbol for the right-click menu is >>, such as refreshing the Windows desktop:
    • [Desktop]>>{Refresh}/
  • The representation of a setting item in a pop-up window is similar to
  • The representation of the set item in the MDI child window is similar to the above, noting that in Visual Studio, the name of the MDI child window is in its upper-left corner or may be automatically adsorbed around the main window
  • title bar and status bar as the promotion of the menu, applicable to the above presentation method
  • Defect description
    • Welcome feedback, mailto:[email protected]
    • The preferred language for the author is C #
    • The author is a soft dog
    • The author's IDE does not have a Chinese language pack, so some nouns are not translated correctly:-(
    • Due to the lack of clarification of the relevant certificate issues, copyright reserved
    • Series of articles did not propose or solve new problems, the purpose is only science







Body


In Visual Studio (the IDE), there are two very subtle special terms "project" and "solution (solution)". What are the implications of these two concepts for the work of our organization?





First, from directory StructureFeatures to recognize visual Studio.


When we start the IDE in a blank environment,


[The main window]/{file}/{new}/{project}/, you can exhale the [New Project] window.


Select any project template in the New Project window, because the default is


[New Project]/{solution}= Create a new solution,


Therefore, after the new project has been completed, there is a scenario in Solution Explorer that contains a project.



At this time


[Solution Explorer]/{project name}>>{open}/in Windows Explorer,


You can see that this project has a separate output directory: The bin directory, where the debug folder is the output target of the project.



Back to the main window,


[Main window]/{new project}/get [New project],


Build a project to attach to the current solution,


[New Project]/{Solution}= added to the current solution.]


At this point, the view directory structure is


      • Solution Solutions
        • Item 1
          • Item 1.csproj
          • Bin
            • Debug
            • Release
        • Item 2
        • Solution. sln


It is clear that this philosophy of design presents that the project represents something of a "unit". And the solution is the collection of these "units". Please try to guess where the automatically generated information is when we add a reference to the project. Is ' solution. sln ' or ' Project 1.csproj '?



We can use this feature to organize the programming of the program. That is, the project is used as a reusable unit. This unit is more advanced than class, because the class is essentially a text document. This unit is also lower than the actual application because there are some items that it does not produce new . exe only to produce a new . dll. In fact, this level is often said to be "modular reuse" in the module.





Second, from references and outputs for projectsTo think about the organization of Visual Studio


Now that the output refers to new items that correspond to the actual work done by Visual Studio. Then it could be a DLL, or it could be an. exe. In short, it must be a new unit.



A simple question can be raised: Can a project correspond to several reference projects? How many output items can a project correspond to? How many projects can a reference project correspond to? How many projects can one output project correspond to? In fact, by writing their own compilation scripts, such as Makefile, is able to accurately grasp the process of compiling. However, it is clear that there is no requirement to force write compilation scripts in Visual Studio. It can be said that since the compilation process can be automated, then why not use this benefit?



The result of this benefit is a solution to the above problem: a project can refer to multiple projects, a project is to output a project (if it is a application template, it is an. exe, the class library is a DLL), and a project can be referenced by any number of other projects.



With the help of this modular unity, the problem domain can be divided more scientifically, the scope of the problem is restricted and the reuse is effectively formed.





Finally, from other people's appsTo guess the organization in Visual Studio


Take  security guard as an example,  security guard obviously corresponds to a "solution". Its main interface can correspond to a desktop application project in the IDE, and the actual modularity can correspond to the class library project in the IDE. The same understanding can be applied to other applications as well.



Packaging an application's installation package is actually a special project in the IDE: deployment.





Summarize


A feature-rich application is hard to resemble "hello,world!" So simple. Visual Studio provides an automated project management methodology in which the solution is oriented to the overall problem domain, and the project provides a modular approach to implementation, and understanding and complying with this methodology may not be able to avoid wheels, but to some extent avoid creating the same wheel.



The organization of programming work--llorch Basic tutorial of Visual Studio (i)


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.