Abstract:As a software development method to tackling the domain complexity, domain-driven design has been widely applied in recent years. However, as a key activity in domain-driven design, domain modeling is still facing the problems caused by the loose relationship between domain model and programming. To address this issue, this study proposes a code to model transformation method following the model-driven reverse engineering methodology. The method can abstract model designing from code in real-time, thus facilitates domain modeling in two ways. On the one hand, it enables comparing domain model and programs to avoid the deviation of programming from modeling. On the other hand, it reduces the dependence on the code details during the knowledge crunching process, thus promotes the feedback on modeling. A case study is conducted in a real scenario and it proves the validity of the proposed method.