Tag Archives: java

Deploying PlayFramework Apps in JBoss

After you created your web application you need to create the WAR file that will insert the framework and other dependent libs inside the folder that you specify: play war myapp -o myapp.war Now to deploy on JBoss, you need to do some changes on your WAR file: Create a file called jboss-web.xml in the [...]

Posted in Internet, play, Software Development | Also tagged , , | Leave a comment

[Play] Iterate over objects using jQuery

What if I want to navigate into each checkbox, radio of my html? You can do it pretty easily using jQuery.each function. In every checkbox element I want to send a post message to my Play Framework. jQuery.each($(‘:checkbox’), function() { $.post(‘@{myPlayMethod()}’, { itemValue: $(this).val() }) }); This code sends the html element value property to [...]

Posted in play | Also tagged , , , | Leave a comment

How to divide your GUI from your processing code?

Many students don’t know how to organize their code. Abstractions and Interfaces makes a difference when developing Java applications. What if your code was divided? For instance, if you have created a network application with a GUI (Graphical User Interface). The first approach is to put the code all together because it’s easier from the beginning. That’s wrong because it’s harder to find an error and you have to read a lot of garbage code like textBox.setValue

Posted in Software Development | Also tagged , , , | Leave a comment

Singleton Design Pattern problems?

The Singleton Pattern ensures a class has only one instance that provides a global point to access it. This design pattern is perfect for maintaining a set of configurations or other variables always available at run-time in your software. public static Singleton getInstance() { if (uniqueInstance == null) { uniqueInstance = new Singleton(); } return [...]

Posted in Software Development | Also tagged , , , | Leave a comment