Simple PureMVC Application on GitHub

For my talk tomorrow on constructing a simple PureMVC application I have uploaded the source to GitHub. This is my first proper submit to GitHub so fingers crossed it’s all gone to plan.

http://github.com/newtriks/SimplePMVCExample

For this application I also quickly put together some other resources that may be of some use to use as references to start building a Flex application. These include:

These are put in purely as a potential starting point to get going in these areas and are not perfect, but should be useful. This provides a simple Flex application which is constructed on PureMVC with unit testing, documentation and build scripts.

This entry was posted in ANT, ASDoc, Flex, GitHub, Presentations, PureMVC and tagged , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

3 Comments

  1. Posted January 27, 2010 at 10:23 pm | Permalink

    Hi Simon,
    I looked at the source code and I would like to point out that adding event handlers to component’s children is a BAD PRACTICE – view.submit_btn.addEventListener( MouseEvent.CLICK, handleSubmitClick );
    You should have view.addEventListenet(TwitterView.SUBMIT, handleSubmitClick);TwitterViewMediator.as
    You should define static constant for event type SUBMIT on TwitterView component. ‘Submit’ button would dispatch an event object of the Event type = TwitterView.SUBMIT. This way TwitterViewMediator can listen for TwiiterView.SUBMIT event.

    The same for view.twitterID_txt.length in handleSubmitClick(). Do NOT access properties on component’s children. Create Bindable public property.

    Mariush T.

  2. Posted January 27, 2010 at 10:57 pm | Permalink

    Hah, yeh good point Mariush, I can and will defend myself to a degree on that one though, but I am sure most people are aware of that commonly known bad practice ;)

    This was an app I put up for a user group presentation and was more on framework development as opposed to Flex best practices. At the presentation I explained that I normally dispatch an Event from the view component and pick it up in the Mediator as you describe (see any of my other examples and you will see the trend). This is more a app for me to discuss the framework as opposed to teaching best practices with Flex and Events and was built in my limited spare time and I am sure there are other areas which could be very much improved. It’s like Joel’s app where he does the same (it stuck in my mind after all this time :) ), the focus is more teaching the bigger picture of the specific demo.

    The guys/girls I presented to are Flash/Flex devs and know bad practice elements and didn’t need me pointing out the obvious, plus the view was just simple components so meant I didn’t need to concentrate on it at all, just simply teach around the Mediator.

    Ooooooh I did get defensive about bad practices :D

    But you have made a point which is valid and to dev’s out there not as familiar this may become problematic so I will amend, maybe Rob Penners AS3 signals would be even better practice ;)

  3. Posted January 27, 2010 at 11:12 pm | Permalink

    I’d agree with Simon here, he did actually say at the meet that there are better ways to to do this, but he was trying to put together a basic demonstration application to talk around and I don’t think adhering to best practice on an intro really matters in that context – what does matter is that we understood the concepts. Today I was presenting some Flash training and realised I’d used a poor variable name in my course notes, and it actually helped to say in this session ‘and don’t do THIS because it’s actually a bit naughty, because…’ – in hindsight that was better than actually doing it right the first time ;)

4 Trackbacks

  1. By Excluding packages in ASDoc Builds Using ANT on January 22, 2010 at 8:58 pm

    [...] Excluding packages in ASDoc Builds Using ANT By newtriks | January 22nd, 2010 « Flex DateField TextInput Alignment Problem Simple PureMVC Application on GitHub » [...]

  2. By uberVU - social comments on January 24, 2010 at 3:51 pm

    Social comments and analytics for this post…

    This post was mentioned on Twitter by newtriks: Blog to Twitter update – newtriks published a new post: Simple PureMVC Application on GitHub http://cli.gs/hmp7p...

  3. By Importing to IntelliJ IDEA From GitHub on January 25, 2010 at 11:57 am

    [...] Importing to IntelliJ IDEA From GitHub By newtriks | January 25th, 2010 « Simple PureMVC Application on GitHub [...]

  4. [...] Simple PureMVC Application on GitHub [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • FreeAgent sign-up


  • Recent Posts

  • Categories