Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Welcome, Guest. Please login or register.
May 27, 2017, 10:31:27 AM
Home Help Search Login Register
News: ATTENTION: Spambots must die! Humans must visit http://contact.futurescale.com to request forum access.
Pages: [1]
Print
Author Topic: Application Class Part of View?  (Read 4677 times)
nephiw
Newbie
*
Posts: 1


View Profile Email
« on: March 31, 2010, 12:10:04 AM »

In Flex and Flash you have what equates to a view component for the application entry point.  It is either an <mx:Application> or a document class.  This is not the case with Java, with the possible exception of when one uses netbeans GUI designer to create the GUI.  However, I am creating my GUI using swing components arranged by hand, and it seems logical that the application entry point not be part of the view.  Instead PureMVC is created first, then a login screen, and finally the main application.

So my question is, does this approach hold to the PureMVC gestalt?  Is there an advantage to starting with a view component that I am missing?  Basically, what is the the best approach for application entry with Java?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2866



View Profile WWW
« Reply #1 on: March 31, 2010, 10:06:33 AM »

My Java work has been on the server side, so what I know about Swing could fit in a matchbook without taking the matches out. However, I would venture there has to be some container that the components all go into at some point, a root node in the view hierarchy.

I would assume in a browser this be the JApplet class. So there you could get the init method being called when the browser starts the app, and that could get the facade instance, causing the PureMVC apparatus to be created. And you have a handle to the JApplet so you can set up listeners for the keyboard and mouse there if need be.

You basically just want to have the PureMVC apparatus mediate the root of the view hierarchy and then selected places in that hierarchy as need be.

-=Cliff>
Logged
Pages: [1]
Print
Jump to: