Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought

Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Author Topic: Application Class Part of View?  (Read 4968 times)
Posts: 1

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

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?
Global Moderator
Hero Member
Posts: 2871

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

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.

Pages: [1]