#107 Flux example JavaDoc

This commit is contained in:
Ilkka Seppala
2015-08-18 22:47:40 +03:00
parent 1ec86b732a
commit 25a2fc756d
2 changed files with 12 additions and 2 deletions

View File

@ -13,18 +13,23 @@ import com.iluwatar.flux.view.MenuView;
* applications. Flux eschews MVC in favor of a unidirectional data flow. When a user interacts with * applications. Flux eschews MVC in favor of a unidirectional data flow. When a user interacts with
* a React view, the view propagates an action through a central dispatcher, to the various stores that * a React view, the view propagates an action through a central dispatcher, to the various stores that
* hold the application's data and business logic, which updates all of the views that are affected. * hold the application's data and business logic, which updates all of the views that are affected.
* * <p>
* This example has two views: menu and content. They represent typical main menu and content area of * This example has two views: menu and content. They represent typical main menu and content area of
* a web page. When menu item is clicked it triggers events through the dispatcher. The events are * a web page. When menu item is clicked it triggers events through the dispatcher. The events are
* received and handled by the stores updating their data as needed. The stores then notify the views * received and handled by the stores updating their data as needed. The stores then notify the views
* that they should rerender themselves. * that they should rerender themselves.
* * <p>
* http://facebook.github.io/flux/docs/overview.html * http://facebook.github.io/flux/docs/overview.html
* *
*/ */
public class App { public class App {
/**
* Program entry point
* @param args command line args
*/
public static void main( String[] args ) { public static void main( String[] args ) {
// initialize and wire the system // initialize and wire the system
MenuStore menuStore = new MenuStore(); MenuStore menuStore = new MenuStore();
Dispatcher.getInstance().registerStore(menuStore); Dispatcher.getInstance().registerStore(menuStore);

View File

@ -4,6 +4,11 @@ import org.junit.Test;
import com.iluwatar.flux.app.App; import com.iluwatar.flux.app.App;
/**
*
* Application test
*
*/
public class AppTest { public class AppTest {
@Test @Test