Search Results

Search found 2 results on 1 pages for 'gfoley'.

Page 1/1 | 1 

  • Circular Dependency Solution

    - by gfoley
    Our current project has ran into a circular dependency issue. Our business logic assembly is using classes and static methods from our SharedLibrary assembly. The SharedLibrary contains a whole bunch of helper functions, such as a SQL Reader class, Enumerators, Global Variables, Error Handling, Logging and Validation. The SharedLibrary needs access to the Business objects, but the Business objects need access to SharedLibrary. The old developers solved this obvious code smell by replicating the functionality of the business objects in the shared library (very anti-DRY). I've spent a day now trying to read about my options to solve this but i'm hitting a dead end. I'm open to the idea of architecture redesign, but only as a last resort. So how can i have a Shared Helper Library which can access the business objects, with the business objects still accessing the Shared Helper Library?

    Read the article

  • Static Variables somehow maintaining state?

    - by gfoley
    I am working on an existing project, setup by another coder. I'm having some trouble understanding how state is being maintained between pages. There is a Class library which has some helper objects. Mostly these objects are just used for there static methods and rarely instantiated or inherited. This is an example class I'm testing with. public sealed class Application { public static string Test; } Now when i run something like the following in the base class of my page, I would expect the result to be "1: 2:Test" all the time (note that "1" is empty), but strangly its only this way the first time it is run. Then every time afterwards its "1:Test 2:Test". Somehow its maintaining the state of the static variable between pages and being refreshed?? Response.Write("1:" + SharedLibrary.Application.Test); SharedLibrary.Application.Test = "Test"; Response.Write(" 2:" + SharedLibrary.Application.Test); I need to create more classes like this, but want to understand why this is occurring in the first place. Many Thanks

    Read the article

1