Announcement Announcement Module
No announcement yet.
Conditional application context Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Conditional application context

    Hello everyone,

    I have a question or maybe an idea:

    I want to build an application that would be ported to Web as swf and AIR app also. Web application would be very similar to AIR but there are some classes that acts different on data saving. One saves data to local disk and other sends data to server. Of course they do implement same interface.

    On one side I could make to different application-context.xml files, and map different classes in them but I feel that it would to messy and hard to track and apply changes on both files. So I'd like to have something like "conditional compilation".

    Thanks for ideas in advance!

  • #2

    you could split up the application context xml files into separate files that are included depending on the platform the app is running on. This could be a simple if/else where addConfigLocation() is called with the correct path to the xml file.

    You could also do actual conditional compilation: