Summary of ASP. net mvc 4 small projects

Source: Internet
Author: User
ArticleDirectory
    • No detailed confirmation is made after obtaining the requirement.
    • Browser compatibility
    • The uploadify control is not very skilled
    • Entity Framework SQLite data source adaptation

The project is very small. It is the frontend and backend of an enterprise station. It mainly includes the News Module, product module, video module, and message module. There are no technical difficulties, most of which are crud operations. Before the start of the evaluation, the development time is 4 days, the actual coding time is 3 days, and the debug time is 2 days. For the long debugging time issue, we will analyze it in detail later.

Technologies and tools used
    • Visual Studio 2012
    • ASP. net mvc 4
    • Entify framework 5
    • SQLite
    • Uploadify
About ASP. net mvc 4

Compared with MVC 3, my personal experience has not changed much. Maybe some new features are useless.

Debug time spent Analysis

In addition to other factors such as no background page, the cause analysis is as follows:

No detailed confirmation is made after obtaining the requirement.

Although the project requirements are simple, in some places, communication is neglected at the beginning, and the time saved is still used on debug, or even more.

Browser compatibility

The Chrome browser is used only in the development phase, and the IE system only tests ie10. The rest are not considered. Later debugging on browser compatibility takes a lot of time.

For example:

    • Jquery. Validate error in IE7

      SetThis. ATTR ("novalidate", "novalidate ");To:If (typeof (worker )! = "Undefined") {This. ATTR ('novalidate', 'novalidate ');}

    • The height of the IFRAME window loaded by ckeditor dialog in IE7 is abnormal.

      I tried a lot of online solutions and did not use them. Later, I used an unconventional method to add meta information that forces IE8 mode to the browser.

    • Jquery. Validate in IE8 does not work

      Version matching problem: tested: jquery-1.8.2 with jquery. Validate-1.9 normal

The uploadify control is not very skilled

Many APIs need to be found in official documents, and the official site needs to be turned over. At the same time, it took a lot of time to integrate uploadify into ckeditor, mainly used to check the official documentation. This part has written a lot of JSCodeDebugging is also troublesome in terms of browser compatibility.

    • An HTTP Error 302 error occurs when uploading files in Firefox.

      Most cases on the Internet are that both Firefox and chrome have this problem, basically because of the session, but there is no problem with chrome in my environment. My solution is simple, that is, cancel the authorization check for the background action of the uploaded file. It should be related to the session. A better solution can be found at Google.

Entity Framework SQLite data source adaptation

It is mainly because the SQLite data source cannot be created at the beginning, and the EF designer always reports an error and cannot update entities through the database. In addition, the problem of SQLite Chinese fuzzy query.

      • Error reported by the designer

        Download the appropriate data source driver from the SQLite website.ProgramHttp://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki

      • Fuzzy search of SQLite Chinese strings

        Original method: dbcontext. post. where (t => T. name. contains (s), the corresponding SQL statement is charindex, changed to: List = context. database. sqlquery (string. format ("select * from product where name like '% {0} %'", arctitle )). asqueryable ();

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.