Danny Jo http://dannyjo.co.uk Development, scalability and many other things web Thu, 16 May 2013 10:15:12 +0000 en-US hourly 1 http://wordpress.org/?v=3.5.1 SmartGWT default sort order for datasource using operationBindings orderClause http://dannyjo.co.uk/2013/05/smartgwt-default-sort-order-for-datasource-using-operationbindings-orderclause/ http://dannyjo.co.uk/2013/05/smartgwt-default-sort-order-for-datasource-using-operationbindings-orderclause/#comments Thu, 16 May 2013 10:15:12 +0000 Daniel http://dannyjo.co.uk/?p=954 As of the start of May I’ve got myself a new job, I’m now working for Isomorphic Software developing on the SmartClient framework which is a set of components for building rich web applications. Not to bore anyone with details about how extensive the framework you should just click the link and go have a look for your self.

Now onto the actual subject of this post, datasources and the operationBindings tag. Operation bindings allow you to attach, for lack of a better word, an aspect to a datasource operation. This means that whenever a call is made to a datasource which matches the operatingType specified the particular operationBinding will be run by the SmartGWT framework. The operation bindings can be used for more things other than just running a custom server side method.

In my case I was looking for a way of having the data returned by my datasource to have a default sort order and I managed to accomplish this using the orderClause tag inside an operationBinding. The reason for this was that I have a field on another datasource pulling in data from this datasource as it needs to render a selectbox with options being the items from this datasource.

Now lets have a look at the xml.

<operationBindings>
    <operationBinding operationType="fetch">
        <orderClause>name,last_updated</orderClause>
    </operationBinding>
</operationBindings>

As you can see the orderClause contains a comma separated list of column names to order by and that’s it really.

]]>
http://dannyjo.co.uk/2013/05/smartgwt-default-sort-order-for-datasource-using-operationbindings-orderclause/feed/ 0
Velocity EU Conference 2012 – Day 3 http://dannyjo.co.uk/2012/10/velocity-eu-conference-2012-day-3/ http://dannyjo.co.uk/2012/10/velocity-eu-conference-2012-day-3/#comments Sat, 06 Oct 2012 12:04:17 +0000 Daniel http://dannyjo.co.uk/?p=935 Finally we entered day three of the Velocity EU Conference, this as it turns out was my last day at the conference. It started out just like day two, a few short keynote speeches in the morning and three tracks of 40 minute sessions in the afternoon. This day had two tracks about operations and one track about website performance. I ended up spending most of my time listening to different talks about web performance, there were some really good ones from companies such as lonelyplanet, SoundCloud and Orange. There was also a really good talk on HTTP 2.0 and how that will improve the performance of HTTP requests.

However, my favourite talk of the whole conference I’d have to say was given by Ashraf Samy Hegab, he gave a great talk on mobile gaming and more specifically on how you could reach more users by having a shared network code base using Javascript and then only providing the rendering specific code on the native devices. What I really loved about his talk as well was his enthusiasm about the subject. Obviously I’m here giving Ashraf lots of praise especially cause gaming and game development is very close to my heart.

You can check out Ashraf’s site at SoftPoetry, excellent stuff.

So in his talk at Velocity, Ashraf demoed PhoneWars, a third person 3d cross platform shooter he’s working on. Download on your android, join the battle as an android phone, download it for your iphone and join the battle as an iphone, brilliant. During the talk there were 30+ people online shooting at each other and the beauty is that all this is happening over websockets in WebViews on the phones connecting to a nodejs server, how amazing is that.

Anyway, enough about that, I do however really recommend you go check out PhoneWars and Ashraf’s site. To bring us all back down to earth I just wanted to give my conclusion of Velocity, like I said this was my last day although my first time going to Velocity. Overall I think its been absolutely fantastic, I’ve picked up some great stuff from tons of really brilliant people, I’ve had a chance to chat to many different people and companies. The only remarks I think I would have is how time was used and how everything was planned. I think that they naturally tried to squeeze as much as they could into it all over these days and therefore you had the different tracks with performance and operations etc. however it’s very painful I find to sit down and listen to someone talk for an hour and a half without a 5 to 10 minute break in between. No offence to any of the speakers they were all great, regardless of the fact that some of the topics might not have been that interesting for me personally.

I think I will just stop there, I would really like to attend the next Velocity conference which I believe will be held in June 2013 in Santa Clara, USA, I could be wrong though. Even if I don’t attend that I’m pretty sure I will attend the next Velocity EU either way.

]]>
http://dannyjo.co.uk/2012/10/velocity-eu-conference-2012-day-3/feed/ 0
Velocity EU Conference 2012 – Day 2 http://dannyjo.co.uk/2012/10/velocity-eu-conference-2012-day-2/ http://dannyjo.co.uk/2012/10/velocity-eu-conference-2012-day-2/#comments Wed, 03 Oct 2012 23:01:47 +0000 Daniel http://dannyjo.co.uk/?p=928 It’s late and day two of the Velocity EU Conference has come to an end, today was filled with loads of exciting stuff such as BBC’s story of how they geared up for the Olympics or how Facebook’s mobile app went from being native to html5 and then back to native again and why. We also received talks on jank, yes jank, in websites. It’s more commonly known as stutter you notice while scrolling or seeing animations on websites. I also went to a talk about RUM (Real User Monitoring) which covered ways of using the navigation timing API in Javascript to gather some really cool and useful statistics about the end users visual experience of your website.

Other than talk about things there has also been some good networking around all the sponsor booths. Everyone seems really nice and open and it’s very easy to just walk up to someone and say hi and then just chat about stuff. The sponsors have also been running competitions and giving out free stuff such as t-shirts, USB memory sticks and soft cuddly toys.

Overall I’ve had a good day, I really enjoyed listening to the talk by Jackson Gabbard at Facebook, it covered how the Facebook mobile application went from being a native application to an html5 webview application and then back to being native and why. Just to sum that up, its because they love their users and they want to provide the best user experience. Of course Facebook are not perfect or experts at creating mobile apps and I think it’s safe to say Jackson admitted that, maybe not in clear text, but the message was that they are learning and evolving their app just like any other business.

At the end of the day there was more mingling in the sponsors lounge combined with some bites to eat, drinks and live music. Good day!

]]>
http://dannyjo.co.uk/2012/10/velocity-eu-conference-2012-day-2/feed/ 0
Velocity EU Conference 2012 – Day 1 http://dannyjo.co.uk/2012/10/velocity-eu-conference-2012-day-1/ http://dannyjo.co.uk/2012/10/velocity-eu-conference-2012-day-1/#comments Wed, 03 Oct 2012 07:41:59 +0000 Daniel http://dannyjo.co.uk/?p=925 Just to give some context on where I am and what I’m doing at the moment, my employer Trader Media Group also known as autotrader.co.uk have sent me down to London to attend the Velocity EU conference. This conference is all about web and more specifically about performance, speed, how can we make our websites faster and how do we monitor them and predict failures to ensure they don’t have outages.

So what I wanted to do is just give a quick recap of what I experienced during day one. The first day was split up into several “tutorials”, they’re not really tutorials as such you see online, they are more like presentations covering a specific topic. The first one I attended happened to be run by Joshua Marantz, Patrik Meenan and Bryan McQuade with a little bit of help from Steve Souders. This tutorial covered some interesting tools that the guys at Google have spent years creating and improving such as PageSpeed Insights and WebPagetest. Using and interpreting these tools correctly you can get a great set of tips on how to improve your websites performance in terms of end user perception. I won’t really go into much detail about these tools here, you can just follow the links and check them out.

I then attended two talks about ops, for any of you that don’t know what ops is (shame on you), it’s the people and the area of expertise that makes sure we have the infrastructure we need to run our webapplications on. These two tutorials included Escalating Scenarios: A Deep Dive Into Outage Pitfalls and Beyond Desired-State Configuration Management.

The first one, by John Allspaw, was pretty good, I think most of it I had already covered from previous experience though. It covered areas on which teams and individuals need to be aware of in order to perform their best during a crisis or escalated scenario such as an outage. There were many references back to military and aviation and the key message was that we need to learn from other more mature industries.

The next talk after that was about state management and configuration by Mark Burgess, this was a philosophical session, generally talking about self healing systems etc. I won’t go into it that much since it wasn’t really my thing, I suppose there might be some things to keep in the back of your head on where we’re going as an industry but generally not very hands on and actually rather boring as it lasted for an hour and a half.

]]>
http://dannyjo.co.uk/2012/10/velocity-eu-conference-2012-day-1/feed/ 0
Change of plans http://dannyjo.co.uk/2012/09/change-of-plans/ http://dannyjo.co.uk/2012/09/change-of-plans/#comments Sun, 30 Sep 2012 21:31:02 +0000 Daniel http://dannyjo.co.uk/?p=918 I’ve decided to change the tool(s) I use to build this game I’m making, which still hasn’t got a name by the way. I’m now using Unity instead of libgdx. The main reason for this is that the game is actually a 3D game and libgdx does not have the right amount of 3D support I require just yet. Also to note that Unity is pretty neat I must say, I’ve started using Javascript as my lanugage of choice as I’m already rather proficient in that through the years of web development I’ve endured.

Anyway, Unity provides some great tools and features and development has been pretty quick, I’ve managed to create the main of the game world together with the player spaceship and attached a particle emitter for the engine. All in all I’m pretty impressed with it so far. Hopefully the pace will pick up even further as I gain more skills and knowledge using Unity.

]]>
http://dannyjo.co.uk/2012/09/change-of-plans/feed/ 0
Particles and Power Ups http://dannyjo.co.uk/2012/08/particles-and-power-ups/ http://dannyjo.co.uk/2012/08/particles-and-power-ups/#comments Wed, 01 Aug 2012 21:15:36 +0000 Daniel http://dannyjo.co.uk/?p=911 I thought I should provide an update to the development of my game, just to recap this is the first game I’ve really worked on to this extent and I’m not releasing it until I feel I have a solid finished product. Anyway, no need to talk about release just yet, there is quite a bit of work left to do but I have managed to start on the particle engine which will provide some nice looking features over time. In order to prove that the particle engine is doing a good job I’ve added a rocket or flame type effect behind the ship (the player controlled object), oops, did I just give some information away there perhaps. Maybe not, I believe I’ve said in the past I’m working on a space arcade action game.

Now on to some more updates, just a few days ago I started looking at including some form of power ups and I now have a first power up (which happens to be a shield) working to about 50% which means its there, the player can pick it up and it renders an effect place holder around the player. I still need to sort out some collision detection for the shield in general play and some simple hit point deduction etc. All good though.

After I’ve got the first power up in place I’m thinking I might focus some energy on explosions. It would be really nice to have some neat effects when enemies and player gets killed, we want things to blow up, maybe a bit of screen shaking and whatnot. That should keep me busy for the next couple of weeks as I’m not able to spend heaps of time on this.

I think that will have to conclude this post for now but hopefully I might be able to post a screenshot of an explosion later on.

]]>
http://dannyjo.co.uk/2012/08/particles-and-power-ups/feed/ 0
Indie Game Development http://dannyjo.co.uk/2012/07/indie-game-development/ http://dannyjo.co.uk/2012/07/indie-game-development/#comments Sun, 01 Jul 2012 20:11:35 +0000 Daniel http://dannyjo.co.uk/?p=904 I’ve finally decided to try and finish a game I started working on about 10 years ago. It’s a remake of an old action arcade game which I fail to remember the name of now, how ironic. Anyway, basically it’s a type of space shooter in 3D taking place on a wobbly grid. Don’t really know how to explain it any better than that for now but I do intend to get some sneak preview pictures up on this blog eventually.

Let’s get back to the headline of this blog, I put indie game development because I feel it’s a great topic and there is so much buzz going on at the moment. Especially since this guy Mike Bithell just released his game Thomas Was Alone and he’s got some really nice reviews for it and I just keep hearing loads of good stuff about it. Although to be honest I’ve not tried it for myself yet but I will do once I get a chance. I hope I can have my game available before the end of this year (2012) but I’m not going to make any promises.

Seeing as this game will be my first game I feel really excited, especially after seeing the amount of notice and attention the indie game scene is getting with Thomas Was Alone. My initial plan for my game is to make it freely available for the desktop (anything supporting Java really) and a paid for version for Android but this is not final either and could come to change. Getting down to some fun technical details, as mentioned a few sentences ago the game is being written in Java and I’m using the libgdx framework which provides me access to a heap of nice features including Android support. Other than that there’s not much to mention, obviously I have to put in some conditional logic for Android versus desktop since the input controls are different but that’s about it for now.

For more buzz around indie game development check out the twitter stream.

]]>
http://dannyjo.co.uk/2012/07/indie-game-development/feed/ 0
Integration testing a REST client http://dannyjo.co.uk/2011/11/integration-testing-rest-a-client/ http://dannyjo.co.uk/2011/11/integration-testing-rest-a-client/#comments Wed, 09 Nov 2011 20:27:19 +0000 Daniel http://dannyjo.co.uk/?p=878 Today I’ve spent some time looking at an interesting problem. I’ve been using the JAX-RS reference implementation Jersey to consume a RESTful web service, it’s really simple. I haven’t played with RESTful web services that much yet but I have to say I really like, the whole idea about using HTTP is brilliant. Anyway, as I was working on this adapter that would consume this RESTful web service I came across a problem, I needed to have an integration test running so that I check that my app was wired up correctly, read in the correct config properties and that the actual Jersey client did what it was supposed to.

I spent some time searching around for some ideas on how to do this and finally came across a really nice article.

Have a look at http://olafsblog.sysbsb.de/lightweight-testing-of-webservice-http-clients-with-junit-and-jetty/. It’s brilliant, basically what you do is you start up Jetty internally in your test class and you have your app point at this running Jetty server. You can then in your test case tell the server what to return on the next request, kind of like a mock response in a way.

Thinking about it now, I might actually see if I can create a project for it on Github and potentially add some more good stuff to it. Also to note is that this mock type server would be able to serve as any HTTP endpoint you wanted to stub out, you simply just tell it what to return and it’s brilliant from an integration point because you’re actually firing off a real HTTP request locally.

Give it a go I tell you, it’s saved my a lot of time and effort.

]]>
http://dannyjo.co.uk/2011/11/integration-testing-rest-a-client/feed/ 0
Listify App 0.2.0 Released http://dannyjo.co.uk/2011/10/listify-app-0-2-0-released/ http://dannyjo.co.uk/2011/10/listify-app-0-2-0-released/#comments Sun, 30 Oct 2011 20:26:28 +0000 Daniel http://dannyjo.co.uk/?p=870 Here we go again, another release of Listify App is out, this time the version number becomes 0.2.0

How does the Listify App version numbers work you might wonder, well this is how. The version number consists of 3 numbers, <major>.<minor>.<build>

The major number will increase when there are significant changes to the app, like structural changes to how the app works and its architecture. The minor number will increase when there is additional functionality added, so bugfixes alone won’t increase this number, there has to be some significant new functionality. The build number goes up on build pretty much, this number changes a lot when there are fixes and tweaks going on.

It is very likely that future releases will only contain a small amount of things added, fixed or changed since I try to release small and often rather than bundle in some massive changes, easier for me to test as well.

The following changes have happened for this release.

  • List items can now be ordered using drag and drop
  • Google Analytics Event Tracking has been added to certain functions

That’s about it for now, there are also a couple of tweaks and fixes in this release.

]]>
http://dannyjo.co.uk/2011/10/listify-app-0-2-0-released/feed/ 0
Listify App 0.1.1 Released http://dannyjo.co.uk/2011/10/listify-app-0-1-1-released/ http://dannyjo.co.uk/2011/10/listify-app-0-1-1-released/#comments Wed, 26 Oct 2011 20:32:12 +0000 Daniel http://dannyjo.co.uk/?p=861 Listify App has now been updated to version 0.1.1, but what does this actually mean to you. This is mainly a bug fix release, since the original release yesterday, a few issues have crept up and this is the attempt at removing those so here we go.

  • Added a favicon
  • The page title tag will now be prepended by the list name when on the view list page in order to have nicer bookmark links
  • Changed the wording of 4/10 done to 4/10 complete
  • Made the inplace edit boxes bigger
  • Fixed an issue where typing markup tags < and > would cause the list item to render wrong
  • It should no longer be possible to add empty list items

Check out the new version at http://listifyapp.dannyjo.co.uk/

]]>
http://dannyjo.co.uk/2011/10/listify-app-0-1-1-released/feed/ 0