If you don't have a good grasp of OO reusability, be prepared to rip it up and start over again... repeat as necessary.
Organisation is the name of the game.
Well, let's say you're creating your first C++ program and you choose, say, "Hello World". How concerned are you with OO reusability?
I'm just picking up Flex and have a small program idea to play around with to get used to Actionscript and MXML. I've got a good grasp on OOAD and OOP, I'm just not sure how that matter at the moment.
Man Oh Man! What is wrong with the Feminist Daycare Generation? Every little thing is a threat to their egomania.
You can do it sweetheart. All you need is CONFIDENCE. You can do anything... pur..
Sorry, didn't mean to come off snarky. I'll try this again.
I'm going to be loading data from a MySQL server via PHP and displaying it on a Flex page. I'll also be using Actionscript to play with the values that I bring into the page. Should I be looking to display the values in a datagrid and then using the values in the datagrid to do my computations, or should I be loading it into an arraycollection to do the math?
That will be the least of your problems. Try both and see which one works best.
You have a lot of work to do. Try things, fail, read tutorials. There's a million ways to make a game.
1 person found this helpful
Meshgraphics is actually spot on, there's probably no shortcut to just trying a bunch of stuff and hit the walls. I think if I were doing it I would take your second approach of returning the data as an AC and then maybe create new objects within Flex out of that data. So I'd probably use the db to store data then bring it in and create team objects, game objects etc, whereever you're going with it. I think that would give you the best experience using Flex because you'll have to deal with creating objects in ActionScript and figure out how databinding might help you with the display of properties. Sounds like it would be fun to at least have some project in mind as you experiment.
Thanks. It's mainly my unfamiliarity with Flex that causes me to ask the question. In the languages I've learned it's been better to use the arrays, just didn't know if it was easier/more effective in Flex to use an array or manipulate objects like datagrids. I do plan on banging away and trying out things in Flex, was just stuck out of the starting gate cause I didn't want to pick up a bad habit right off the hop. Could have been that arrays were horrible in Flex.
Anyways, thx again.
Nothing at all wrong with arrays or, in Flex, array collections (which carry with them some databinding capability that plain arrays don't have). But the arrays might be arrays of objects like teams or venues or games which are themselves custom classes that you create, much like in java or whatever other languages you're using. The datagrid itself doesn't really enter the equation imho except as one way to display data. The data provider for the datagrid is where the action is - the actual data itself which will be constructs that you create be they custom classes call Teams and Games etc or just a collection of properties. That's why it's always tough to say what's the "best" approach.
Since one of the things that make Flex a bit different than Flash or other languages is the concept of databinding, it's probably worth your while to get a sense of what's under the hood with that. Michael Labriola's presentation is a pretty good starting place.
I've been going over some tutorials and picking up a lot of info and it's making sense so far. I like Flex, and I'm pretty sure I can get it to do what I want it to. I do have another question though that's been plaguing me. Is there an easy way of grabbing the data out of an array or array collection and dynamically display it? For example, this is my proposed layout:
Combobox (To select which team to load)
Player Hitting Speed Power Fielding ect ect.
1 10 5 8 12 - -
2 12 4 9 8 - -
" " " " " " "
I'm going to have 9 players to start, and 7 columns. I was hoping that there was a container that I could use to organize the 63 fields and populate through a loop from a 2d array, instead of having 63 labels/text fields and loading individually (p1Player, p1Hit, p1Speed......p2Player, ect.)
I'm thinking a grid, but from what I've seen, a grid is just a grid to hold other objects, so I still end up with 63 objects. Any suggetions?