In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
How to analyze the specific domain development in Visual Studio, aiming at this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
List the DSL in Visual Studio, that is, the tools that will be used in domain-specific development, including platforms developed by Microsoft and other enterprises. These tools can provide more convenience for everyone's road to .NET development.
What is domain-specific development and DSL
Domain-specific development is a method to solve recurring problems, for each problem, through summary and analysis, the same aspects between them can be solved at once. The aspects that change frequently can be expressed in a special language. For this particular language, we can build a model or expression, and then insert it into a fixed part.
For the solutions of our software industry, the fixed part generally adopts the traditional design and implementation, which can be the framework, platform, interpreter or programming interface. provides scalability, with a high degree of abstraction and reusability. Domain-specific languages are specifically used to create changing parts, so that the whole solution can be applied.
Domain specific language (DSL,Domain Specific Language) is a description language specially used to describe the connotation of a professional domain. In fact, it is no stranger. HTML and SQL can be regarded as examples of DSL.
Several other DSL
MPS http://www.jetbrains.com/mps/ JetBrains's DSL tool, which allows you to define rules and generate code directly through this platform
Graphical DSL tool for MetaEdit+ http://www.metacase.com/
Oslo http://msdn.microsoft.com/zh-cn/data/ee460940(en-us).aspx Microsoft's new graphical DSL language, but there are still some differences between Oslo and the DSL Toolkit we are going to introduce. Here are some introductions to http://blogs.msdn.com/keith_short/archive/2008/11/06/oslo-and-the-dsl-toolkit.aspx. Oslo consists of the "M" language, tool Quadrant, and relational storage.
GMF,EMF http://www.eclipse.org/modeling/gmf/ uses Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF) technologies to generate domain specific modeling (DSM) aids for domain specific languages (DSL).
What is Visual Studio DSL?
Vistual Studio DSL tools are specially designed by Microsoft for specific areas of development. Included in Vistual Studio SDK (which will be installed separately in vs 2010), allows developers to design their own graphical tools that include model-related support and support between models and graphics, as well as model validation, rules, and transaction support, as well as allowing developers to use some extended VSX in combination with VS.NET. Such as toolbars, menus, etc. You can use models with T4 The current class designer, distributed system designer (Distributed System Designer), LinqToSql designer and EntityFramework designer are all developed based on VS.NET DSL. VS 2010 adds UML Modeling Project, and finally provides support for class diagrams, timing diagrams, use case diagrams, etc., which is also based on Vs.NET DSL.
Why use the DSL tool
Several DSL tools are described above, but why should we use it? What can it bring us? Crucially, unlike UML, DSL is used to solve problems, not to describe them. If you are repeatedly writing the same or similar code in your work and solution, and the repeated code can be generated separately, then you can consider combining DSL tools to generate the code.
One might say, how is this different from using these existing database-based code generation tools (Codesmith, Li Tianping's codematic, etc.)? DSL is standing at the height of domain experts, not software development experts to start to solve problems, if you need to design the database, and then generate code Coding, then your tool can only be said to be an auxiliary tool for developers, but for actual developers, which will be inadequate in large software systems.
Customization of development process using DSL
1. Find out the fixed parts of the problem, and put these fixed parts in the general architecture or platform. The general parts are basically abstracted and fixed by us according to long-term experience and accumulation. for example, the Enterprise Library we use has encapsulated data access operations, log operations, verification caching, etc., to provide calls.
two。 Identify variability and discover DSL. Find out the changing parts and design DSL to provide a solution to the problem through the expression or model of DSL. In the process of using Enterprise Library, you find that most of the changes are actually relatively "fixed". They are still based on your model, your entity model, and your service model. If you abstract these metadata and realize the configuration of these metadata through DSL, then you can generate these parts directly into your target solution.
advantage
1. A substantial increase in productivity. Generating code is much faster than copying and pasting manually.
two。 Make the system more normative. Each developer will have a different way to implement a function, using DSL design model, combined with code generation can make the implementation of the function relatively fixed.
3. Reduces the chance of making mistakes.
4. So that non-developers, consultants and presales can also understand the model directly. When making the development process ahead of time, or even the consultant's research requirements, you can use tools to communicate with customers and abstract requirements, which can be provided to secondary developers.
5. Be able to verify the solution at a high level of abstraction and find problems prematurely.
6. Different technical implementation processes can be configured based on the same model. Reduce technical difficulty and workload. For example, the Sculpture introduced last time can provide different technology choices for different levels. We can choose to use Entity Framework or NHibernate for the same model. The UI layer can choose different implementation methods such as Asp.net MVC,Sliverlight,WPF.
7.DSL is not limited to generating our technical solutions, but can also be used to generate build scripts, documentation, plans, etc.
8. It is relatively easy to make the technology transfer of the solution, which can be done by modifying the generator or interpreter. The model metadata is relatively fixed, which makes our solution relatively standardized. We just need to generate different code.
Of course, this also has the premise, first, the development DSL, carries on the abstract integration needs the cost. Second, not all solutions are suitable for the use of DSL, such as a portal, which may have relatively few fixed departments and few parts that can be customized, so it is not suitable to use. If it is not suitable for compulsory use, it will fall into a customization trap. In the design and development, be sure to retain some flexibility, because it is impossible to generate all the code, you must provide some extensibility to ensure that the generated code can be extended. In addition, be sure to implement the specification, there are too many ways to implement, it will lead to your DSL too complex. Sometimes you even need to give up some implementations and some requirements. "the solution of simple problems should be simple, and the solution of complex problems should be feasible" (AlianKay, founder of smalltalk).
Series introduction
At the beginning of this series, we will briefly introduce the development process of DSL through a case, which comes from DSL Tools Lab and mainly introduces some simple development methods of DSL, including the combination of T4 and DSL to complete code generation and the deployment of DSL tools. The main purpose is to complete the DSL application of a state machine, which we will introduce one by one next.
After having a simple understanding of the development of DSL, we will complete the development of a complete development tool for practical use. In this process, it will also include an introduction to the design and development process of DSL and the problems that should be paid attention to, as well as some deeper applications of DSL and VSX.
This is the answer to the question on how to analyze the specific domain development in Visual Studio. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.