I am currently involved in a multilingual, multi-culture web-based project.
To meet the needs of English, German, French, and other different languages and cultures.
The database must meet both Oracle and MSSQL requirements.
Although we use ASP. NET, I don't think it is an authentic ASP. NET
We only use several feature items, many of which can be said to be ASP. NET.EssenceIs useless.
Our leader has a wealth of experience in ASP and PHP before, so we are not very interested in some new functions of ASP. NET.
So some coding requirements are also very interesting.
1. We use the Vs. NET development project code-behind. This is not bad, so we didn't use editplus.
2. We don't need ASP. NET event, delegate mechanism.
Leader thinks that the HTTP protocol itself is requst and response. Introducing event will complicate the simple process.
So we only write in page_load () Code .
3. We do not need viewstate. enableviewstate = "false"
4. Try not to use ASP. NET Server Control. Of course, use HTML elements and HTML controls.
If it is a GUI-related element, or the element needs to be restored or assigned a value after post, set the attribute of this element to runat = server.
5. The values of all form elements are obtained using requst. Form.
I have some experience in PHP, ASP, and JSP, so I am very familiar with and get used to the following code structure.
We use the most runat = server. and dynamic output of HTML control.
The code structure is as follows:
Page_load ()
{
// Fetch Configuration
// Fetch the GUI element for the current culture
Doinit ();
// Check and get the URL parameter values;
Checkparameterelements ();
If the page is post back then
// Check and get the posted form values;
Checkformelements ();
If need to write to database then
Writetodatabase ();
If no error happen then
// The non-Gui related data are retrieved from the database and render here.
Renderdataui ();
If no error happen then
// GUI element render here
Rendergui ();
}
Common table output code:
System. Web. UI. htmlcontrols. htmltablerow TR;
System. Web. UI. htmlcontrols. htmltablecell TD;
Foreach (datarow in sortedtable. Rows)
{
Tr = new htmltablerow ();
TD = new htmltablecell ();
TD. innerhtml = "some stuff ";
Tr. cells. Add (TD );
Table. Rows. Add (TR );
}
The same method is used for multilingual interfaces and multi-database support.
Text in different languages and sqlstring in different databases are stored in the database.
Only one language Id field is added to the text table to distinguish the text of different languages.
A database ID field is added to the sqlstring table to distinguish different databases.
The stored procedure is not used.
I also read the present layer, business logic layer, and data access layer in petshop 3.
After a periodProgramThe design experience has gradually become accustomed to our current design.
It is also a kind of framwork or architecture.
I don't know what kind of experience do you have in similar projects or ASP. NET projects?
Welcome!