PDA

View Full Version : How to approach this project?


MrDerek
01-08-2009, 03:27 PM
Hi there, I have been trying to learn flex for the past 3-4 months (on and off) and i'm getting nowhere. I want to create this project but i can't seem to find anything to help me, I was wondering wherther if you guys could point me my path.

me and my background
I've went through a lot of different resources to try and get myself up to speed but non of them is contributing to my project and they're all going over the same things over and over again.

I understand the similarities between mxml and html, I know how to layout an application, how to create a basic application with pages and what-not. What I dont understand is the concepts behind the programming and data handling. I'm not a programmer, I know enough to get myself around several languages, html, xhtml, AS2, javascript etc. but with flex i feel completely lost.

My Project
This is what i want to do. I have an xml file containing some data. I want to pass this xml file into flex and display the data in a datagrid. I then want to give the user the ability to sort, search and filter this data with drop down boxes and what not.

My many problems
In short, i really don't know where to start. I've been doing a lot of research and i come across terms like E4X and arraycollections but nowhere i can find explains how everything works and ties together.

(i think) i have a basic idea of how the application might work but i need to drill down into the specifics... This is my thoughts...
import xml file (via httprequest)?
convert to a format that would work (E4X)?
create several more (of the above) for specific categories, to be filtered
link the main set of data to a data grid
link sub sets of data to buttons and drop down boxes etc.

as you can see i am very lost, so i guess, to put it simply..... help me please? If you have anything at all please leave a reply. how i should approach this, articles/videos/things you think could help me, explanations... anything at all.

My apologies
I know what i'm asking is unreasonable but I really can't find anything else. Maybe what i'm trying to achieve is way above my level but this does need to be done so if you can spare a few minutes to lend me a hand I would greatly appreciate it.

Thanks for your time,
~Derek

Peter Cowling
01-08-2009, 06:09 PM
Hello,

Your suggested approach:

1. import xml file (via httprequest)?
2. convert to a format that would work (E4X)?
3. create several more (of the above) for specific categories, to be filtered
4. link the main set of data to a data grid
5. link sub sets of data to buttons and drop down boxes etc.

1 and 2 are fine.
3. No need strictly to create more than data collection to work with, but it might well be a good thing to do - depends on how much data we are talking about and what you want to do with it.
4. Yep, just make it your dataprovider.
5. Not so sure about that - as per 3, it comes down to the use case.

So, you are heading in the right direction, and I would be able to give some more detailed thoughts if you could describe the data (volume and depth/width nodes).

Re. the articles and so on, I would start off with this (http://blog.flexexamples.com/2007/07/26/displaying-xml-data-in-a-datagrid/), get your data into the grid, and then look to start doing your filtering/sorting etc. as a second step.

HTH

______________
Art Connect (http://www.loveart-gallery.com/art-blog-reviews/2009/01/06/hungry-hyaena/)

MrDerek
01-09-2009, 09:45 AM
Thank you, that helped a lot.

This is what my xml file consists of-


<tools>
<tool>
<name>Gapminder</name>
<url>http://graphs.gapminder.org/world/</url>
<description>Generate graphs with colourful geographic information.</description>
<devtool>yes</devtool>
<suptool>no</suptool>
<mr>yes</mr>
<img>images/screens/gapminder.png</img>
</tool>
<tool>
...etc...
</tool>
</tools>


and about 15 other 'tool'. What this is, is a collection of useful online tools for teachers.
I've then sorted these into 3 groups, 'Developing Tools', 'Support Tools' and 'Multimedia and References'. I wanted to give the user the option of viewing a specific group so i need a way of displaying only those with a "yes" under 'devtool' for example.

oh and i also wanted to display images too, this would be done via an item render i assume.

thanks for your help, hope to hear from you soon.

~Derek

Peter Cowling
01-09-2009, 12:35 PM
Hello,

okay once you have your datagrid set up, I would explore this example (http://www.preterra.com/flexsamples/gridsearch/gridsearch.html) for search on the datagrid. (Right click to see the source code, and note that it is case sensitive - you could do something about that pretty easily if it matters.)

For filtering from multiple sources, you could check this (http://www.cflex.net/showFileDetails.cfm?ObjectID=657) out. I have not used the code, so am not 100% sure about it, but I had a quick look through and it looks okay.

Yep: an item renderer would allow you to include an image.

sydd_hu
01-11-2009, 06:10 PM
http://www.adobe.com/devnet/flex/videotraining/

When i begun to use flex i watched these vidoes all day :P
If you watch them until the end of day 3 you wont have any big problems with flex.