First day of Internship
Let's record a few common sense
1, the role of @ in C # string is,
(1) For example, @ "//a/n" converts all subsequent strings into pure strings, ignoring escape characters, and what strings are written.
(2) to connect two lines of characters, such as the SQL statement is very long two lines of writing, then each line needs to add double quotes, and then connected by the plus sign, with the @ Direct Line can be
2, SQL Server in the function of the @ is the word as a variable
3, the Android program can be written in native Java, can also use API Cloud HTML5 rapid development, the former advantage is good performance, the latter advantage is compatible with Android and Apple, development speed
4, the software development is divided into needs analysis (use Excel to draw the flowchart, writes the demand analysis with the Wrold document)-The front-end (writes the Html,app interface and uses the data which the backend provides to bind)-the backend (writes the data interface, the logic, the Operation database, The current end of incoming parameters to the front end to return JSON, such as data)-Software testing (in Excel to describe all the software problems, there are dates, screenshots, weights, etc.)
5, Apache and Tomcat server open directly to the LAN access, the use of vs2010 IIS with a virtual server, not LAN access, need to open a server in the IIS Configuration Center, configure the IP Engineering folder and so on to access
6, C # programs generally have default inheritance, if inherited is not System, when the use of data types such as DataTable may need to write full, System.Data.DataTable
asp.net Web API
This is an MVC pattern of the interface, divided into controllers controller, as the Ajax submitted URL, return JSON data, code format is based on the return of a one-dimensional or two-dimensional array of parameters, which is the Ajax incoming parameter, Ajax can be replaced with a form
The HTML view of the foreground in which you can get the data of the controller's return JSON form through the AJAX arguments
Model is responsible for the operation of the database, for the controller to use the example, you can write only some properties, database operations into the controller, the case controller is only to the data have a limit
Where the name format of the controller file is namecontrollers, where name can be named arbitrarily
Ajax is accessed by name, noting that except the first letter case name is the same as name
In the controller, the method that returns data according to the argument is named format that is getname,name arbitrarily named without the same as before, a controller can only have a method that starts with GET, When the URL is connected to the controller, the method is automatically invoked to return data based on the parameters that the Ajax passed in (where Ajax is involved in this method to be matched), and then the method writes the return data or data processing logic based on the parameter manipulation database
Which is responsible for converting data to JSON format after receiving data in Ajax for the foreground interface data binding