You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by an...@apache.org on 2019/12/25 09:32:30 UTC

[royale-docs] branch master updated: Update circular-dependencies.md

This is an automated email from the ASF dual-hosted git repository.

andreww pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/royale-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new b8c3e5a  Update circular-dependencies.md
b8c3e5a is described below

commit b8c3e5ad3f31a71e302b58b74631a30007fa6bc4
Author: Andrew Wetmore <an...@cottage14.com>
AuthorDate: Wed Dec 25 05:32:21 2019 -0400

    Update circular-dependencies.md
    
    Added permalink and description; subtitle; additional section header.
---
 .../migrate-an-existing-app/circular-dependencies.md                | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/create-an-application/migrate-an-existing-app/circular-dependencies.md b/create-an-application/migrate-an-existing-app/circular-dependencies.md
index 48db76b..80830ed 100644
--- a/create-an-application/migrate-an-existing-app/circular-dependencies.md
+++ b/create-an-application/migrate-an-existing-app/circular-dependencies.md
@@ -16,10 +16,12 @@
 
 layout: docpage
 title: Circular dependencies
-description: 
+description: Refactoring code to remove circular dependencies
+permalink: /create-an-application/migrate-an-existing-app/circular-dependencies
 ---
 # Circular dependencies
 
+Avoiding a pattern that can cause problems at compile-time
 
 
 In software, a circular dependency is a relation between two or more classes which either directly or indirectly depend on each other to function properly. An extreme example, which could not work, is:
@@ -55,6 +57,8 @@ GCC does not like circular dependencies that Flash allows. The reason is that, i
 
 Fortunately, the Royale compiler has an option called -remove-circulars that is on by default. It analyzes the code and determines which goog.require to remove so GCC won't complain about the circularities and can load the scripts in the right order. However, if you want to know how to refactor your code so that you don't create what GCC considers to be circular dependencies, read on.
 
+### Refactoring interdependent classes
+
 GCC recommends refactoring interdependent classes to use interfaces. Some folks believe that classes should never reference other classes, only interfaces. There are some advantages to this approach, but it is more work.
 
 You would define two interfaces like this: