Under My Palapa

Jason Young’s geek blog

Flex Builder is now Flash Builder

leave a comment »

Not that it matters much, but my post 10 months ago about the Flex brand has come to fruition.

So Flex is now just a framework, otherwise known as a library, at the core of Flash Builder.

I’m not big on Flex/Flash, but I know a lot of management-type people are. I try to use it sparingly.

Written by jaydfwtx

October 6, 2009 at 9:05 am

Posted in adobeflex, branding

Tagged with , ,

Apple Push Notification Service & Java

with one comment

If you look at the documentation for APNS, it is relatively straightforward. The main thing that is probably new to many Java developers is setting up the SSL connection.

Assuming you have followed the documentation from Apple, you should have a certificate for your Push App, as well as a private key. Export each of these individually into a ‘p12′ file, then cat them together. Not sure if order matters here, I put the certificate first.

KeyStore keyStore = KeyStore.getInstance("PKCS12");
keyStore.load(getClass().getResourceAsStream(P12FILE), KEYPASS.toCharArray())
KeyManagerFactory keyMgrFactory = KeyManagerFactory.getInstance("SunX509");
keyMgrFactory.init(keyStore, KEYPASS.toCharArray());

SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(keyMgrFactory.getKeyManagers(), null, null);
sslSocketFactory = sslContext.getSocketFactory();

sslSocket = (SSLSocket)sslSocketFactory.createSocket(HOST, PORT);
def cipherSuites = sslSocket.getSupportedCipherSuites();
sslSocket.setEnabledCipherSuites(cipherSuites);
sslSocket.startHandshake();

After this, you can grab the output stream of the socket and write to it. This is what works for me, of course there’s more to managing the socket, but this is the part that was not entirely obvious. You still have to encode your bytes correctly; the service is not very forgiving if you do it wrong. And without any response, you need to pay close attention to what you’re doing!

Written by jaydfwtx

August 23, 2009 at 11:16 pm

Posted in apple, iphone, java

Tagged with , , ,

Demanding a faster horse

with one comment

Apple definitely has success at developing organic growth, and a lot of that has to do with Jonathan Ive, at least when looking from the outside. In this blog post, the following excerpt jumps out at me. It really captures what frustrates me about working on enterprise software in a corporate environment.

“We don’t do focus groups,” Ive said firmly when asked how Apple decided what products to build. He explained that focus groups resulted in bland products designed not to offend anyone. (To which Sir Christopher added Henry Ford’s famous line that if he’d asked his customers what they wanted, they would have demanded a faster horse.)

The approach of cramming every feature possible into a piece of software is something I’m quite familiar with. When will companies start realizing they should be focusing more on what features to throw out?

Written by jaydfwtx

July 1, 2009 at 9:11 pm

Posted in uncategorized

Tagged with , ,

Glaring JavaFx Problem

leave a comment »

The concept that JavaFx cannot be embedded into an existing Swing application baffles the mind. There were hacks to do this in 1.1, and I have it working in 1.2 (minus mouse events), but to not support this in the official API is one of the strangest things I’ve seen. This would be the #1 way to drive adoption of JavaFx, yet Sun seems to be blind to this fact. There are plenty of Swing apps that could be enhanced to have some nice eye-candy charts, etc.

Written by jaydfwtx

June 12, 2009 at 7:45 pm

Posted in javafx

Tagged with ,

JavaOne 2009 Recap

leave a comment »

JavaOne 2009 is over, and it was my second year in a row to attend. Looking back, I would have chosen WWDC over JavaOne this year, as I feel I did not get as much out of the conference as I did last year. That is not to say there weren’t some very good sessions…

Highlights from my perspective:

  • Project Jigsaw (Java 7 modules) – the modularization of the JVM and application libraries has a lot of promise, and can help cut down on bloat. The keynote demo of this went well. The question of how this lives alongside OSGi is still open for me (although I have not researched this).
  • JavaFx 1.2 – the new platform seems to be maturing; the demo apps are getting better.
  • JavaFx Designer App – very nice to see Sun realizes this is an important aspect of JavaFx development. Without it, JavaFx will not have a chance long-term. It looked to me like they “borrowed” a lot from Apple’s Interface Builder, which is probably a good thing.
  • Java App Store – also nice to see Sun going a step further than Web Start and trying to improve the consumer deployment experience. In the end though, I think the App Store doesn’t have much of a chance. It will depend on the apps, but Sun will have to figure out a way to get people to install the App Store to begin with (JRE bundled?).
  • Ben Galbraith – his talks are always a highlight as he is probably the best speaker at JavaOne. His talk about software craftsmanship hit home, because I really want to work on projects where that is viewed as a priority. Making this happen in an enterprise environment is a tough order though.
  • Google – between the talk on Google App Engine, Guice, GWT, and the upcoming SiteBricks, it’s clear that Google is making a big investment in Java. I would have really liked to have seen Google acquire Sun, and maybe that would have made sense if Sun didn’t do hardware.

Lowlights

  • JavaFx 1.2 – it really broke with backwards compatibility. This is perhaps a good thing if it improves the platform, but it seemed to generate a lot of complaints. You really don’t want to upset developers of a new platform so much. Maybe this happened because JavaFx was released as 1.0 way too early, or maybe this year’s release should have been called 2.0.
  • General sessions – they seemed far more filled with what I would call advertising. I understand Intel was the main sponsor, but spending 20 minutes telling us how their new Xeons help improve performance is something that should be pretty obvious to most people. Are they going to come back every year and tell us that Moore’s Law still applies?
  • Larry Ellison – his proclamation that Ajax is no longer needed – hah! O RLY?
  • The food/beverage service – $3.50 for a 16oz soda? Really? And one beverage cart that I know of serving throughout the day? I think I dehydrated myself. Next time I’m going to be armed with several bottles of water of my own.
  • Course descriptions – the content catalog should ideally give a better idea of the target knowledge level that attendees should have. It sucks to go to a session where you learn nothing new because it is just an introductory level talk.

Written by jaydfwtx

June 8, 2009 at 10:35 pm

Posted in javafx, javaone

Tagged with ,

Bad Branding

leave a comment »

Whoever decided that Bank of America’s logo should appear atop a red background should be fired.

Unless they are preparing us for another version of the logo with white text, I don’t see why they went and did that. The new signs are ugly, and I honestly thought their sign installers made a mistake. Blue on top of red is just bad.

Written by jaydfwtx

March 27, 2009 at 10:46 am

Posted in branding, uncategorized

JavaOne 09

leave a comment »

Thanks to my employer, I’ll be attending JavaOne again this year. I enjoyed the experience last year, although it is a bit exhausting trying to maximize session attendance. Thankfully this year I can doubleteam the session lineup with a coworker, so I may feel less pressed to entirely fill my schedule with sessions I may not be interested in.

My favorite speaker last year was Ben Galbraiths, and in general the various talks dealing with Swing. Yes, that dead toolkit that people are abandoning for Adobe Flex. ;-) IMHO, the pendulum may ’swing’ back as people actually start trying to use Flex to build more complex applications.

Ultimately, I think we are pushing too much into the web browser. I want my web sites to be web sites, and my apps to be apps. I really don’t want a complicated user interface living inside of a web page. Finding this boundary is difficult, and pushing back on the people who ‘want it all’ is a tightrope that is difficult to walk. IMO, break out of the browser and into AIR if you want a complicated Flex app. Don’t shoehorn it into your website.

Written by jaydfwtx

March 24, 2009 at 8:45 pm

Posted in adobeflex, javaone, swing

Tagged with , ,

Flex Builder & Dogfood

leave a comment »

While using Flex Builder today, and pondering whether we should build a complex application using it, I had a thought. Why is Flex Builder built on Eclipse RCP, rather than with their own platform? The easy answer is that was what was quickest for them to get good IDE functionality.

Could Flex 4 potentially be an AIR application? Should it? Is it time for Adobe to eat their own dogfood? Continued use of Eclipse RCP basically implies to me that Flex is not intended for complex/intensive applications.

Written by jaydfwtx

February 20, 2009 at 1:45 pm

Posted in ria

Tagged with ,

Is Adobe ‘Flex’ being renamed?

with one comment

I just received a survey from Adobe through LinkedIn that suggests they are thinking about the naming of their Flash products. There are 3 products – the traditional Flash Profressional, Flex Builder, and the soon to be Catalyst (Thermo) product. Sounds like they want to dump the ‘Flex’ brand, and possibly align these as Flash Creator, Flash Catalyst, and Flash Builder. Makes sense to me.

[Update] Indeed, 10 months later Adobe has renamed Flex Builder to Flash Builder.

Written by jaydfwtx

December 23, 2008 at 11:37 am

Posted in ria

Tagged with , ,

Macbook upgrades

leave a comment »

My black Macbook is about 2 years old, and Apple says it is limited to 2GB of memory. However, unofficially it recognizes 3GB. I’ve been running with 3GB for over a month now without any problems.

Upgrading the memory is a breeze. You take out the battery, loosen 3 captive screws, and the memory slots are behind a metal strip. In addition to the memory, I upgraded to a 7200 RPM 320GB hard drive. Click the photo to link to several photos documenting the upgrade steps.

Written by jaydfwtx

December 22, 2008 at 8:31 pm

Posted in hardware

Tagged with , , ,

Weightbot

leave a comment »

I purchased Weightbot today, not because I necessarily wanted to track my weight in detail (although I do have a goal). I bought it to take a look at the app itself. IMO, it epitomizes what an iPhone app should be. Simple, does one thing very well, and fun to use.

While I think the basic Cocoa touch apps have a nice default look and feel, it is also interesting to see an app like this which basically uses very little (or none?) of the standard widgets.

Kudos to these guys for a great app, I’m sure they will be getting a ton of downloads as the New Year approaches.

Written by jaydfwtx

December 21, 2008 at 9:16 pm

Posted in iphone

Tagged with ,

Prop 8 Results

leave a comment »

Since part of what I do is try to make data understandable and interpretable, I feel this post fits with my overall blog theme.

At first glance, it looks like the African-American vote is what accounted for the passing of Prop 8 in California. It’s easy to point to that when you see the disproportionate number who voted ‘Yes’ on the exit poll. However, it is difficult to blame this group of people when they make up such as small percentage of the whole. Hopefully a chart helps. Numbers below are based on CNN Exit Poll data, along with the current count of 5,424,916 people who voted ‘Yes’. This assumes that the exit poll is correct to begin with, which it may not be.

Whites accounted for 59% of the ‘Yes’ vote, while Blacks accounted for 18%. Read the rest of this entry »

Written by jaydfwtx

November 7, 2008 at 6:16 pm

Posted in dataviz

Tagged with , ,

Constraining ExtJs Floating Windows

with 2 comments

There are plenty of examples of creating floating windows with ExtJs. However, they all allow the window to be dragged wherever the user chooses. ExtJs supports a ‘constrain’ property on the window. If you just set this to true, then the user cannot drag the window outside of the browser viewport.

However, what if you want to be fancier, and constrain it inside of some other container? It seems obvious, but finding the answer is difficult. People on the ExtJs forums have posted this question, but the responses are generally a step away from being the real answer.

The answer is the renderTo config property, which you should point to the body property of the container. The forum responses generally indicate this, but they fail to mention the body property. This is what works for panels, I haven’t looked at all the other containers. But I have a feeling the concept would still apply.

var myPanel = new Ext.Panel({
    ...
});
var testWin = new Ext.Window({
    title: 'Test',
    width: 300,
    height: 300,
    renderTo: myPanel.body,
    constrain: true,
});
testWin.show();

Written by jaydfwtx

September 8, 2008 at 9:15 pm

Posted in extjs, web

Tagged with

ExtJs with JSF

with 4 comments

I saw some people were finding this blog by doing a search for ExtJs with JSF.

I previously searched and found that someone had wrapped up ExtJs into a JSF library, however it appeared to be a dead project.

A coworker and I instead decided to use Apache Shale to expose methods in a managed bean, to return the JSON data that ExtJs wanted. At the time, we were only using the ExtJs Tree component. We needed to use the ExtJs Tree instead of the one from RichFaces because of a certain requirement that could not be fulfilled with RichFaces.

Written by jaydfwtx

August 30, 2008 at 10:29 pm

Posted in uncategorized

Tagged with ,

Grails + ExtJs

with 2 comments

Looking at the beginnings of a new webapp. I’m heavily leaning towards Grails+ExtJs, even though the ExtJs plugin has been discontinued because of the license change. Honestly, paying for developer licenses is not a big deal in the grand scheme of things. For widgets, dojo seems to be a runner-up, however it just doesn’t feel as polished, and I find the experience somewhat lacking. I wish jquery had a more mature & official widget set, because it would be my first choice.

In my previous project, we used JSF 1.2 + RichFaces. While I feel that combination can produce good results, it didn’t feel very agile. On a new JSF project going forward, I would recommend Seam; however it is not worth the effort to retrofit a large project.

James Lorenzen has a post about how to roll your own ExtJs plugin for grails, which I will probably give a shot.

With JSF, we were pushing markup down to the browser using ajax polling & rerendering of components. However, I want to start using RESTful services along with Comet. This should get interesting…

Written by jaydfwtx

August 27, 2008 at 6:26 pm

Posted in web

Tagged with , ,