Sunday, September 4, 2011

Vaadin, re-building the Dream

Kriegsland hasn't got much love in a long time.  The game I mentioned earlier has likewise been left as is, people laughed at the legion of crabs concept.  That, and my design was a little inflexible.  I disregarded all OOD for the sake of performance but I ended up with one massive file which made adding new features a headache.  I may come back to it later but for now look at this:  http://vaadin.com/home

Vaadin is a brilliant new tech which provides a complete infrastructure for a Servlet based GWT Rich Internet Application.  Now what that means is you can make a really awesome looking web based game for little to no real effort on the infrastructure side.  That's the theory anyway.  I've been working on some sample apps and it seems great so far, it shares all of the easy UI generation of GWT alongside a lot of built in visual themes and it manages things like the Session for you.

I'll report back with some specific examples but it really seems like technology is starting to catch up with my ideas.

Friday, March 18, 2011

Finally, Something Vaguely Interesting

Okay, so here's something to report finally.

Out of all my projects one has got to at least a vaguely interesting stage. Ironically it is almost entirely contained in a single file.

It's a cool little Android game I'm working on. It's been really interesting so far, I haven't really gone beyond drawing guys to the screen and some basic enemy behavior but hell it's kinda fun.

So, I'll follow that for a while. At the moment I've just got basic touch based movement and some guys who spawn and run across the screen but after I've added a few new enemies it should get more interesting.

Here's a screenshot from the emulator. More to follow!


Monday, February 14, 2011

The Winding Technical Road

I've been incredibly unfocused in this blog. It was supposed to be originally about a single project but since then has wandered in a large number of directions. Of course that's fine, that's how technology should be.

So, I think it might be more suitable to start again with that as the focus of my blog. I'd like to write meaningful things about technology, useful things that people can use. Stuff that you might google and end up saving you a day of figuring something undocumented out.

I'll be an architect soon, my job is promoting me. And I realize that a lot of things I have covered here is not up to scratch as it's mostly borderline propaganda and uneducated vague outlines of things. It's not much use to anybody. My new position should help me build up some useful knowledge however and I fully intend to share them with the world in an effective way.

As for this blog, well, Kriegsland was reborn in my mind recently as yet another entirely different game. And I will make it. Eventually. Right now I feel my time is best spent learning, not creating and I'm going to have to accept that. I have too many unfinished projects. I think in time I will finish them all but it isn't helping that I keep adding things to the list.

So! Hopefully you'll see a new and useful technology Blog starting up soon and watch this space, my projects can never die; THEY'RE UNDEAD.

Saturday, September 4, 2010

The Quest for the holy GRAILS

It's been five months since I was burned by JavaFX. Five months since sun taught me to hate new technology and the time have finally come to balance out this blog with something much more positive.

It started in the interview for the job I've just started. (Hello from Luxembourg by the way.) One of their technical head honchos mentioned GRAILS. It wasn't the first time I'd heard of it from a senior person in an impressive financial institution either. One of the greatest Irish technical success stories, Realex payments, use it too.

Well, I thought, two out of two places can't be wrong. I decided to check it out for myself. I promptly ordered a book on Groovy and a book on Grails and got stuck in.

Groovy! Not just an Evil Dead 2 quote any more: Oh man, Groovy, what a name. I love it, but the greatness of course goes much deeper than that. Groovy is for the most part a superset of Java even compiling to code that is essentially Java byte code. So what's the difference?

Ever think to yourself in Java, "Why do I have to type this stuff out every time?", Groovy has done that for you. Null protection is achieved by adding a question mark the your reference, Strings are now GStrings (Great name) which can contain externally defined properties. Want to define a populated list object?

def list = ["Hello", "I'm", "a", "list"]

I'm still learning but every time I read something in my Groovy book I laugh out loud like a super-nerd and say to myself "did these guys read my mind when they were writing this?"

GRAILS, it's about time: I've tried my share of web frameworks, definitely not all of them but one or two. There always is something that turns me off, mainly I suppose because I'm a newbie to the web world and everything I've tried so far assumed a lot of starting knowledge and it could be a week before you got anything to look at, if you were lucky. Not so with GRAILS.

No kidding, I had a simple database, a controller, a service layer and an automatically generated CRUD screen together in maybe thirty minutes? I could kick this off and play with it in my browser. (Oh, and there's a jetty webserver integrated with GRAILS, didn't even have to set one up.)

It took a long time to get to the stage where this was possible in any language but even better this is all built on Groovy so every feature it contains is available on every level of your application. Configure your program on the fly, open your grails console and write code that calls subsystems you want to try out.

Too good to be true? Well, I can see why people are using it. Not just your startup up the road with more ambition than sense. GRAILS takes everything Spring (the EJB killer) has and makes it even better. Enabling you to use Groovy out of the box puts it significantly beyond EJB3.0 for me.

My current project will be GRAILS. (The prototype was in EJB3.0). I'm looking forward to getting to know it better.

Saturday, April 3, 2010

Java FX is a steaming pile of unusable crap

Yes, harsh words but after having a quick go at it I am left with an incredibly bad taste in my mouth. I was trying to build a nice simple web app, just a few text boxes, nothing fancy, well, this is how my Java FX journey went.

First stop was the website looking for examples. http://javafx.com/

This is the only website I could find that was any sort of resource for the language so I went through any examples I could find, any tutorials etc. Well, the resources are truly pathetic. The examples are poorly laid out and poorly written and the website itself is thoroughly amateurish. Forget about comparing it to something Adobe has created, it doesn't stack up to student projects that I've seen put together in an evening using FRAMES.

But I could look past the sub-amateurish look if the resources were any good, but I couldn't make any progress. Now, Sun are bad for this in general but the thing about Java is that there are hundreds of resources available for learners, JavaFX has sweet FA which made this website so important.

Well, I did what it said anyway, I installed the eclipse plugin and did what it told me to do. Now, the language itself despite being called "JAVA" FX looks absolutely nothing like it. It reminded me of VB actually. Yes, VB... VB 6.0 in fact...

So, despite having an eclipse plugin there is no visual component so you have to run it every time to see what the hell you are making. This involves eclipse jarring everything up or whatever well, by this stage I was incredibly annoyed. I also wasn't sure if debugging would even work and all "tutorials" I could find about blending JavaFX with vanilla Java were freaking awful. One in particular was titled "How to use Java objects in a JavaFX application" but actually only showed how to do the opposite.

The majority of the tutorials were actually about how to make a ball bounce around the screen and things like that. How many people want JavaFX for that purpose? Maybe students? Is that the only group of people JavaFX has been created for? Students looking to make incredibly bad looking graphical projects?

Well, that was the end of the line. Sun, you suck at this stuff give up.

Oh, and, changing the subject slightly. Oracle, the big fat stupid tech support guy has bought Sun the incredibly Nerdy guy who can code like hell but expresses himself as well as a cabbage. This is not a good team up guys.

Sun's certification website for example has been consumed by Oracles one which is a massive mess of rubbish that takes forever to navigate. Look.

Tech support people would be the first to admit it, they deserve all the crap because they spend all day looking at status bars while sitting on comfy chairs. Developers don't deserve this, we have enough to worry about for god's sake.

Oracle, go to hell and take Java FX with you. Good night.

Saturday, March 27, 2010

Building everything back up

I did learn a lot with PHP and reading my new JEE web services book I happily realized that I'm already comfortable with many of the concepts. POST, GET, etc.

In terms of work on the game at the moment I'm doing the painful part first and getting the HTML together. I'll be honest, I hate that stuff. HTML + CSS is often completely backwards and things get thrown around the browser window often with little rhyme or reason. Of course, that's even before you take into consideration all the different browser "quirks".

So I just want to get a template done and dusted and never have to look at it again, at least not in this iteration. It's not nearly as cool as playing with EJB3.0 or JBOSS but sometimes this stuff is just necessary.

Thursday, March 4, 2010

Finding a Base for the Boss




I've been planning for some time now to set up a proper server to host JBOSS, it was going to be guts of current machine tied up to the internet using no-ip.com to make up for the fact that I don't have a static-ip. The question I'm asking myself now however, is that still the way to go?

Hosting has become pretty cheap. I'm already with Hostmonster which basically provide everything except Java support, for hardly anything a month I could host a PHP site with unlimited databases and what have you. The thing about Java you see is that need a lot of memory, making hosting more expensive. Also in a shared environment you can forget about being able to configure everything, and if somebody is hogging all the memory, well, you're screwed.

But things have changed a bit now, which brings me onto my little guide. Finding a base for your JBOSS. I'll talk you through some of the features to look out for in a JBOSS hosting provider.

VPN or Dedicated: A VPN is essentially a virtual server and also the reason having your own hosted JBOSS server is actually something me and you, the plebs, can even consider. Dedicated solutions (i.e. having your own machine in somebody else's server farm) has always been prohibitively expensive for the likes of us. With the wonders of virtualisation we can have the benefits of having our own machine at only a fraction of the cost.

Do I get JBOSS: A bit of a no-brainer maybe but every provider seems to have different deals. For example you could be signing up for Tomcat hosting and only get a shared instance of Tomcat and no ability to use JBOSS at all. Make sure your deal explicitly states that you are getting your own instance of JBOSS.

Do I get a Shell: Moving files around, reading logs, checking on your database, the list goes on. Don't underestimate the power of having shell access to your JBOSS machine, it is definitely something you will regret not having later.

Memory: I'm writing this because I've noticed some hosts offering "JBOSS" hosting with only 128mb of memory. If you try to run JBOSS with this much memory it will laugh in your face before either spontaneously combusting or spending the next four hours crawling on the floor. You need at least 750 megs if you want to be safe, though you could probably get by with 500.

OS: Everything I looked at so far offered a selection of linuxes to choose from. If you have a preference you might be out of luck, Fedora 12, CentOS and Ubuntu seem to be the most popular. Since all you probably care about is JBOSS I might recommend going with CentOS as it's based off the same source Enterprise grade Red Hat linux. (Red Hat own JBOSS since a few years ago, if it'll work with anything it will be their OS.)


So hopefully that helped you out a bit. As for who I will be going with my self, the best I've found so far is this outfit. JSP Zone. They seem to have by far the best package for the money they are asking for. If you find somewhere better please do leave a comment, preferably before I take out my credit card.