I have a question about software architecture:
Imagine you have an application that load data about many persons from XML and process / utilize that data all across the application. In AS2 there will be no doubt - I will parse the XML and create ‘id’ sorted array of Person class instances. But in AS3, where sophisticated E4X XML is available I hesitate. Should I use designated data class or dispatch pieces of XML all across the application?
Thanks!
Daniel
This is first question in our Coaching Program.
We are happy, that it has started
And here is answer…
thanks for being our first paid member and for placing your first coaching question
Now let’s move to your questions..
The software architecture approach definitely depends on the scale of the project. None of the approach is completely wrong if it works as expected and at the same time it’s flexible, maintainable and scalable..
But in general I would not recommend to use XML data structures throughout the project code as you have described. Not speaking about the great advantage of using E4X it would still not be too scalable because when anything in your data needs to be changed then you will have to modify your code accessing XML structures at many places.
More better approach is to separate your data from your functionality and just use centralized Data Model within your application. This Data Model can just serve as a storage of all data and also represent the state of your application being implemented as a Singleton class…
if you want to read complete answer, consider sign up to our Coaching Program. After registration you can read whole answer as well as all others questions and answers from all current and future customers. And we are at Flexets are waiting for your next questions to get help you with your learning process in Flex, AIR, Flash or ActionScript.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Aug | ||||||
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |