Category Archives: Dong Shin

Dong Shin 04.20.2012

Dong Shin 04.19.2012

  • got GWTRequestFactory working with hibernate JPA..
  • to create GWT Request Factory with Hibernate…
    1. create a domain model class, e.g., Person.java
    2. create a server service class that contains EntityManagerFactory, e.g., PersonService.java
    3. create a service locator class that extends Locatorr<T, ID>, e.g., PersonLocator.java
    4. create a proxy interface in Client that extends EntityProxy and defines ProxyFor, e.g., PersonProxy
    5. create a request interface that extends RequestContext and defines service, e.g, PersonRequest
    6. create a request factory interface that initialize the request in step 5, e.g., PersonRequestFactory
    7. create a persistence.xml that defines database properties and object relation mappings
    8. create a orm.xml that defines entities used in persistence.xml

Dong Shin 04.18.2012

  • spent past few days going over GWT Request Factory tuorials. Not many helpful tutorials out there…. Phil’s GWT in action book helped a lot. The example projects from the book contains Maven projects, but need some tweaking to work in my environment.
  • got GWTRequestFactory project working
  • got Mike’s sandbox project working – hibernate stuff
  • working on GWTRequestFactory with Hibernate (PPM Database)
  • Basic JPA attribute mapping to XML

Dong Shin 04.06.2012

  • GWTLogger
    • moved logger to separate Maven Module, deployed
    • <dependency>
      <groupId>com.fgm.gwt</groupId>
      <artifactId>gwtLogger</artifactId>
      <version>0.0.1</version>
      </dependency>
    • added timer to Server Log – allows auto retrieval of logs in specified interval
    • re-arranged UI components
    • added filters for the columns
    • writing up how-to – done
      • gwtLogger – also added to Useful GWT Info page
      • sample GWT application located @ trunk/Sandbox_folders/DONG_SANDBOX/GWTLogger
  • Converting ProjectManager to Maven project

Dong Shin 04.05.2012

  • GWT Logger
    • Modified LoggerWindow class to handle both client and server logs based on the parameter passed in
    • migrated FGM javaUtils logging class – Log4Init and VisibilityLogger – to GWT Logger
    • created testing app for server logs
    • everything works!
    • started migrating the project to GWT library

Dong Shin 04.03.2012

  • finished up GWT Logger for client
    • uses same approach as Flex Logger
      • Logger logger = Logger.getLogger()
      • logger.warn (“message”), etc
    • event driven so logger window gets updates in real time.
    • SmartGWT GUI wrapper for Logger classes
      • SmartGWT DataSource wrapper – allows lots of buil-in filtering/sort capabilities
      • Record wrapper  for display
    • color coded levels
    • ComboBox filter for Level
  • started on Server Logger

Dong Shin 03.30.2012

  • Monthly Status – March 2012
    • Bug fixes
      • enhanced buttons for Project Assistant
      • fixed max_allowed_packet error for VisibilityScripting – need to increase to more than 1M
    • Pre-Demo(3/8) preparation
      • installed and tested Project Poroflio Manager (PPM) scripts for VisibilityScripting
      • list of scripts for PPM
        1. projects_under_budget – generates list of project that are under budget
        2. projects_overdue – generates list of overdue projects
        3. manager_under_budget – generates list of managers and projects who are underbuget
        4. projects_budgets – generates budget data for the project
        5. project_goals – generates goals data for the project
        6. project_financial_data – generates financial data for the project
      • created Flex Applications, ProjectDataGen, for generating financial data
        • same login as Project Assistand (PA)
        • generates Financial Data in XML format that Visibility ingests into the upload directory
    • Demo (3/13) at site
    • COGNOS(?) data analysis – still waiting for more information (raw data may help)
    • GWT Project Manager Application
      • generated DAO objects using HibernateTools
      • Login interface working
      • Project List interface working
      • created UI for Create/Copy/Edit project
      • updated MavenGWTEclipse Tutorial document as going thru to create a new Maven/GWT project
      • working on Logger for GWT
        • downloaded and integrated gwt-log. Good, but not good enough for our needs
        • converted Flex Logger from FGMUtils to Java classes
    • GWT Java OpenGL 3.0 LWJGL integration
      • lots of information from Phil
      • going over codes and FLTK information

Dong Shin 03.07.2012

  • prepping for demo and found some problems
    • Project Assistant Tutorial button not very button-like – fixed
    • need to take a look at ProjectAssistant.html inside to correct Flash Player download problem and eliminate auto-resize/scroll issues
    • max_allowed_packet error occurred – need to modify MySQL ini file to allow more than 1M
    • xml file creation/writing skips when max_allowed_packet error occurs. moved the code outside of the try-catch block.
  • Mavenized ResizeableControls and modified ProjectAssistant to use it instead of local reference.

Dong Shin 03.01.2012

  • Feb 2012 Status
    • Bug Fixes
      • Fixed Auto-fill not working in Financial Data Entry
      • Fixed Contacts not populating properly in Funding Request
      • Fixed Project Assistant not showing correct status
    • deployment
      • assist in deployment of Project Portfolio Manager/Project Assistant
      • built new Visibility and VisibilityScripting for demo
      • trouble-shooting Visibility deployment issues
    • reverse engineeered Project Portfolio database to use in GWT/Spring using Spring Roo and Hibernate Tools
    • Struts/Spring/Hibernate training
    • working on Project Portfolio Manager and Project Assistant using GWT/Spring

Dong Shin 02.10.2011

  • Spring Roo doesn’t parse complex tables (and relations) correctly. Somehow it throws exceptions when try to access some tables. Looking at other things.
  • Sidetracked to Spring, Hibernate, Struts2 training
    • very good video tutorial at http://javabrains.koushik.org/ (long, really long)
    • Hibernate Tools has capability to reverse engineer database
    • sample Hibernate project using MySQL
      • svn://fgmdev.com/trunk/Sandbox_folders/DONG_SANDBOX/HibernateProj
  • putting Maven, GWT, Spring, Hibernate together

Dong Shin 02.03.2012

import org.newdawn.slick.TrueTypeFont;

private TrueTypeFont font;

private TrueTypeFont font2;

public void init() {

// load a default java font
Font awtFont = new Font(“Times New Roman”, Font.BOLD, 24);
font = new TrueTypeFont(awtFont, antiAlias);

// load font from file
try {
InputStream inputStream = ResourceLoader.getResourceAsStream(“AnnabelScript.ttf”);
Font awtFont2 = Font.createFont(Font.TRUETYPE_FONT, inputStream);
awtFont2 = awtFont2.deriveFont(24f); // set font size
font2 = new TrueTypeFont(awtFont2, antiAlias);
} catch (Exception e) {
font2 = new TrueTypeFont(awtFont, antiAlias);
e.printStackTrace();
}

matStage.init();
}

public void render() {

GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
GL11.glOrtho(0, width, height, 0, 1, -1);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
Color.white.bind();

font.drawString(100, 50, “THE LIGHTWEIGHT JAVA GAMES LIBRARY”, Color.yellow);
font2.drawString(100, 100, “NICE LOOKING FONTS!”, Color.green);
GL11.glDisable(GL11.GL_BLEND);

}

Dong Shin 01.13.2012

  • LoadApplet GWT Application
    • http://www.fgmdev.com:8080/LoadApplet/LoadApplet.html
    • loads Java Applet specified in the main
    • uses JSNI to communicate with the Applet
    • Test3DApplet.java has examples of calling Applet’s methods and specifying the callback from the Applet
      • public native void setColor(String color) /*-{
        $wnd.document.getElementById(“myApplet”).getApplet().setColor(color);
        }-*/;

        public native void getFramerate(Test3DApplet x) /*-{
        $wnd.showFrameRate = function(frameRateStr) {
        x.@com.fgm.loadApplet.client.applet.Test3DApplet::showFrameRate(Ljava/lang/String;)(frameRateStr);
        }
        //        $wnd.showFrameRate(“01000”);
        $wnd.document.getElementById(‘myApplet’).getApplet().getFrameRate(
        “showFrameRate”);
        }-*/;

        public void showFrameRate(String frameRateStr) {
        GWT.log(“frameRate: ” + frameRateStr);
        frameLabel.setText(“Framerate: ” + frameRateStr);
        }

    • checked into /Sandbox_folders/DONG_SANDBOX/LoadApplet