Basics-Overview.xml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="Overview" role="nobrk">
  5. <title>Overview</title>
  6. <para><emphasis role="bold">E</emphasis>nterprise <emphasis
  7. role="bold">C</emphasis>ontrol <emphasis role="bold">L</emphasis>anguage
  8. (ECL)<indexterm>
  9. <primary><emphasis role="bold">ECL</emphasis></primary>
  10. </indexterm> has been designed specifically for huge data projects using
  11. the LexisNexis High Performance Computer Cluster (HPCC)<indexterm>
  12. <primary><emphasis role="bold">HPCC</emphasis></primary>
  13. </indexterm>. ECL’s extreme scalability comes from a design that allows
  14. you to leverage every query you create for re-use in subsequent queries as
  15. needed. To do this, ECL takes a Dictionary approach to building queries
  16. wherein each ECL definition defines an expression. Each previous Definition
  17. can then be used in succeeding ECL definitions—<emphasis>the language
  18. extends itself as you use it</emphasis>.</para>
  19. <sect2 id="Attributes_versus_Actions">
  20. <title>Definitions versus Actions</title>
  21. <para>Functionally, there are two types of ECL code: Definitions (AKA
  22. Attribute definitions) and executable Actions. Actions are not valid for
  23. use in expressions because they do not return values. Most ECL code is
  24. composed of definitions.</para>
  25. <para>Definitions only define <emphasis>what</emphasis> is to be done,
  26. they do not actually execute. This means that the ECL programmer should
  27. think in terms of writing code that specifies <emphasis>what</emphasis> to
  28. do rather than <emphasis>how</emphasis> to do it. This is an important
  29. concept in that, the programmer is telling the supercomputer
  30. <emphasis>what</emphasis> needs to happen and not directing <emphasis>how
  31. </emphasis>it must be accomplished. This frees the super-computer to
  32. optimize the actual execution in any way it needs to produce the desired
  33. result.</para>
  34. <para>A second consideration is: the order that Definitions appear in
  35. source code does not define their execution order—ECL is a non-procedural
  36. language<indexterm>
  37. <primary>non-procedural language</primary>
  38. </indexterm>. When an Action (such as OUTPUT) executes, all the
  39. Definitions it needs to use (drilling down to the lowest level Definitions
  40. upon which others are built) are compiled and optimized—in other words,
  41. unlike other programming languages, there is no inherent execution order
  42. implicit in the order that definitions appear in source code (although
  43. there is a necessary order for compilation to occur without error—forward
  44. reference<indexterm>
  45. <primary>forward reference</primary>
  46. </indexterm>s are not allowed). This concept of “orderless execution”
  47. requires a different mindset from standard, order-dependent programming
  48. languages because it makes the code appear to execute “all at
  49. once.”</para>
  50. </sect2>
  51. <sect2 id="Syntax_Issues">
  52. <title>Syntax Issues</title>
  53. <para>ECL is not case-sensitive. White space is ignored, allowing
  54. formatting for readability as needed.</para>
  55. <para>Comments in ECL code are supported. Block comments must be delimited
  56. with /* and */.</para>
  57. <programlisting>/* this is a block comment - the terminator can be on the same line
  58. or any succeeding line – everything in between is ignored */</programlisting>
  59. <para>Single-line comments must begin with //.</para>
  60. <programlisting>// this is a one-line comment</programlisting>
  61. <para>ECL uses the standard <emphasis>object.property</emphasis> syntax
  62. used by many other programming languages (however, ECL is not an
  63. object-oriented language) to qualify Definition scope and disambiguate
  64. field references within tables:</para>
  65. <programlisting>ModuleName.Definition //reference an definition from another module/folder</programlisting>
  66. <programlisting>Dataset.Field //reference a field in a dataset or recordset</programlisting>
  67. </sect2>
  68. </sect1>