Enterprise Management software development tools based on Form Designer

Source: Internet
Author: User

As a result of work, you can access the enterprise management software development platform. A complete set of tool sets, methodologies, and application cases. This is a bit like a software factory that can produce various types of software based on different business needs. Most common functions, such as data addition, deletion, query, modification, and report, can be prepared in advance. Then, different business modules can be loaded and assembled into products based on different projects.
In my understanding, such a set of tools requires a strong Programming Skill. At least one team is required for division of labor and collaboration. The basic module should be stable and the application module should be implemented, madeProgramStrong adaptability is required to respond to changes in various needs.

A complete development platform should include
The Entity Designer can design business entities and generate SQL scripts.CodeAnd class code.
The Form Designer designs the user interface. A single design can generate both desktop and web interfaces.
Business Process designer designs system processes to meet the process requirements of various industries
Deployment tools deploy custom design content

In my understanding, let's talk about the front, back, and back of the Form Designer. These tools are not related to the company's platform and Technology in my spare time, so I can rest assured to share my design ideas with you.
1 first, you must have a Form Designer. So far, this is still a very valuable tool. There are some demo demos available on the Internet (Google), but they are not perfect. We have to do a lot of work.
If you know the rehost technology and sharpdevelop, you can find the source code of the Form Designer. And this articleArticle, "Using. NET Framework 2.0 to create a Form Designer" can solve the source code problem of the Form Designer.
There are also a few good examples above in codeproject, which can be used directly.
2. Find the source code of the Form Designer. The next step is to analyze its mechanism. Only a few items can be applied.
1) serialization mechanism the XML format is the best storage format, Because XML can be parsed across platforms by any language or tool, and may be transplanted in the future, the XML format can be parsed by various gadgets and small applications. For example, in actual applications, to determine whether the table corresponding to the form exists, you can directly read the corresponding XML fragments and determine.
There is a good form designer on codeproject, because it serializes the form into a binary format, which is rather inconvenient to parse, so we have to give up.
2) scalability is supported. For example, if you need to load a third-party control in the designer, you can add a line of configuration to ensure normal operation.

The Windows Forms toolkit loads the basic controls provided by. net, and the flex forms toolkit loads custom controls.
Why do we need to load custom controls? For the convenience of the platform. For example, if you use textbox to accept user input and enter the quantity of purchased direct materials this month, you must check that the input type is Numeric when saving the Form file, this check requires a lot of repeated code. If you change textbox to integerbox, this control only accepts integer values. Otherwise, an error is returned. In this way, the code entered by the user can be moved to the runtime code of the Form Designer to reduce code duplication.

3. Then, drag and drop the form and click Save. The question is again. How can I save it?
1) directly save the file to a local computer so that it can be modified at any time. A series of forms, such as a procurement approval system, must have a purchase application form, a Department Manager Audit Form, and a financial manager audit form. When these forms are too many, they must be managed in a standardized manner and cannot be placed everywhere on the computer. Therefore, put the form files of the same module in the specified directory.
The benefits are obvious. It is easy to find and modify. The disadvantage is that files are prone to tampering and insecure.
2) Upload the file to the server. Click the Save button to upload the current form file to the specified directory on the server.
3) Save the file to the database. This is my current solution, which is directly stored in the database. Security is no problem. However, you need to read, parse, and restore the data to an XML form file each time. When there are many forms of controls, the operation and design are very slow.
4) Compile the file into an assembly file and put it directly under the current Assembly directory. This solution can solve the problem of text file security, but also solve the speed problem, because it is on the local machine, it can be easily read, and is the Assembly format, not easily damaged.
You should pay attention to it when saving it. Names cannot be used because they may be repeated. Use a guid that does not repeat, but it is not easy to recognize. It must be used with a name to facilitate user search.

4. After a Form file is saved, how can it be quickly retrieved?
To achieve this step, you need to begin to deal with the business. First, a management tool is required. Based on the system hierarchy, you can create an application, create a module, and then divide the design form files into specific categories.
For example, to design a procurement system named "Purchase Management", we need to create several modules, application modules and approval modules, as well as inventory-related modules.
When uploading a Form file, you need to put it in the selected module according to the function of the current form.
Therefore, you can search form files by module and modify or adjust the files as needed.
For convenience, you can also search for a form by name, find it, and open it directly in the designer.
Although the form file is identified by guid, users seldom remember the long string of letters and seldom use ID to find the form.

5. After the form is designed and saved successfully, a container for running the form (container, runntime) is required to accommodate the running of the form. When the container starts, a system service needs to be loaded to ensure the running of the form. The container also provides a test environment for the form, which will throw the file designed by the designer to the container and run it, check the problem to facilitate diagnosis.

You can directly open the XML file after the form design is complete to see the running effect. You can also connect to the server, open the Form file on the server, and make appropriate adjustments. This tool integrates form testing, diagnosis and analysis, and is quite easy to use.

6. Create an application interface, load necessary services, and create a navigation interface based on the application and module on the server to guide the user into the corresponding module. The User Design is generally decentralized, with little regard to the integrity of the entire system. At the same time, the forms designed by the user are not easy to LOAD extension plug-ins, such as business plug-ins and process plug-ins. You need to write a container to integrate the user-designed interface and provide some basic services.
In this step, an application software based on the Form Designer has been designed, and no encoding is required for all processes.

7. How are data stored in the database and queried?
In the design field, the controls on the interface have been bound to tables in the database.

A new data input form has a able attribute to specify the database table corresponding to the form.
Each control that needs to input and save data in the form also has a datacolumn attribute, so the column of data is specified.
There is also a datatype attribute that converts user input content into datatype data and stores it in the data column specified by datacolumn.

These designs are all done visually to reduce errors. For example, you can directly obtain the field information of a table to fill in the Form Control.

if you are using a query form, you can also use the SQL Intelligent Query analyzer to help you quickly build query results.
You can manually write SQL statements or click the query button, use the query analyzer to write SQL statements.
I have a question, but I have never understood it. Using icsharpcode. texteditor. dll as the syntax highlight Editor, whether or not the file exceeds a screen, it will display a horizontal scroll bar, which is not beautiful and may not be able to find it online for a long time. This is also true for my code generator.
If an SQL statement contains only a few characters, it also displays a horizontal scroll bar, which looks uncomfortable.
When retrieving a form, the system checks whether there is data in the form. If there is data, the system loads the data. If you create a new form, such as creating a purchase application form, data is not loaded.

8. How can I load business plug-ins and expand the system?
This is the same problem. Use the standard Assembly format to write the method to be called. A series of services are loaded before the form is run. This service contains the class libraries specified in the configuration file. In simple syntax, specify the method name and parameter where the custom logic needs to be called. The runtime engine analyzes this parameter (which is a string) and parses it into a reflection method call syntax, call the methods in the specified class library. For convenience, the system will write some common class libraries in advance, such as time processing and serial number processing.
If you need to extend the system, place the assembly in the specified directory, specify the assembly to be loaded in the configuration file, and then call the assembly in the desired place, the engine will handle how to find the Assembly and how to reflect the method and call it.
For example, I intentionally wrote a database backup tool to verify the feasibility of this method.

The page layout is messy. The server, uid, and password values entered by the user on the interface are uploaded to the Click Event of the backup button. This event uses reflection to call the class library I wrote and the database backup function.
Public void backup (string server, string database, string uid, string password)
{
Sqldmo. svr SVR = new sqldmo. sqlserverclass ();
SVR. Connect (servername, username, password );
Sqldmo. Backup Bak = new sqldmo. backupclass ();
Bak. Action = 0;
Bak. initialize = true;
Sqldmo. backupsink_percentcompleteeventhandler pceh = new sqldmo. backupsink_percentcompleteeventhandler (STEP );
Bak. percentcomplete + = pceh;
Bak. Files = strfilename;
Bak. Database = strdbname;
Bak. sqlbackup (SVR );

}

some details have not been taken into account, such as how to design the database table, how to associate the table with the form, how to verify the form, and how to bind the form with the workflow. If you have time, try again.
it is still very hard to work on this topic, and it has no effect. After a project is started, the customer needs to be changed and the interface is changed once and again. If the platform is used for the project, it is estimated that the project will be exhausted. I have struggled several times and have not achieved great success. The improvement of technology is only an additional gain. For more information, see.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.