|
Home >> Software Highlight Information - Highlight Technic
The discussion about how to fundamentally solve the invasion of framework in developing software
The basic reason why software framework is always involved with invasion is that software framework is required to support certain logic and function of the application; in other words, it should realize the application's mission partly. However, there will be few values to apply if some of the functions are not designed according to the application. For this reason, the framework should communicate with the application in order to design the framework better.
I expect that the software framework of the next generation will be better. I think the trend is near and inevitable for Java-based development as a result of the matured and widespread Annotation. My opinion is to adopt the retrorse thought to solve the problem. Since the alternation between application and software framework is inevitable, then it is an easier way to actively practice the involvement of framework than passively accept the invasion of framework.
One essential problem is that: the current standard for annotation is that it should be written in natural language on the basis of little programming language API. In this mode, the cost would be too high, even it is too difficult for the large-scaled open source community to develop its own annotation system.
According to this, DSL (Domain Specific Language) is a good idea, which can simplify the standard in certain specialized field. But I also find a special issue that DSL hasn't addressed to, that is the declaration and realization the isolation and integration of grammar in the same language.
DSL is more likely a language for declaration and is designed to be used separately. It may be interpreted and implemented by another common language. It is highly possible that it can just transfer the implementing language, but it cannot be part of the language compiled for the application.
Let's go back to the issue of invasion, and the ideal way to realize does not exist now, or at least hasn't been systematized. The way is to add a grammar rule to the current developing language of the application in order to add the annotation, at the same time; this grammar will also consider providing the system programming language grammar for realizing the requirements of application declaration. Therefore, this grammar can hit the targets of expressing, restrainting and supporting the application declaration and system implementation.
It seems that the dynamic language has the most profound and long-term potential to develop in this direction, but there is still a long way to go for the dynamic language to develop in the field of general industries which have the requirements of analysis.
Recently, Java-based development will develop further in this direction by using Annotation mechanism; application declares requirements through quote label. When the system is compiled, the application's requirements will be understood and reflected by Annotation Processor and Language Model while running. Definition and quotation of Annotation are restricted by the newly added Java grammar.
On the other hand, application/system using Annotation mechanism still needs to introduce the rules of describing the natural language when interfacing. The good is that it's much easier than to describe/understand a long interface protocol and interface transferring logical sequence. Moreover, whether Annotation quote can be only place on the position of modifier or it is a overlarge restriction, this needs to be solved by the further improvement of Java language.
To summarize, it is a must to "invade" the application for the system framework to reach the target of the application, so the best way to solve the problem is to actively introduce the system framework. But how active the introduction could be is determined by the flexibility and side-effect of the approach. When certain requirement of the application can be implemented by all kinds of different systems (including the Mock testing system) through a unified declaration approach, the goal of introduction can be regarded to have reached an ideal level, and it can be considered that there is no "invasion" from certain system.
|