mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-08 15:52:26 +01:00
Author:halw
Date:2008-12-24T03:37:43.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@145 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
[[Property:title|Eiffel CodeDom Provider Manager]]
|
||||
[[Property:weight|-1]]
|
||||
[[Property:uuid|089e658f-4bd8-df8f-5647-0c176c00359b]]
|
||||
The Eiffel Codedom Provider Manager allows to graphically configure the Eiffel CodeDom Provider. There can be multiple configurations, each of them being associated with at least one application.
|
||||
The Eiffel Codedom Provider Manager allows graphical configuration of the Eiffel CodeDom Provider. There can be multiple configurations, each of them being associated with at least one application.
|
||||
|
||||
{{note|The Eiffel for ASP.NET installation program will add a shortcut in the start menu to the Eiffel CodeDom Provider Manager. }}
|
||||
|
||||
The main dialog of the Eiffel CodeDom Provider Manager is divided into two vertical panes. The left pane contains a list of available configurations while the right pane contains the settings corresponding to the currently selected configuration. Initially the only available configuration is the '''default''' configuration which applies to all applications. The configurable settings are listed below.
|
||||
==General Settings==
|
||||
* '''Fail on error''': Checking this box will force the Eiffel Codedom Provider to fail when an error occurs. By default the provider rescues the failure and logs an error but it might be easier for debugging to have the Eiffel CodeDom Provider stop and raise an exception.
|
||||
@@ -12,6 +14,7 @@ The main dialog of the Eiffel CodeDom Provider Manager is divided into two verti
|
||||
==Compiler Settings==
|
||||
* '''Default root class''': In the event where the CodeDom tree does not define an entry point, there still needs to be a root class for the Eiffel system to compile properly. If there is an entry point defined in the Codedom tree then this setting is ignored.
|
||||
* '''Precompile ace file''': This setting, if set, gives the path to the ACE file of the precompile that the CodeDom compiler should use when compiling systems with this configuration. The CodeDom compiler will first check whether the precompile for that ACE file already exists in the precompile cache (See Precompile cache below). If it finds one then it will check whether the ACE file was modified since the precompile was created. If there isn't a corresponding precompile or if the ACE file was modified then the CodeDom compiler will create a new precompile in the precompile cache using the specified ace file. It will then compile the system using the precompile in the cache corresponding to the specified ACE file.
|
||||
|
||||
{{note|If for any reason the precompilation fails then the CodeDom compiler will still compile the system but without using any precompile. }}
|
||||
|
||||
* '''Metadata cache''': Both the Eiffel CodeDom Provider and the Eiffel compiler require reading from and writing to an Eiffel Metadata Cache. These caches contain information about mapping the .NET types and members names to valid Eiffel identifiers. Because read and write access are required, the application that uses the CodeDom Provider must have write access rights to the Eiffel Metadata Cache folder.
|
||||
@@ -26,13 +29,16 @@ The main dialog of the Eiffel CodeDom Provider Manager is divided into two verti
|
||||
This list associates .NET assemblies with the prefix that will be used for Eiffel class names corresponding to .NET types belonging to the assembly. For example the prefix for the assembly ''System.Xml.dll'' is ''XML_'', this means that the Eiffel class names of all the types in the assembly ''System.Xml.dll'' will all begin with ''XML_''. This is necessary because Eiffel doesn't have a notion of namespace. The default assembly prefixes cannot be modified but new assembly/prefix pairs can be added if necessary.
|
||||
==Applications==
|
||||
This last setting will only appear for configurations other than the default configuration. It lists the applications that will use the configuration when they load the Eiffel CodeDom Provider assembly. If an application is not listed in any configuration then it will use the default configuration.
|
||||
|
||||
{{note|For a change in an existing configuration to take effect, the process that uses the modified configuration must be restarted. }}
|
||||
|
||||
==New Configuration==
|
||||
New configurations may be created by clicking the ''New'' button or the ''New'' entry in the ''File'' menu. The New Configuration dialog box asks for the name and the path of the configuration. It will create a file with the extension '''.ecd''' ('''E'''iffel '''C'''ode'''D'''om) with the specified name in the directory located at the specified path. Whenever one of the applications listed at the bottom of the New Configuration dialog loads the Eiffel CodeDom Provider, it will use this new configuration.
|
||||
==Configuration Properties==
|
||||
Double clicking on the configuration name in the configurations list, clicking the ''Properties'' button or choosing the ''Properties'' menu entry in the ''File'' menu will open the Configuration Properties dialog. This dialog gives the dates of creation and last modification of the configuration as well as the list of applications that use it if it's not the default configuration.
|
||||
{{seealso|[[Configuration|Configuration]] , [[Logging|Logging]] }}
|
||||
|
||||
|
||||
{{seealso|[[Configuration|Configuration]], [[Logging|Logging]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
CodeDom stands for the '''Code Document Object Model'''. CodeDom allows for representing source code in an abstract data structure. Such a representation is called a '''CodeDom tree''' as the underlying data structure uses a tree paradigm. This abstract representation can then be generated into different programming languages. Each language vendor provides its implementation of the CodeDom interfaces, this implementation is called a '''CodeDom Provider'''. Programmers can then build tools that can work with many different languages without having to know about each one, instead they just delegate code generation to each CodeDom Provider.
|
||||
The CodeDom interfaces also expose types and methods that allow for parsing source code and creating the corresponding CodeDom. The current implementation of the Eiffel CodeDom Provider does not support parsing. Code generation is a much more popular useage of the CodeDom and the current version focuses on this aspect of the technology.
|
||||
|
||||
{{seealso|[[Installation|Installation]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,9 +9,10 @@ Another use of the CodeDom technology is via the WSDL utility. This utility is p
|
||||
Wsdl /language:"EiffelSoftware.CodeDom.CodeDomProvider, EiffelSoftware.CodeDom, Version=2.0.1.1402, Culture=neutral, PublicKeyToken=def26f296efef469"<br/>
|
||||
http://api.google.com/GoogleSearch.wsdl</code>
|
||||
|
||||
{{note|The vesion number used above might differ depending on the version of the Eiffel CodeDom Provider dll installed on your system. }}
|
||||
{{note|The version number used above might differ depending on the version of the Eiffel CodeDom Provider dll installed on your system. }}
|
||||
|
||||
{{note|The example above uses the Google web service, the corresponding URL is correct at the time of writing but there is no guarentee it won't change (or be removed) in the future. }}
|
||||
|
||||
This will generate a file with the extension '''.es''' which contains multiple Eiffel class definitions. Compiling this file will require using the CodeDom compiler (programmatically via the CodeDom <code>ICodeCompiler</code> interface) or using the [[eSplitter|eSplitter]] tool to generate standard Eiffel source files ('''.e''' files) that can then be compiled by the standard Eiffel compiler.
|
||||
|
||||
|
||||
|
||||
@@ -4,19 +4,28 @@
|
||||
There are a few topics specific to the implementation of the Eiffel CodeDom Provider that are worth mentioning.
|
||||
==Multiple Classes File==
|
||||
The Eiffel compiler expects that there is only one class per source file (file with extension '''.e'''), however the CodeDom interface specification requires multiple classes to be generated in the same file (actually in the same ''stream''). The Eiffel CodeDom Provider code generator generates files with the extension '''.es''' which may contain multiple class definitions. Each class definition is separated with a special marker that the Eiffel CodeDom Provider compiler will parse to create multiple '''.e''' files - each containing a single class definition - prior to calling the command line Eiffel compiler.
|
||||
|
||||
|
||||
{{note|Only the Eiffel CodeDom Provider compiler knows how to handle '''.es''' files. The standard Eiffel compilers can only parse '''.e''' files. }}
|
||||
|
||||
Eiffel for ASP.NET includes the [[eSplitter|eSplitter]] utility which can 'split' Eiffel multi-class files ('''.es''' files) into single class files ('''.e''' files).
|
||||
==Inheritance Snippet==
|
||||
Any type defined in a CodeDom tree to be consumed by the Eiffel CodeDom Provider may include one (and only one) snippet member that includes an inheritance clause declaration. This ''inheritance snippet'' must start with the keyword '''inherit''' and follows the Eiffel syntax for inheritance clauses. All the feature adaptations available in the Eiffel language may be used in such a snippet ('''rename''', '''export''', '''undefine''', '''redefine''', '''select''').
|
||||
|
||||
|
||||
{{note|The CodeDom tree itself might define additional inheritance clauses in which case the Eiffel CodeDom Provider will merge the snippet and the implicit clauses in the generated source file. }}
|
||||
|
||||
==Indexing Snippet and Precompiled Libraries==
|
||||
Another interesting snippet member is the ''indexing clause snippet'' which must start with the '''indexing''' keyword and follows the Eiffel syntax for indexing clauses. This snippet may include the indexing clause '''precompile_definition_file''' which can be used to specify the path to the precompiled library ACE file to be used by the Eiffel CodeDom Compiler. This is specially useful in ASP.NET pages where each page can specify which precompiled ACE file to use when compiling it. This path will be used instead of the path defined in the [[Configuration|configuration file]] .
|
||||
Another interesting snippet member is the ''indexing clause snippet'' which must start with the '''indexing''' keyword and follows the Eiffel syntax for indexing clauses. This snippet may include the indexing clause '''precompile_definition_file''' which can be used to specify the path to the precompiled library ACE file to be used by the Eiffel CodeDom Compiler. This is specially useful in ASP.NET pages where each page can specify which precompiled ACE file to use when compiling it. This path will be used instead of the path defined in the [[Configuration|configuration file]].
|
||||
|
||||
|
||||
{{note|Only one class per compile unit should define a path to the precompiled library ACE file. If more than one class contain a '''precompile_definition_file''' indexing clause then there is no guarentee on which one the Eiffel CodeDom Compiler will use. }}
|
||||
|
||||
==Eiffel Configuration==
|
||||
There are several Eiffel specific settings that can be set in the Eiffel CodeDom Provider which will affect the generated code as well as the CodeDom compiler behavior. These settings are covered in the [[Configuration|Configuration]] section.
|
||||
{{seealso|[[eSplitter|eSplitter]] , [[Configuration|Configuration]] }}
|
||||
|
||||
|
||||
{{seealso|[[eSplitter|eSplitter]], [[Configuration|Configuration]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,15 +2,17 @@
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|b6197932-4bcb-c79b-afe2-1a8f36dbbd7c]]
|
||||
For certain tools (including ASP.NET) to detect the availability of a CodeDom Provider, the corresponding assembly name must be listed in the .NET machine wide configuration file typically located in:
|
||||
<code>%SYSTEM_DRIVE%\Windows\Microsoft.NET\Framework\vx.x.xxxx\CONFIG\machine.config</code>
|
||||
<code>
|
||||
%SYSTEM_DRIVE%\Windows\Microsoft.NET\Framework\vx.x.xxxx\CONFIG\machine.config</code>
|
||||
(where vx.x.xxxx corresponds to the .NET Framework version number). The available CodeDom Providers are listed under the ''<compilers>'' XML node. The Eiffel CodeDom Provider implements a.NET Installer class so that should you need to add the Eiffel CodeDom Provider to the machine configuration file, simply run the .NET SDK command line utility ''InstallUtil'' as follows:
|
||||
<code>InstallUtil EiffelSoftware.Codedom.dll</code>
|
||||
<code>
|
||||
InstallUtil EiffelSoftware.Codedom.dll</code>
|
||||
Conversely, should the Eiffel Codedom Provider not be required anymore, running the following command line will remove it from the ''machine.config'' file:
|
||||
<code>InstallUtil /u EiffelSoftware.Codedom.dll</code>
|
||||
<code>
|
||||
InstallUtil /u EiffelSoftware.Codedom.dll</code>
|
||||
|
||||
{{note|The '''Eiffel for ASP.NET''' installation program will take care of registering and unregistering the Eiffel CodeDom Provider properly. }}
|
||||
|
||||
{{seealso|[[Supported Constructs|Supported constructs]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|06e0c7ae-6d25-a0ef-81e6-2ee3c95fe4a1]]
|
||||
==Prerequesites==
|
||||
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.
|
||||
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 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 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. }}
|
||||
|
||||
{{seealso|[[Using Eiffel (to write ASP.NET pages)|Using Eiffel]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
[[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.
|
||||
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)
|
||||
@@ -11,7 +11,6 @@ Without IIS, ASP.NET pages cannot be loaded and thus the samples will not be ins
|
||||
==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.
|
||||
|
||||
{{seealso|[[CodeDom: Getting Started|Getting Started]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ However if an instance of <eiffel>STRING</eiffel> is passed as an argument to an
|
||||
|
||||
==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''.
|
||||
{{seealso|[[Names Mappings|Names Mapping]] }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user