move .NET documentation outside the Platform specifics section

git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2400 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
eifops
2023-09-26 19:15:29 +00:00
parent 72a0563ed8
commit 409a2661dc
65 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
[[Property:title|CodeDom: Getting Started]]
[[Property:weight|0]]
[[Property:uuid|06e0c7ae-6d25-a0ef-81e6-2ee3c95fe4a1]]
== Prerequisites ==
Before you start writing ASP.NET pages in Eiffel, you should be familiar with the ASP.NET technology itself. If you haven't already, it is strongly recommended that you follow the ASP.NET quickstarts available online at [http://samples.gotdotnet.com/quickstart/aspplus/ http://samples.gotdotnet.com/quickstart/aspplus/] . Apart from a few Eiffel specific points described in [[Using Eiffel (to write ASP.NET pages)|Using Eiffel]], writing ASP.NET pages in Eiffel follows the same rules as writing ASP.NET pages in any other language.
Writing ASP.NET pages in Eiffel also requires to be familiar with the Eiffel programming language itself. There are no changes in the language when using it to write ASP.NET pages: the same parser and compiler are used to parse and compile standard Eiffel source code and ASP.NET generated source code. Documentation on the Eiffel programming language can be found on the [http://docs.eiffel.com Eiffel documentation web site] .
==Samples==
The '''Samples''' folder of the Eiffel for ASP.NET delivery includes ASP.NET pages written in Eiffel. To run the samples you can either click on the corresponding link in the ''Start'' menu or open the page [http://localhost/EiffelSample http://localhost/EiffelSample] in your internet browser. Each sample comes with an extensively commented source code.
{{note|The samples will only be available if IIS was installed prior to installing Eiffel for ASP.NET. }}

View File

@@ -0,0 +1,17 @@
[[Property:title|Eiffel for ASP.NET Installation]]
[[Property:weight|-1]]
[[Property:uuid|c9371a07-12fb-bdb2-b076-3da3c0ec8da6]]
Eiffel for ASP.NET is available for downloading for free at [http://www.eiffel.com http://www.eiffel.com] . Simply run the file and follow the installer instructions. It is recommended that Internet Information Services (IIS) be deployed on the machine prior to installing Eiffel for ASP.NET. If IIS is not deployed then the installation program will display a warning message box. Click '''ignore''' to keep installing the product.
Without IIS, ASP.NET pages cannot be loaded and thus the samples will not be installed. It might still be useful to install Eiffel for ASP.NET without IIS if the Eiffel CodeDom Provider is going to be used through other [[Common Scenarios|scenarios]]. If IIS is available then the installer will open an Eiffel ASP.NET page at the end of the installation process. This page contains links to the documentation and samples. The installer will also put links to these documents in the ''Start'' menu under 'Programs\Eiffel for ASP.NET x.x' where 'x.x' corresponds to the version number of Eiffel for ASP.NET.
==System Requirements==
* Windows 2000 Server or Advanced Server with Service Pack 2, Windows XP Professional or 64-Bit Edition, or one of the Windows Server 2003 family products.
* .NET Framework (1.0 or 1.1)
* Internet Information Services with ASP.NET (optional see above)
==ASP.NET Installation==
Please consult the corresponding documentation (available online at [http://msdn.microsoft.com/asp.net/ http://msdn.microsoft.com/asp.net/] ) for configuring ASP.NET properly. In particular, be aware that by default ASP.NET is disabled on Windows 2003 Server.

View File

@@ -0,0 +1,5 @@
[[Property:title|Writing ASP.NET pages in Eiffel]]
[[Property:weight|-1]]
[[Property:uuid|7027e7f3-38e1-5e26-c936-20aea0e0c205]]
Eiffel for ASP.NET allows running ASP.NET pages written in Eiffel. It should be installed on both the web server and the developer's machine. This documentation includes the following sections:

View File

@@ -0,0 +1,34 @@
[[Property:title|Names Mappings]]
[[Property:weight|4]]
[[Property:uuid|fa212869-ffb0-0a6a-cbd0-7a184b11491d]]
Maybe the most striking difference when writing pages in Eiffel comes from the name of the .NET types and methods. Because of different naming conventions, overloading and differences in identifier validity rules, .NET identifiers cannot be mapped directly to Eiffel identifiers. As a consequence, the Eiffel compiler creates XML mapping files in the ''Eiffel Metadata Cache''. These files are created only once for each referenced assembly.
{{note|The ASP.NET installation program pre-generates the Eiffel Metadata Cache for all assemblies required by ASP.NET by default. }}
The name mapping algorithm is quite complex but it is possible to guess the Eiffel identifier from the .NET identifier in most cases. The following simple steps can be followed to retrieve the Eiffel identifier corresponding to a .NET type:
# Only the simple type name is used, the namespace isn't used by the Eiffel identifier:
<code>System.Xml.NameTable -> NameTable</code>
# Underscores are introduced in between words (prior to upper case letters other than the first character):
<code>NameTable -> Name_Table</code>
# Eiffel class names are always upper case:
<code>Name_Table -> NAME_TABLE</code>
# If the assembly containing the type is associated with a prefix in the Eiffel system then the prefix gets prepended to the name:
<code>NAME_TABLE -> XML_NAME_TABLE</code>
The steps to follow to retrieve the Eiffel identifier corresponding to a .NET member are simpler:
# For property getters, the "get_" prefix is removed:
<code>get_MaxOccursString -> MaxOccursString</code>
# Underscores are introduced in between words (prior to upper case letters other than the first character):
<code>MaxOccursString -> Max_Occurs_String</code>
# Eiffel feature names are always lower case:
<code>Max_Occurs_String -> max_occurs_string</code>
Although these simplified steps will work in most cases there are certain .NET identifiers that require additional manipulation to be translated into Eiffel. The [[Name Mapper|Name Mapper]] utility should be used when such cases arise.
{{seealso|[[Name Mapper|Name Mapper]] }}

View File

@@ -0,0 +1,21 @@
[[Property:title|Using Eiffel (to write ASP.NET pages)]]
[[Property:weight|3]]
[[Property:uuid|c8e2ffa7-cfa8-0b4c-4b5e-e1f386b7ab11]]
==Inheritance==
Eiffel handles inheritance in a different way than most languages. In C# or VB.NET the behavior of a newly introduced member in a class hierarchy is defined as part of the member declaration itself (for example C# will precede the member declaration with the keyword ''override'' to accomplish the same result as an Eiffel ''redefine'' clause). In Eiffel, classes are equipped with an inheritance clause which centralizes all the feature adaptations.
As a result, Eiffel for ASP.NET introduces '''inheritance snippets'''. Each Eiffel ASP.NET page may include at most one inheritance snippet. Such a snippet must start with the '''inherit''' keyword and may then list any valid Eiffel feature adaptation.
==String and Array Manifest Constants==
The Eiffel programming language supports using '''manifest constants''' in source code. The type of these constants is inferred by the Eiffel compiler. There are two manifest constant types that require special attention on .NET: string and array. Because the Eiffel and the .NET types differ, writing code using string or array manifest constants requires additional care.
* '''Strings''': Eiffel strings cannot be mapped directly to .NET strings because Eiffel strings are ''mutable'': an Eiffel string can be resized while the size of a .NET string is set for the lifetime of the object. However, the Eiffel class <eiffel>STRING</eiffel> defines conversion features that will automatically convert to and from a .NET string. So when the compiler expects an object of type ''System.String'' where an object of type <eiffel>STRING</eiffel> is used, it will automatically call the right conversion routine.<br/>
However if an instance of <eiffel>STRING</eiffel> is passed as an argument to an overloaded .NET function that can accept both an instance of ''System.Object'' or an instance of ''System.String'' then the compiler will produce an error since it has no means to know which type the Eiffel object should be converted to (any Eiffel object converts to ''System.Object''). When this happens, the conversion function <eiffel>to_cil</eiffel> must be explicitely called.
* '''Arrays''': The exact same problem also arises with arrrays. Instances of the Eiffel class <eiffel>ARRAY</eiffel> are different from instances of <eiffel>NATIVE_ARRAY</eiffel> which correspond to the .NET array type. There are however features in <eiffel>ARRAY</eiffel> that will convert to and from .NET arrays. If an overloaded .NET function can take an argument of type ''System.Object'' or ''System.Array'', any instance of <eiffel>ARRAY</eiffel> given to it must first be converted explicitly to a .NET array by calling the <eiffel>to_cil</eiffel> function.
==Compilation and Timeouts==
Eiffel compilations can take longer than the default timeouts set in ASP.NET. In particular ASP.NET will run batch compilations on the entire directory that is being accessed by IIS each time the time stamp of that directory changes. If the batch compilation takes longer than the ''batchTimeout'' property defined in the machine wide configuration file (''machine.config'') then ASP.NET will start another compilation just for the requested file. This can be quite resource intensive for the Web server and thus it might be beneficial to increase the default value of 15 seconds for ''batchTimeout''.