Monday, August 25, 2008

Jython News!

Check out the latest Jython Monthly for some great news on the up and coming Jython 2.5 release. It is now in alpha stages, but it is looking great so far!

You can also read-up on using Django with Jython...good work Leo Soto! Also take this opportunity to ask all of your Jythonic questions of Jim Baker...a lead Jython developer. See newsletter for more details!

NetCAT 6.5 Update

I thought I'd give a brief update of the status on the NetCAT 6.5 testing. If you are unaware of what NetCAT is, please visit the site to learn more about it.

Thus far, it appears that Netbeans 6.5 is on track with the latest projections of a production release sometime in October. As you probably already know, the first beta release was distributed already and is available here. In the release, most of the new features are fully implemented. I will warn that there are some bugs obviously found in the release (expected because it is a beta) that could cause some minor issues in your development. For instance, the new "deploy on save" feature of Netbeans is nice but has many quirks at this time. If you are developing a JavaEE application, each time you save an XHMTL, JSP, or HTML file then the complete application is recompiled and deployed. I have found that this can lead to decreased productivity as it can cause workstation performance degradation as well as PermGen errors on the deployment application server. This is probably the largest bug I've seen since the beta release, so please do not allow it to keep you away from testing the release.

For those of you who have downloaded and tested the beta release, you already know that the IDE is looking great! Netbeans developers have been outstanding in repairing bugs and putting great new features into the IDE. Each new release of Netbeans brings it one step closer to "the only IDE you will ever need" in my book...but don't take my word, please test and see for yourself.

Before I post this blog I also want to mention that for those Grails developers in the community, Netbeans 6.5 is a must have! Productivity time is increased even more by using the combination of Grails with Netbeans. One of the advantages that Netbeans offers is the Grails plugin wizard...just right-click on your project to install or uninstall any Grails plugin. No need to make that trip to the website any longer for plugin updates!

Download 6.5 beta and enjoy...

Wednesday, August 13, 2008

Netbeans 6.5 Beta Is Available...Grab It and Test!

The Netbeans team has just released 6.5 beta. Having been testing the latest nightly builds, I think that you'll be pleased with the beta once you try it. The Groovy/Grails support is in great shape. New features have been added since M1, including a plugin manager and different application layout.

You'll also enjoy the automatic deploy on save feature. This really helps to speed up development time.

Congrats to the Netbeans team on delivering this beta of 6.5...it is looking so far.

Wednesday, August 06, 2008

Plan Your Events for Free - Gather Event Planning

Gather Event Planning is a free service that I started a few months ago to assist individuals or groups that are planning events. The service is based upon my open source reunion planning software. This service is web hosting which provides sites geared towards planning and organizing events such as reunions, meetings, or gatherings in general. Each Gather Event Planning website grants it's owner privileges to change all page content, administer mailing and guest lists, post news, etc.

Originally, I was planning to charge a minimal fee for the service in order to cover the costs of hosting. However, I've partnered up with another group to pay for the hosting and together we've produced Restoring The Roar a Chicago Blackhawks Hockey fan site. I've also partnered up with another associate who will be starting a website shortly. Gather Event Planning is now free thanks to the new partnerships.

So if you or someone you know needs to plan an event of any kind, please try out Gather Event Planning...and give me feedback!

Netbeans 6.5 - Project Properties Additions

Some of the nice new features of Netbeans 6.5 include Groovy and PHP support, automatic project deployment on save (which makes development time much quicker), and some new additions in the Project Properties menu. Allan Christensen blogs about the new Project-Based formatting option which is available. This gives you the ability to apply different formatting styles on a per-project basis.

Another nice new addition to the project properties menu is the Javascript Libraries. This allows you to choose from a set of default Javascript libraries (Yahoo User Interface, Dojo, etc) and add them to your project. This new option also gives you the ability to add your own libraries which is very handy.

Tuesday, July 29, 2008

Adding Groovy File Compilation To Any Netbeans Project

Many of you may already be aware that adding support for groovy file
compilation in any Netbeans project is easy. You can easily adjust the
build file to use the groovyc compiler. For those of you who do not know
how to do this, simply perform the following:

1) Adjust build.xml by adding the following target:

<target name="-pre-compile">
  classpath="${your.netbeans.groovy.library.classpath}" />
  <groovyc destdir="${classes.dir}"
  classpath="${ your.netbeans.groovy.library.classpath}"
  jointcompilationoptions="-j -Jsource=1.5 -Jtarget=1.5">
 
  </groovyc>
  </target>



2) Compile your project as normal!

All .groovy files will be compiled into Java...seamless integration. If you
are already using the "-pre-compile" target for another task, then name it
something else and adjust the build-impl.xml accordingly to include the new
target.

Tuesday, July 15, 2008

NetCAT 6.5 - Keeping Busy!

NetCAT 6.5 just started yesterday and I can say that there is a great group of Netbeans users from the community testing! This is sure to be a stellar release of the IDE, and if you've downloaded and tried M1 I am sure you will agree.

As Roman Strobl and Greg Sporar say...Happy Netbeaning...

Jython 2.5 Alpha Released!

Frank Wierzbicki of Sun Microsystems has just announced the release of Jython 2.5 Alpha 1. Click on the link above for the download...

More to come once I have a chance to play with it a while...

Monday, July 07, 2008

Netbeans 6.5 M1 Is Out!

Download it and start testing today! I downloaded the IDE this morning and I've been using it for most of the day. I have to say that it is in great shape! I especially love the added Groovy editor and faster startup time. Another great point is that I had no issues with importing projects and settings from 6.1.

Another great Netbeans release is on it's way!

Friday, June 20, 2008

Ask Frank! A Jython Interview with Frank Wierzbicki of Sun Microsystems

Jython Monthly Presents "Ask Frank"...a question and answer session with Frank Wierzbicki for the Jython community!

I've been in touch with Frank Wierzbicki of Sun Microsystems. In case you aren't aware, Frank is one of the top Jython developers, and earlier this year Sun Microsystems hired him to work on Jython full time!

He has agreed to answer questions from the community for our July 2008 newsletter. Gather your best questions and post them to the wiki at the URL below. If you have issues posting the questions on the wiki page, then please send them to me at juneau001@gmail.com so that they can be included. The deadline for posting questions is July 11th. After that time, Frank Wierzbicki will choose which ones he wishes to answer and we will include them in the next distribution.

Please post your questions to Ask Frank at: http://wiki.python.org/jython/JythonMonthly/Interviews/July2008/AskFrank and feel free to include your name/email address if you'd like.

Thanks in advance for your participation...this is a great opportunity for the Jython community.

Special thanks to Frank Wierzbicki for his time!

JBoss Seam - Interceptors Using Groovy - Quick Tip

Quick Tip: If you are using Groovy in any of your Seam applications (particularly when deploying to Glassfish), be sure to update the @Interceptors annotation in your session beans as such:

From: @Interceptors([org.jboss.seam.ejb.SeamInterceptor.class])

To: @Interceptors([org.jboss.seam.ejb.SeamInterceptor.class])

Thursday, June 19, 2008

Using Groovy with Seam 2.0 in Netbeans 6.1

Of course, Seam 2.0 is ready to go with Groovy support which is great news! However, for someone who is not interested in using Seam Gen it is not very straight forward. This is true especially if one wishes to use Eclipse or Netbeans for their development environment.

A while back, I wrote a blog about developing Seam applications on Netbeans and deploying to Glassfish (http://jj-blogger.blogspot.com/2007/07/jboss-seam-configurations-jars-and.html). I need to post an update blog because I am now deploying Seam 2.0 apps to Glassfish Version 2 using Netbeans. I'd like to add a bit of syntactic candy into the process now and include Groovy support into my Netbeans Seam projects.

Simply add the following to your build.xml file (contained within the root of your Netbeans project) and modify paths accordingly. You will also need to package groovy-all.jar with your application. Once completed, you can add Groovy files suffixed with .groovy into your project Seamlessly. At compile time, they will be compiled into Java classes.

<target name="-pre-compile">
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpath="${classpath-to-groovy}" />
<groovyc destdir="${classes.dir}">
<classpath>
<pathelement path="${classpath-to-groovy}"/>
</classpath>
<javac source="1.5" target="1.5" debug="on"/>
<src path="${src.dir}"/>
</groovyc>
</target>

Counting Rows in Oracle in a Generic Fashion

As a DBA, every once in a while it is useful to have the ability of searching through all of the tables within a particular database to find a value. This can be a useful thing to do if you need to find all references to a particular record in a database table. Most likely, this kind of operation would need to be performed in order to safely delete a record from a database that was not using referential integrity. I know that I administer at least one legacy database which does not utilize referential integrity much at all. One major downfall to not using referential integrity is that records can be unsafely deleted, potentially leaving dangling references throughout the database.

One could easily write a block of code to search for a particular value throughout all tables in the database by iteration using views such as USER_TABLES. I have done so myself on many occasions. So much, that I grew tired of coding new blocks of code to search for particular values each time I needed to do so. I finally took a few minutes to write a generic stored procedure which will load into any Oracle database schema, and it has the ability to perform a full table search any particular value. The procedure takes two parameters, column name (or value name) and value. By invoking the procedure and passing these two values, the database will search through all tables within a particular schema and find those values within the column name you have given. The one caveat is that some databases use different column names throughout the database for the same identifiers. For example, I work with a database that calls an employee id number ID in one table, and EMP_ID in another. You must account for such discrepancies when using this procedure.

The code for this generic counting solution is as follows:

create or replace
procedure check_object_counts(column_name_val IN varchar2,
column_value IN varchar2) is
cursor table_cur is
select table_name
from user_tab_columns
where column_name = upper(column_name_val);

row_count number := 0;

begin
DBMS_OUTPUT.PUT_LINE('THE ' || upper(COLUMN_NAME_VAL) || ' IS REFERENCED IN THE FOLLOWING TABLES:');
for table_rec in table_cur LOOP
EXECUTE IMMEDIATE 'select count(*) from ' ||table_rec.table_name ||
' where ' || column_name_val || ' = :THIS_OBJECT'
INTO ROW_COUNT
USING column_value;

if row_count > 0 then
DBMS_OUTPUT.PUT_LINE(table_rec.table_name || ' - ' || row_count || ' times ');
end if;

row_count := 0;

end LOOP;

end;
/

As stated previously, this procedure can be loaded into any schema which has CREATE ANY PROCEDURE privileges. You invoke it as such from within SQLPlus:

@check_object_counts('EMP_ID','10037E');

** By the way, be sure to use SET SERVEROUTPUT ON prior to running the script so that you see the output!

It may not be a catch all solution, but it does the trick 98% of the time! Best to you and happy DBA-ing!

Wednesday, June 11, 2008

TinyMCE Basics

I spent a good deal of time searching the web yesterday. I was trying to remember how to make the TinyMCE WYSIWYG editor allow all HTML tags. If you've never heard of this editor, it is an excellent AJAX based editor for your websites. I use it to allow my clients the ability to edit and create HTML on-the-fly without any knowledge of Javascript. Basically, it displays HTML as an OpenOffice (or Word) document would. You can simply highlight text and make it bold, italic, or underlined. It also allows the ability to post photos (as long as the photo is on the web) and much more.

The key to allowing straight HTML is to include the following configuration at the top of your webpage. TinyMCE will take any textarea and make it into a nice editor.

tinyMCE.init({
...
valid_elements : "a[href|target=_blank],strong/b,div[align],br"

})



Above is a basic configuration to allow certain html elements. In order to allow a more flexible amount of elements, just follow this link: http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements

Simple, eh...too bad I wasted some time searching for it when the answer was right in front of me...

Tuesday, June 10, 2008

JSF 2.0 Early Access Revew

Take a minute to download and read the JSF 2.0 Early Access Review doc.  It looks like JSF will be getting better, I just hope that Seam will also continue to evolve into an even better (doesn't seam like it can get much better..it is great now) framework for JSF/EJB.  Hopefully JSF 2.0 will have some added benefit in this process...

Wednesday, May 28, 2008

Great Seam Security Article for 2.1.0GA

Check out the link below for a great article that discusses the new security features in Seam 2.1.0GA!

http://shane.bryzak.com/blog/articles/seam_security_gets_an_upgrade

Friday, May 23, 2008

Java SE 7 - What would you like to see?

As always, The Java Posse had another great interview in show #187.  This time, they interviewed Danny Coward who is "Chief Architect of Sun's Client Software, and Sun's Java SE/EE representative on the Executive Committee for the JCP".  I highly recommend listening if you are interested in learning about the future of Java SE and what SE 7 may bring.

One of the interesting topics in the interview was about what will be included with Java SE 7.  I thought I'd start a blog post to capture some of the community's ideas about what should be included in the release.  

What would you like to see in the release of Java SE 7?

Wednesday, May 14, 2008

Jython Monthly Call for Articles - May 2008

Let's get Jython back in the spotlight!  Send in some articles about Jython for distribution in this month's newsletter.

Please post all articles/tutorials in the following area:  http://wiki.python.org/jython/JythonMonthly/Articles/May2008

All contributions are welcome!

Tuesday, May 13, 2008

Netbeans 6.1 - Facelets and Seam Support!

It is not official yet, but I learned that you can download and build the facelets and seam support projects for Netbeans while reading today's Netbeans newsletter.  I will give a thumbs up in the affirmative as I have followed the directions within the blog and successfully achieved Facelets and Seam support within 6.1!

Thanks for the excellent blog and for the time which was put forth in working on these projects!

Wednesday, April 30, 2008

Java 1.6 on OSX

I love my Mac even more today...Java SE 6 version 1.6.0_05 has finally been released (as if you hadn't already heard).  This is great news for any Mac Java developer!
Just remember, if you had installed a beta version of 1.6 then you will have to manually remove /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0 before you can get the update via Software Update.