<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    ManagentConsolePatterns
</h3>
<span style="margin-bottom: 10px;">
    modified by <a href="http://community.jboss.org/people/heiko.braun%40jboss.com">Heiko Braun</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/docs/DOC-16462">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>This article outlines the core patterns that being used with the JBoss AS 7 Web Management Console.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3>Model View Presenter</h3><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>A derivation of the good old MVC, that considered being best practice in the GWT community.</p><p>The main motivation for this pattern is simplify testing of GWT applications by keeping the actual views</p><p>as dumb as possible. Some introductions can be found here: </p><p style="margin-top: 1em; line-height: 18px;">- <a class="jive-link-external-small" href="http://martinfowler.com/eaaDev/ModelViewPresenter.html">Model View Presenter Pattern</a> (Martin Fowler)<br/>- <a class="jive-link-external-small" href="http://code.google.com/intl/nl/events/io/sessions/GoogleWebToolkitBestPractices.html">Best Practices For Architecting Your GWT App (05/27/2009)</a> (2009-05-27)<br/>- <a class="jive-link-external-small" href="http://googletesting.blogspot.com/2009/02/with-all-sport-drug-scandals-of-late.html">TotT: Be an MVP of GUI Testing</a> (2009-02-05)<br/>- <a class="jive-link-external-small" href="http://googletesting.blogspot.com/2009/08/tott-testing-gwt-without-gwttest.html">TotT: Testing GWT without GwtTestCase</a> (2009-08-08)</p><p style="margin-top: 1em; line-height: 18px;">After some considerations, we decided to stick with the <a class="jive-link-external-small" href="http://code.google.com/p/gwt-platform/wiki/GettingStarted">GWT-Platform</a> library, which seems to be a well-thought-of implementation of an MVP API. Besides meta data driven approach (annotations, boilerplate), it also supports hierarchical presenters and more sophisticated use cases through the use of presenter proxies (authentication, code splitting, etc).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h4>Relationships</h4><p>Example taken from the current codebase (server/threads/...)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a href="http://community.jboss.org/servlet/JiveServlet/showImage/102-16462-9-11324/mvp-example.png"><span> http://community.jboss.org/servlet/JiveServlet/downloadImage/102-16462-9-11324/450-360/mvp-example.png </span></a></p><h4>Source Code Examples</h4><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>- <a class="jive-link-external-small" href="https://github.com/heiko-braun/as7-console/blob/master/standalone/src/main/java/org/jboss/as/console/client/server/deployments/DeploymentToolPresenter.java">A presenter implementation</a><span> </span></p><p><span>- <a class="jive-link-external-small" href="https://github.com/heiko-braun/as7-console/blob/master/standalone/src/main/java/org/jboss/as/console/client/server/deployments/DeploymentToolViewImpl.java">A corresponding view</a><br/></span></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="http://community.jboss.org/docs/DOC-16462">going to Community</a></p>

        <p style="margin: 0;">Create a new document in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>