Feed on
Subscription

ASP.NET makes Internet future space stand (3)



Programmer topic

We talk about development staff below how the programming that apace begins ASP.NET.

You discover thing of the what in ASP.NET is more intriguing than ASP?
Some of person says is configuration,It is easier that ASP.NET configuration rises?Because of this,I want to discuss a bit of content about this problem.It is OK that we discover an advantage of ASP.NET is really simple configuration.Because the applied process of ASP.NET is,comprise by the code that has compiled,Do not need to register DLL to perhaps suspend certain service so.For example,In today's ASP environment,If be on your website,When a very important trade package needs to be replaced by a component with more powerful function,You serve what must suspend WEB site,So that make,DLL is not decided by the lock.Replace this package next,Register in the system afresh,The WEB site that starts you afresh,The kill that such doing is in some paragraph in time,Your station name a person for a particular job cannot work external.However,Exciting is in ASP.NET,You do not need to doing any works above,You are in also need not consider that blamed Regsrv32.You need to put this new DLL the catalog with old DLL system to fall only.The request of the new DLL of current visit still is working,New request will spark new DLL, when all these can complete all requests to old DLL continuously till.In those days,New DLL can replace old DLL, all these won't be caused stop machine,The configuration function that all these needs to call XCOPY only,All these makes our job more businesslike,More concise.

...

The ten great skill in ASP.NET process designing



Be in a file is medium,10 skill that the attention needs when we are using personnel of discussion process designing ASP.NET to develop applied program,These skill are involved from default accuse, the change of the name that express sheet arrives StringBuilder kind use,Conduce to process designing personnel can getting used to.NET environment as soon as possible.

1, when use Visual Studio.NET,Divide direct or outside be not quotative object,Do not use default name.

One of profit that.NET brings are all source code and configuration file it is simple text file,The text editor that can use the random such as Notepad or WordPad has an edition.If not be willing,We are not must use Visual Studio.NET to regard compositive development as the environment.But used Visual Studio.NET,We can manage in Windows file implement be pleasant to the eye to the file,Or in the content that the file browses from inside text editor besides Visual Studio.NET.
Use Visual Studio.NET has a lot of profit as compositive development environment,Among them the most distinct advantage is it improved manufacturing efficiency greatly.Use Visual Studio. NET,Software is developed quickly below the circumstance that we are paying lesser price.The IntelliSense that regards compositive development environment as one part offers voluntary code to finish, the real time that inputting a method or dynamic help, solecism provides when function hints,The function that can improve manufacturing efficiency with etc.
The tool with other and complex elephant in that way,The effect that how produces it adequately in the society and master its " characteristics " before,Visual Studio.NET also can make we produce a kind of setback to feel.Sometimes,Its as inscrutable as black box,Can generate many file and the code of a lot of no use.
A function of Visual Studio.NET is,No matter be kind, accuse or the object in expressing sheet,It can provide default name for new target.For example,If we founded a new ASP.NET Web Application,Its are default the name will be WebApplication1.We can be in " new project " the name that this application changes conveniently in the dialog box,But the name of the just should use a program name space that changes at the same time and the fictitious catalog that its are in,The default name of source code file remains WebForm1.aspx and WebForm1.aspx.cs (C# project) or WebForm1.aspx.vb (VB.NET project) .

The file name that we can change ASPX and code to use in plan browser,But Web page kind the name still will be WebForm1.If be on sheet of this Web watch,make a button,Its are default the name will be Button1.In fact,All accusing the name is by accuse of type and digital composition.
We can,Also should mix all watch sheet in using a program accuse the name revises significant name.To demonstrating sexual program lesserly character,Default the name still can be competent,But if use a program by many watches sheet,When there are a lot of pushbuttons and ticket on every watch sheet,As single as such watch of FrmStartup, FrmDataEntry and FrmReports name compares such name of Form1, Form2 and Form3 more understand easily and safeguard.
If accuse on watch sheet should cite in the other place of code,It is more important to make it has a significant name.The person that such name of BtnOK, BtnCancel and BtnPrint makes read code understands more easily,Consequently,Also be Button1, Button2, Button3 than the name such accusing safeguard more easily.
A of a name that appears in all files in revising a project good method is,Ordinal in menu of Visual Studio.NET choice %26quot; editor %26quot; - %26gt; %26quot; discover and replace %26quot; - %26gt; %26quot; replace %26quot; command.
When the code that before seeing two weeks, writes,We often see just like first time these code are same,Because this makes they have to conduce to us understanding its,the name of the meaning is very those who be necessary.


2, although do not use Visual Studio.NET to undertake process designing,Use code supports a file to also be helpful for improving the performance that uses a program

In Web application program, Web serves or Web accuses in waiting for all ASP.NET Web projects,Visual Studio.NET uses code to support a file.Code support file makes the project has better organization, modularity,The development group that suits much person composition more.Additional,It still meets those who bring function rise.
The content of code support file is compiled in assembling a document into kind,It is file of a DLL commonly,Also can be EXE file sometimes.This file is stationed in in staying in the assembly cache area that uses a program,When applied process is started,Can get it instantly.
If code is to include,be in %26lt;script%26gt; mark or in ASPX file code,It still can be compiled page of a Web kind.Below this kind of circumstance,Every time when this webpage is using to load of the first time in program dialog,Need to undertake compiling afresh,Be compiled kind can be stationed in in staying in memory.Every time the computer is started, IIS stops, be started afresh or when file of source code, configuration is changed,This file must be compiled afresh.Although not quite,But the performance loss that such causing also is quite considerable.


3, reduce watch sheet to answer as far as possible send

The Button that clicks Web webpage to go up every time, LinkButton or ImageButton accuse when,Watch sheet can be sent on the server.If accuse AutoPostBack attribute is installed to be True,If CheckBox, CheckBoxList accuse after condition is changed,Also can make the meeting that express sheet sends a server.
Be sent to answer a server when watch sheet every time,Meet by new to load,Incident of the Page_Load that start,All code in program of processing of executive Page_Load incident.Putting the initialization code of the webpage is the most appropriate here do not pass.We hope to be in via regular meeting a few code are implemented when to load webpage every time,And the hope implements another some of code when to load of webpage first time only,Hope a few code are in even except carry out outside to load when to load every time first.
Can use IsPostBack character to fulfil this one function.When to load of webpage first time,The value of this attribute is False.If the webpage sends because of answering and by new to load,The value of IsPostBack attribute can be installed to be True.Through the test,Designation code can be implemented in aleatoric moment.Relevant C# code is below:Protected Void Page_Load(Object Sender, eventArgs E)
{
/ / webpage every time when to load,Executive a few operationsIf (! IsPostBack)
{
/ / the operation that executes when to load of webpage first time
}Else
{
/ / wind the operation that when sending, executes
}

/ / the operation that the webpage executes when to load every time
}
We hope to be not caused as far as possible time send (answer every time send metropolis requirement server to undertake a series of operation) ,Although cause,answer after sending.Also hope to be able to be carried out operate less as far as possible.The operation of large-scale, wasteful time (example exactly the number is searched according to the library) ought to avoid especially,Because they can lengthen the sound that uses a program,answer time.


4, use StringBuilder kind

String is immutable in.NET frame,The operator that this means change string and the copy after the method can return the change of string,This means function to still have the space that increase.When undertaking many string is operated,Use StringBuilder kind compared good choice one kind namely.
The time that the C# code below checks to generate string place to need from inside 10000 stature string with two kinds of means.Used a simple string series connection to operate for the first time;Used StringBuilder the second times kind.Want to examine result string,Can the annotate symbol that the annotate in the code below take out goes:

%26lt;%@ Page Language=%26quot;C#%26quot; %%26gt;

%26lt;script Runat=%26quot;server %26quot;%26gt;Void Page_Load(Object Source, eventArgs E)
{Int IntLimit = 10000;
DateTime StartTime;
DateTime EndTime;
TimeSpan ElapsedTime;String StrSub;String StrWhole = "";

/ / carry out string join to operate above allStartTime = DateTime.Now;For (int I=0; I%26lt;IntLimit; I++ )
{StrSub = I.ToString();StrWhole = StrWhole + " " + StrSub;
}EndTime = DateTime.Now;ElapsedTime = EndTime - StartTime;LblConcat.Text = ElapsedTime.ToString();
/ / LblConcatString.Text = StrWhole;

/ / use StringBuilder kind have similar operationStartTime = DateTime.Now;
StringBuilder Sb = New StringBuilder();For (int I=0; I%26lt;IntLimit; I++ )
{StrSub = I.ToString();Sb.Append(" ");Sb.Append(strSub);
}EndTime = DateTime.Now;ElapsedTime = EndTime - StartTime;LblBuild.Text = ElapsedTime.ToString();
/ / LblBuildString.Text = Sb.ToString();
}

%26lt;/script%26gt;

%26lt;html%26gt;
%26lt;body%26gt;
%26lt;form Runat=%26quot;server %26quot;%26gt;

%26lt;h1%26gt;String Concatenation Benchmark%26lt;/h1%26gt;

Concatenation:
%26lt;asp:LAbelId="lblConcat "Runat="server"/%26gt;

%26lt;br/%26gt;

%26lt;asp:LAbelId="lblConcatString "Runat="server"/%26gt;

%26lt;br/%26gt;
%26lt;br/%26gt;

StringBuilder:
%26lt;asp:LAbelId="lblBuild "Runat="server"/%26gt;

%26lt;br/%26gt;

%26lt;asp:LAbelId="lblBuildString "Runat="server"/%26gt;

%26lt;/form%26gt;
%26lt;/body%26gt;
%26lt;/html%26gt;
The difference of two kinds of means is quite big:Use StringBuilder kind the rate of Append method is nearly 200 times rapidder than using string connective rate.Relative result is shown as follows:
(graph:Picture01)


5, using server end to accuse when necessary only
In ASP.NET new introduced a kind to be in what the server carries the Web Server Controls be callinged that move to accuse,In code,They often are shown through the grammar below:

%26lt;asp:TExtBox Id="txtLastName" Size="40" Runat="server" /%26gt;
They also are called ASP to accuse sometimes.Server end accuses be by what Runat attribute indicates,Its value always is " Server " .
Through adding Runat attribute,General HTML accuses can by very change server end to move conveniently,A simple case is below:

%26lt;input Type=%26quot;text%26quot; Id=%26quot;txtLastName%26quot; Size=%26quot;40%26quot; Runat=%26quot;server%26quot; /%26gt;
The name that can decide through Id attribute middle finger,We are adducible the program accuses mediumly,The means setting property that can pass process designing and obtain a value,Because of this,Server end handles means to have bigger flexibility.

This kind of flexibility is have fair price.The resource that every kinds of server end accuses a metropolis to use up a server to go up.Additional,Unless accuse, webpage or applied process prohibit explicitly View State,Accuse condition is to include in View State conceal inside the country,Answering the metropolis in sending to be delivered every time,This meeting causes serious function to drop.
A in this respect very good example is,The application that a form accuses on the webpage,If do not need the element in form cites in code,Use the HTML form that need not undertake the server carries processing.We are OK still the server is placed to accuse in HTML form unit,Cite in code the server accuses.If need to cite aleatoric form element,The unit that appoints for example,Whole form must be the server accuses.


6. HyperLink accuses, LinkButton accuses difference

To the person that Web is visited,HyperLink, LinkButton accuses it is same,But they still have bigger difference in functional respect.
Click when the user accuse when,HyperLink accuses a meeting to stand be about to user " navigation " to target URL,Watch won't answer send to the server.LinkButton accuses will express a hair to return a server above all,Go to user navigation next target URL.If be in " arrive " need undertakes the server carries processing before target URL,Use LinkButton to accuse;If need not undertake the server carries processing,Can use HyperLink to accuse.


7, annotate code

This one skill is not be aimed at ASP.NET,But it is a good process designing convention.
Annotate ought to explain what code can carry out to operate not just,Still ought to make clear a reason.For example,Explaining in annotate merely is in the array that all over all previous,Should showing enumerate group however is a basis some algorithm computation is worth,Unless algorithm is quite simple,Still ought to undertake brief specification to algorithm otherwise.
The different programming language in.NET project has the annotate sign that differs severally,A brief specification is below:
HTML %26lt; ! - - annotate- -%26gt;
Annotate of JavaScript //
Annotate of VBScript ' Annotate of VB.NET '
Annotate of C# //
/ content of * much travel
annotate
*/
SQL- - annotate

Accuse in the server begin and is annotate symbol in end mark,But server can oversight drops all attribute that it cannot identify,The attribute that accordingly we can not define through using will insert annotate.An example is below:

%26lt;asp:TExtBoxId="txtLastName "Size="40 "Comment=" the annotate that this is me "Runat="server" /%26gt;
Explanatory note has to source code in Visual Studio.NET very simple.The travel that tall brightness shows need explanatory note,Add explanatory note by Ctrl+K+C combination key next.Should delete annotate,Need tall brightness to show only by the code of annotate,Press Ctrl+K+U combines key.
In C# project,We still can pass the beginning in every to be in use / / / input XML annotate is nodular.In annotate bar,We can use the XML mark below to organize annotate:
%26lt;summary%26gt;%26lt;/summary%26gt;
%26lt;remarks%26gt;%26lt;/remarks%26gt;
%26lt;param%26gt;%26lt;/param%26gt;
%26lt;returns%26gt;%26lt;/returns%26gt;
%26lt;newpara%26gt;%26lt;/newpara%26gt;
The formatted report that should examine these XML annotate in Visual Studio.NET,We can choose above all " tool " dish is individual,Choose next " build annotate Web webpage " dish is individual.


8, the executive circumstance of the webpage in use Trace method and catalog of Page of Trace attribute record

A kind of when debug a program old technique is the crux in the program the dot inserts output statement,Normally the circumstance falls,The cost that important variable can include in exporting information,Pertinent information can output file of screen, log or database.
In ASP.NET,Through using Page to command medium Trace attribute,This kind of use that debugs a technology is simpler.Page command is a code that ASPX file begins to be in,It is offerred compile implement directive.One or more property is included in Page command,To compile implement the place that provides use programming language, code to support a file or should accede kind the information such as the name.
One of attribute in Page command are Trace,Its are worth a likelihood is True or False,The Page that a model is below commands,The value of among them Trace attribute is True:

%26lt;%@ Page Language=%26quot;c#%26quot; Trace=%26quot;true%26quot; %%26gt;

If the value of Trace attribute is installed for True,The Web page that makes by ASPX file can be shown come,Besides webpage itself,Also can show about a large number of other information of this page come.The form of face bar shows under these information in a piece of form:
The condition that · Request detail offers time of Session ID, request and request is piled up.
· Trace Information is included dog time is pressed in lifecycle of log, webpage early or late ordinal the list of each measure.Additional,OK also to add custom-built information among them.
The means that · charges a tree to divide administrative levels with a kind is listed on the webpage all accusing,Include every to accuse with byte calculative size.
All Cookie that · Cookies gather lists this webpage is founded.
Head of HTTP of · head gather and their value.
The Server environment related · Server variable and this webpage is variable.

Include dog mediumly in Trace Information bar the log is the most useful,Here we can insert ourselves dog command.Trace kind in have 2 methods can dogging the command is inserted in the log:Trace.Write and Trace.Warn,Besides Trace.Warn the command shows with gules font, Trace.Write command shows with black font outside,They are identical.It is to dog below the snapshot of a screen of the log,Include among them a few Trace.Warn command.

Dog the most convenient function in the log is us can be being developed and Trace.Write and Trace.Warn statement are inserted in whole code in test process,And when final consign uses a program,The cost that can pass property of the Trace in changing Page to command,Prohibit these commands are effective,And these need not be deleted to output a statement before deploy application software.


9, use memory process

The SQL Server of Microsoft and database of other and contemporary relation use SQL to the command is defined and handle inquiry.Statement of a SQL or a series of SQL statements refer SQL Server,SQL Server can undertake to the command analytic,Found to inquiry plans and undertake optimizing to it next,Carry out this inquiry to plan next,This needs many time.
Memory process is a series of by inquiry processor beforehand analytic with optimized SQL command,These commands can be risen by memory,Can get apace is carried out.Memory process also is called Sprocs,It can receive input parameter,Make a single memory course can be handled relatively the inquiry with specific large-scale.
Because Sprocs is beforehand by analytic,To complex inquiry more appear important,Its inquire what optimize beforehand to the plan is,Because this calls inquiry process to compare the SQL statement rate that executes same function,want to be gotten quickly much.


10, use.NET command goes

Tool of.NET command travel hints move in accord with window in the command.To make the command can be carried out,It must is stationed in in staying in the present list that commands clew accord with,Or through installing PATH environment variable.
.NET SDK is in " start " individual event of a dish is installed on menu,The window of command clew accord with that this dish individual event can open to install PATH environment variable correctly.We can be passed ordinal click %26quot; begin %26quot; - %26gt; %26quot; program %26quot; - %26gt; %26quot; Microsoft Visual Studio.NET %26quot; - %26gt; %26quot; tool of Visual Studio.NET %26quot; - %26gt; %26quot; accord with of clew of command of Visual Studio.NET %26quot; ,Window of accord with of clew of the command that start.
When pulling a desktop to go up through attending this dish individual event from menu,Bolt by Ctrl+C at the same time,OK get on the quick way copy of this dish individual event to the desktop,Use rise the meeting is very convenient.

...

ASP.NET makes Internet future space stand (2)



I can imagine he is how to support ASP.NET application model,he also does a few businesses with ISAPI filter?
Yes,He also does a few businesses with it.The technology that we also support a kind to call ASP module patulous dot.He basically allows you to use ISAPI filter in that way like a function.A lot of example that we allude,If replace the job such as Session State,be to be in what that level comes true.In addition,The job of heavy directional URL also is to be in what this level comes true.For example,The URL that a lot of our clients often want to offer individuation for their user,The client that can be him like Financial Institution site offers Www.financialinstitution.com/scott the user that such URL is called SCOTT for,Because they do not want to establish too obvious way,Should use heavy directional technology to offer the various URL that cannot inspect so,You can realize such function on ASP.NET.

...

The function with powerful ASP.NET (two)



Web Forms and Web Controls

ASP.net offerred     Forms catenary writtens guarantee to the function of the server,Accordingly you can handle a request simplier.The function that Web Controls also provided likeness,Offerred to webpage developer relative to more functions at HTML Controls.

    Caching

When     offers more instruction to the server no longer when the user,ASP.net allows object and output data by amortize,Such meetings greatly hoist speed.System of ASP.net amortize is very advanced,It can let your resolution give what need by amortize,What do not need,And be in when the information of v amortize

    can upgrade quality

    is a few more embedded in ASP.net very outstanding can upgrade sexual feature,Include to maintain conversational position through Server,And multiprocessing implement evenly.ASP.netRuntime is same also monitoring process, when because this becomes you to get data,getting chaos,ASP.net can be shut automatically,Start afresh next,In inputting old instruction new process at the same time.ASP.Net was offerred a series of brand-new feature,Went up to improve in existing foundation.Although sound pretty good,But also not be do not have a problem.If do not have better
ADO supports,Everything won't so to the queen's taste.

    file manages

    whole .NET system is compose is built on NGWS RUNTIME foundation,The COM system that NGWS RUNTIME abolished our habit is used,Those who replace is more the masses
The Runtime that change, from come up at all tell,Fictitious opportunity of Runtime and Java is same.Of Runtime running way basically is midway intercept code,Turn it interpret is average machine
Implement language,So that the system is used,The page of same responsible still ASP.net is compiled.

    is noted:If you are right JAVA is not quite familiar,From go up at all for,The program in your computer became JAVA code interpreter machine language.These code are sent different platform,You need redo merely program,is not the programming with all redo language.This is the crossing that JAVA place assures platform compatibility.You can discover this and.NET are very similar,Exceptional is JAVA it is to cross platform,And.NET is multilingual compatibility.The applied process that this system also is you withheld tabulation accord with on source file.If the system monitored a program to be altered,Runtime can compile them afresh,And from
Stir memory newest compile version.

    in this,The advantage that our OK and clear sense is brought by ASP.net place.Anyhow,Compile a language,Machine code and powerful type variable,Compared with get executive
The script language that has explanatory before should be gotten quickly much.

    we are unable to bear or endure can guess,How much will we cost for brand-new Runtime?Microsoft assures,Can exceed the cost on Runtime system far from the function that compiles the earning on ASP Pages to arrive,But this sounds not quite seem settle way well.For example,Java fictitious machine,JAVA program run rate substantially fell.We petition to won't appear in this Runtime only similar serious mistake.

    is additional,What need reminds is,Compile an application process to also need to expend time,Because of this,The first user of your system can discover apparent tardily phenomenon.If you often change a course (the form of a lot of ASP member can do so) ,Your user can discover function is reduced apparently.
...

The function with powerful ASP.NET (one)



A program,The thing that speed is a special longing making a person.Once code begins the work,Next you have to as far as possible those who let it run is some faster,Again some faster,In ASP you twist the code that works you as far as possible only,So that must go to their transplanting only and a bit more very few in the component of function.But now,Microsoft will be rolled out
ASP.NET meeting appropriate solves this one problem.

    compatibility

    ASP.net and ASP are compatible,Because this does not have the application that is necessary to fear you are existent,the program can be in the below one version of IIS break down.ASP.net file appears with new patulous name,Namely.ASPX,Because of this,You can differentiate very easily a new old document.Using ASP.net from time to tome too much confine,If you want to get a few advantage from inside ASP.net,You had be toed do by its custom,Such meetings are become to your application make make a lot of limitation.On the other hand,Microsoft also do one's best makes develop personnel to write fewer code,Make sacrifice in fluent sex and continuity respect with having only so.

The difficulty that     ASP.net is managing and writes a respect is opposite for was to increase.In ASP.NET because of,Have too much " bagatelle affection " need is considered,So,The person that developer perhaps is used first must cost not little time to come be enlightened a problem:Why the system dies so easily.Apparent,ASP and ASP.net can make next generation network application software.Although expenditure is not little,But ASP.net offerred a few very new character really;ASP is met
Strive comes down charge evenly,The function that and provide place of a few ASP.net does not have.

    can compile code

    code already was compiled below the requirement,So you can issue work out ASP.net in any languages.Now even VBSCRIPT and JAVA SCRIPT were compiled.

Object of     COM

We are using     when typical ASP,Realize the problem that be accompanied with COM and comes.Register Components,The new server that start... ,It is some let a person very the thing that feels troublesome.Now,Because had new generation window to serve a system (NGWS) ,You need to be these problems no longer irritated heart.You require simple duplicate source file only,The place that needs in you is stickup,It can be run normally.Need not again DLL is registered.

    XML is configured

    passes NGWS frame,All METABASE and configuration information store in XML file.This is meant,You also do not need to be fooled so that turn all round by IIS again,Go changing a setting even.In fact,The XML file that you require a change to come from any one place only,Upload the change the server as a result.The long-range PC that does not need any kinds is controlled....

ASP.NET lecture (the operation ADO.NET of 5)- database




    works to roll out open mode database to join before New Year composedly (interface of process designing of process of ODBC) application (since API) ,Appeared various databases visit a technology,And ADO.NET is among them a newest kind.In this process,Produced a lot of interesting things.For example,COM enters database field,The colonial process that begins implantation OLE DB.Next,Be equivalent to the ActiveX of version of automation of OLE DB roughly? Is Data Objects (ADO) chosen to dominate Windows? The Visual Basic of database developer? With ASP community.

...

ASP.NET lecture (4)- data is bound decide DataBind



It is the most important in ASP.net series lecture that this is told tell,Include a server to accuse,The database operates those who wait for all involving to handle data to accuse a metropolis to DataBind with,That is to say this tells DataBind,Had begun to discuss the issue of ASP.net core.Actually the concept of DataBind has put forward for a long time,There also is application in ASP,It is everybody only either very notice just.But in ASP.net,The height that had promoted a core it.

    4.1 introduces DataBind simply

...

ASP.NET lecture (2)-ASP.NET accuses



2.1ASP.net introduction

    talks about a course normally,We often say,Its introduction is very simple,ASP.net also is.ASP.net advances an idea,Think namely WEB page,Also be body of a window,So,The friend of the VB VC BC Dephi that has learned object-oriented process designing,Learn to rise much simpler.

...

ASP.NET lecture (1)-ASP.NET brief introduction




    begins to rise from today,Christ hill will enter ASP.net together with everybody in the study of a lot of program,Plainspoken,.net is a magic weapon or rubbish after all,Our wait and see what happens.Have any problems,Contact Christ hillSeaman@163.com
What is ASP.net,The installation of ASP.net

...

Program of ASP.NET application program and design (3)



Physical architecture

After     decides logistic layer,Consideration physics layer is very important also.For example,You are installing the implementation on the individual and real computer when moving of SQL Server, Internet Information Server, ASP.NET and.NET at the same time this application process.This will be layer of a physics.But more reliable and the method that can expand is:Body of window of Web of the deploy on the cluster that constituting by server of three Web,Part of order of component of.NET of server upside arrange uses in two,Database of the deploy on the SQL Server that resumes pattern in two breakdown.The physical architecture of such generation includes server of seven Windows in three main groups:Web bunch, package bunch and database form a cluster.If you understand different logic unit of the system to be able to be located in different computer,go up,You may implement different code.

    to our give typical examples,We use effective and two mighty models:Web server is mandatory user interface and component,Database server is mandatory data of SQL Server stores.If traffic is very big,This model makes us OK and agile the ground adds more servers in bunch,What make its keep enough is concise handle in order to facilitate.The image below showed this physics architecture and in front the map between the logistic architecture of the definition concerns.


Graph 2:The map between physical architecture and three-layer architecture concerns

You see     no less than in that way,Logistic architecture and physical architecture need not identical.Consider a content even in program level:Safe.

    safety plans

    Microsoft has about security and software the formulas put into verse of this one theme:" Secure By Design, secure By Default, and Secure By Deployment (the design is safe,Acquiescent safety and deploy safety) " .Namely,In the design in safety,Expecting a system is safe below acquiescent circumstance,And it is OK to found the solution of successful in safe environment deploy.Safety is important from beginning to end.Since more and more software want to be on public Internet " live " ,The software that writes safety is more crucial.To us,Fortunately,Extensive safe options and function are provided with Windows operating system when.NET moves,We include our easily the application in us in the program.The detail that need not pay attention to label and flaw of the safety in eliminating online solution overly,How does the applied program program that we can point out to the flaw with the commonnest wh some of which points out us undertake handling.

    notices:About the detailed information of usable option,Consult please Microsoft Security Developer Center.

    buffer spills over

    this may be the commonnest safe flaw in already compiling applied process.When running use.NET as a result of us,And it is a design with what the safety in put moves,Because this is unlikely to produce buffer to spill over.In addition,Do we use Microsoft Visual Basic? .NET has code to the solution,And Microsoft Visual Basic? C of.NET unlike or C++ are spilled over easily in that way by buffer the influence of the problem.But,Although we plan to found package with C++ ,The special function that we still can use compiler,GS is changed,Will protect us to dismiss the charge that gets most buffer to spill over.

    database is atttacked

    another kind of common safe flaw may make baleful user obtains a visit to store the attributive of the primitive data in the database.To prevent a hacker to obtain the control of data to counterpoise,We use process of memory of SQL Server only,And do not use " inside couplet inquires " .Can decrease greatly so jussive of other SQL is inserted to atttack in trying to flow in the input.We still use input test and verify in office of the many positions in the program,The character that contains effect in order to ensure all inputs are wrapped only.

Script of site of     across is atttacked

The common charge that     has to process of Web application still has one to plant,It involves an user to add client square script in input shedding,This kind of attack will be carried out additional speak and the Web site that coax user transmits individual data him hacker.Should solve this problem,A when we use ASP.NET 1.1 new function,Filter all inputs that give this kind of baleful code,In preventing to enter its place the system.Add code still is included on indication screen,It will be banned automatically use any script or show the sign in may inserting data to store.

    so far,The logistic model that we already obtained applied order and physical model,And the safe function detailed list that ensures implementation plan is included.Had these and target statement and user plan,We can begin this " before encode " expeditionary last part.

    completes design documentation

    is before the encode share that enters a project directly,Need spends a bit of time the logistic package that actual draw the outline of gives applied order,This is very important.In solution of our give typical examples,Three logistic component that we want to achieve a solution:Component of visit of data of database, .NET and ASP.NET user interface.Below in a few articles,How do we implement introduction of very detailed ground these package.But now,We are draw the outline of only give every package roughly outline,The most important facet in discussion process,Namely documentation changes package between alternant.

    database

    uses a program to DotNetKB,We need to be data storage in three pieces of watches:Theme, problem and answer (consult please next graphs) .


Graph 3:Theme, problem and answer are expressed

    our need uses memory process,Visit data in order to make intermediate layer component OK also surely.About the detail of the database,We will discuss in an article.Here,We just point out:The database documentation of listed watch name and list of all row detail, acquiescent index and memory process,Should include in a complete database design documentation.Namely,The detailed information that the success should possess to realize systematic data to store partial place needs in documentation.

    notices:If take care,You may notice we did not allude to be expert data storage in the database.It is to make a project more interesting only (to us at the same time an opportunity uses data of direct XML to store) ,We are expert information memory in file of data of a XML.

...
« 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 »