Script # – Is there an automation tool for generating a script clear library?

I can’t believe that all the jQuery code is done by hand.

Edit. Just for cleaning

Script# has a set A library that wraps jquery. This allows me to call jquery functions in a natural c# way. But they grow very long. But they also look neat. Looks like tools to generate them. But there are no tools in the script arp package. So q

Unfortunately, there is no magic tool… I wrote the jQuery code by hand.

< /p>

If you look at it, you will see that one really has to look at all the “quirks”…well…functions done by changing the parameter sequence/count, etc., to get different behaviors, and possibly The different return values ​​of all these information are not in the script, and it is impossible to create a beautiful wrapper.

In addition, there are some places where you must consider what is the natural/useful c# experience… For example, use enums to Represents string literals, numeric literals. How to express different behaviors as overloaded or differently named c#APIs, which are converted to the same call at runtime. The same applies to some generic useful places.

It’s not rocket science, but it requires some work. It also depends on the size of the API you are trying to wrap. Compared with other jQuery plugins, the jQuery core is a fairly large surface area.

I can’t believe that all the code of jQuery is done by hand.

Edit. Just for cleaning

Script# has a set of libraries that wrap jquery This allows me to call jquery functions in a natural c# way. But they are very long. But they also look neat. They look like the tools to generate them. But there are no tools in the script arp package. So q

Unfortunately, there is no magical tool…I wrote the jQuery code by hand.

If you look at it, you will see one People really have to look at all the “quirks”… well… the functions done by changing the parameter sequence/count, etc., to get different behaviors, and possible different return values. All this information is not in the script, and it is impossible to create a beautiful Wrapper.

In addition, there are some places where you have to consider what is the natural/useful c# experience… For example, use enums to represent string literals, digital literals. How to express different behaviors as heavy C# APIs with different names or downloads, they are converted to the same call at runtime. The same applies to some generic useful places.

< p>It’s not rocket science, but it requires some work. It also depends on the size of the API you are trying to pack. Compared with other jQuery plugins, the jQuery core is a fairly large surface area.

< p>

Leave a Comment

Your email address will not be published.