Thursday, February 12, 2009

JavaFX: immature

If you're reading this now, you're one of two people:
  • A Flash advocate, wondering what competition JavaFX might be bringing to the table
  • A Java developer, looking to see how your existing skills might now make you capable of creating flash-like web RIA's.
Well, I am the latter.

In my web development with FreeLance Webs, my customers often desire "Flashy" and graphically intense websites, in order say to the potential customer, "We are amazing! We are serious! We know how to stun you graphically!" It's no secret that a customer won't take you serious if your website looks like a 1995 AOL Special.

This has led me to working with Adobe Flash much more than I'd ever have liked to. Ranging from full-flash sites, such as xpandinc.com, to little flash animations such as weberslandscaping.com and the animated limousine at motion-limo.com, my experiences have always been painful ones.

So when I heard about JavaFX, my interest was peeked. Can I now develop the same flashy interfaces for my customers, but with the ease of the Java environments I'm used to?

Well I don't have a conclusion yet. I intend to blog at a later date when JavaFX is a little more mature and some kinks are worked out. Here's some of the kinks I've hit so far:

  • All JavaFX demos I've found so far (that work) are essentially a runnable Java download, which then runs in its own window, outside of the browser. This is not what web developers are looking for.
  • JavaFX runs on your JRE plugin for your browser, and I'm hitting a lot of JavaFX demos which won't run for me. I'll get a message saying that I must download JRE 6.0, I'll then download and install the JRE, and then the JavaFX Demo will not run at all. I'll sit and watch some stupid "loading cycle" spin infinitely:
Hopefully I'll be reporting back with something a little more impressive from JavaFX. So far, it only seems to be a matter of distribution and deployment which thwarts them.

Monday, October 6, 2008

Get the Alphabet with Java!

This may be an embarrassing thing to admit, but I was momentarily stumped this morning when I had a need to iterate over the English alphabet with Java 1.5 ... I've been a Sun Microsystems Certified Java Programmer for 3 years now, yet this little thing got me!

Well, here's my solution, which I'm posting up now in hopes that someone with the same need may do a google search and find this post =)

char letter;
for (letter='a'; letter <= 'z'; letter++) { System.out.println( letter ); }


Simple, right!?

If you find this helpful, please leave a comment and let me know!

Wednesday, July 23, 2008

MyEclipse 6 HTML Editor!

My Adobe DreamWeaver CS3 subscription expired the other day, and only moments before having to deal with an urgent client request for a website change. This was nothing server-side related, just a static change to a page.

3 years ago, I would have popped open a MS Notepad and made the change within the archaic wall of text presented to me by an ancient ANSI editor... But I've grown enough since then to learn that being efficient with a tool is far more important than being cool enough to work without a tool.

So, in my limited amount of time, I scrambled for a quick way to make my change with a tool, but without DreamWeaver. I forgot I had installed MyEclipse 6.0.1 on my machine months ago, but noticed it when right clicking on the file needing editing...

"Edit with MyEclipse 6.0.1 HTML Editor" ... Hmmm... Sure, I'll try that.

BAH-DA-BING! An exact wysiwyg representation of my page popped up and displayed my page more accurately than DreamWeaver ever did. The wysiwyg lacked a lot of the common shortcomings which most suffer from. I was so impressed by how smooth this tool was, that I went on to develop my next client's entire website in ME 6. You can see that work at motion-limo.com.

In conclusion, I have found that ME6 makes a better Visual HTML Editor than DreamWeaver does, even if it does lack some of the easy FTP features and things which DreamWeaver offers. I'll be saving my money from here on out and sticking with ME6!

Friday, March 7, 2008

HIBERNATE!

You've got fictional objects, in an abstract world. It is these very abstract objects, conceptualized in your mind and painted onto your canvas known as RAM, which holds all the key data of your application.

What is your user? An OBJECT!
What is their car? An OBJECT!
What is their login date? An OBJECT!
Their address?? OBJECT!

But how do we turn these abstract thoughts in memory into persistant physical data?? KABLAMO - HIBERNATE! Hibernate says "Give Me You're object, I'll store it away, and you just let me know when you want it back."

Hibernate maps to any popular database, even if only remotely popular. So far I've mapped to Oracle, MySQL, and HSQL. Sometimes even simultaneously, although not in a managed environment.

Now I've got ambitions of using some reflection to develop my own ORM. It just sounds fun. If I were to developer my own ORM, I'd name it:
stORM


Thursday, February 14, 2008

Ajax - the cons!

As a web application developer, I've finally matured past the initial googly-eyed excitement that Ajax brings. I don't think I need to enumerate the pros of AJAX technology, as it is this very excitement which turned a javascript-hack into a contemporary web application paradigm.

However, I would like to enumerate the cons. The browser, in which all web applications run, has many basic functions which all users have become familiar with. More importantly, these are functions which many even rely on.
  • The Back button
    • Whether you made a mistake, or are moving through a search list, you need your back back button.
  • The Refresh/Reload button
    • You need to refresh your current content for many reasons. Maybe you're waiting for a message in your inbox, maybe you're testing changes on an individual page. Maybe the complex web application your using is hanging up and you simply want to recapture your current view.
  • Bookmarking
    • URLs are hard to remember, and even harder to remember how you found out about them in the first place. Bookmarking is the solution.

These are all tools your browser provides by keeping track of your location in a website, and where you navigate to. But, what if your browser isn't aware of any of your navigation? All of your navigation was asynchronous, and all of this important work you've done existed within a
element somewhere on your page. What if you need to refresh, bookmark, or "go back" now? Well, then you're just S.O.L.
  • The "Back" button will likely try to exit the current website altogether and bring you to your previous website.

  • Your "Refresh" button will refresh the entire page to it's original view, regardless of what important tasks you accomplished asynchronously within a block level element on the page somewhere.

  • Your "Bookmark" will behave similarly.
Depending on your server-side technology, many other complications can come into play, regarding troubleshooting. Additionally, AJAX is a mighty magic to wield, so with it comes much responsibility; breaking away from good usability standards is all too easy to do once you're "having fun" with AJAX.


Is it worth it?

A slice of AJAX here and a dash of AJAX there, only when appropriate, can bring fun and richness into an application without breaking the browser tools your users need. A whopping portion of AJAX dependency can not only richen your user's experience, but also crush it. How far you want to take it is your decision, but I'll be avoiding the double edged sword.

Friday, November 16, 2007

Hit songs about drop menus!

Whenever I hear that Rihanna song, "Umbrella," I immediately start thinking css drop menus.

"L-I , L-I, L-I, L-I,
A A A A"

I just immediately pictures this in my head:
<li><a>
<li><a>
<li><a>
<li><a>

lol

Well anyways, I checked out the backbase framework for ajax. I haven't accomplished a WHOLE lot with it, but I can say that it is a wonderful client-side solution for things like pop-up calendar date selectors, and customize input selectors and things. I was able to use it to asynchronously import a form into a part of a webpage, and then process the information in that form asynchronously. That was nice, and very simple!!

I think for simple, small websites, backbase will be a wonderful solution. I'll admit, after my frustrations experimenting with IceFaces, I don't want to even TRY to play with backbase's implementation of JSF with ajax components... It's not fun!

And besides, let's face it, AJAX isn't all it's cracked up to be. So, only a portion of your page updates instead of the whole thing - is that really worth losing basic browser functionality such as bookmarking and back button??

-Lance
freelance-webs.com

Thursday, November 8, 2007

First day of JOSUG

Today's JOSUG meeting has just started, Im sitting in this class as I typed this very blog entry. I'm disappointed that I'll need to leave by 10:30am for my 11am class; today we're covering AJAX technology which really gets my attention.

We'll see where this goes =)

Shorthand Steps:
  • create an XMLHttpRequest
    • worry about browser creation
  • open() to inititialze connection
    • requester.open("POST" , "/actionPage");
  • send() to send actual data
  • Event listener determines when the object has finished processing
  • Set up a function to handle when readyState is changed to 4
Possible AJAX frameworks:
  • Backbase
    • works independent to whatever server side technology you use
    • has a JSF implementation as well for JSF developers
  • Dojo
  • Rico