Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to understand the role of hello world in weed3-1

Shulou Source: shulou.com Published: 2022-06-02 03:41:53 10月03日 Update

This article mainly introduces "how to understand the role of hello world in weed3-1". In daily operation, I believe many people have doubts about how to understand the role of hello world in weed3-1. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the questions of "how to understand the role of hello world in weed3-1"! Next, please follow the editor to study!

Weed3 a mini ORM framework (only 0.1Mb)

Source code: https://github.com/noear/weed3 source code: https://gitee.com/noear/weed3

I began to write a first-generation version of this framework in 2005. In 2008, I joined an Internet company to reconstruct and wrote a second-generation version. 14 years of refactoring wrote the current three-generation version (there are two platform versions of java and. Net). No, no, no. no, no, no. Recently, I was forced to add xml sql mapper support. And then add the sql note by the way. Finally, the bag has grown to 0.1Mb.

Last time, a friend in a group said that this is a strange framework. That's an interesting way to say it.

Generally speaking, the characteristics of this framework are that they don't like reflection and configuration (but still can't avoid it)! Is to hope that through a good interface design, to completely become a simple control experience. Maybe you think it's better to handwrite a little sql (how is that possible, )

For some older people, this description may be better: it is equivalent to mybatis + mybatis-puls. But I haven't used them, and I may not be right.

In addition, it's small, it's fast, it's free (some people say it's too free to control)

In this article, Hello world first:

Build any type of java project and introduce the framework package

Org.noear weed3 3.2.3.6 mysql mysql-connector-java 5.1.47

Without any configuration, three lines of code can be run

/ / hello world starts. (change the database link to the corresponding...) public static void main (String [] args) {DbContext db = new DbContext ("user", "jdbc:mysql://127.0.0.1:3306/user", "root", "1234"); String rst = db.sql ("SELECT 'hello worldview'"). GetValue (); / / get the value System.out.println (rst);}

It should be simple.

At this point, the study on "how to understand the role of hello world in weed3-1" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Framework role version learning freedom more source code help configuration refactoring wrong practical concise good next interesting no two Internet code Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia MariaDB Shulou Tech Info Linux Shulou Technology