Sunday 23 December 2007

Is Windows Vista a lost cause?

Ok been, started asking around and cant find a single person I know say they prefer vista vs. XP. Even the die hard .Net developer I know think XP is better. Dont understand this, there was supposed to be loads of usability studies etc. What happened someone forgot to include anyone who actually uses a computer full time or previous version of windows in this.

I really loved the original windows NT when it came out, I purchased a Windows Tablet as loved the idea and still use it a browser to this day. As a developer I like Windows for for rich client stuff, spent years in visual studio building application. On server side used to use NT everywhere but have moved to Linux in recent years. But now appear that windows may have managed to shot itself in the foot on client side. I'm developing a growing dislike for vista with each time I try and use it. Just don't feel in control, cant work out why things like internet access aren't working, its now getting to stage of not wanting to see it again. I keep going backing thinking, it must be me, but then give up and reboot in Linux to actually have get the machine to work well.

Wireless, Media playing, simple internet browsing all work better on the Linux side and whole machine just feels so much more snappy. Only thing that works better on windows is hibernate and suspend which are really poor on the linux side. But happy to boot and shutdown a machine to have a working systems. Doesn't hunt that actually boot and shuts down fast don't really care.

Wednesday 19 December 2007

Windows Vista v.s. Mint Linux

Ok got a new laptop for traveling yesterday, a little Toshiba R500 <1kg job, so got first real exposure to vista. Afraid as after function not glitter so cant really see much in new Aero UI. Once turned off all the pointless glitter system as a lot more responsive and was happier may be better then XP but still liked the simple 2000 interface better . Cant really see a reason to upgrade any existing systems, as appears the same odd system with a repaint and new dice on the mirror.
May be a little harder to find stuff, but this is simply due to moving things around. With each new version the bits I use as developer simply appear to move down a level and become a little harder to find (Environment variable, services, folders in file manager etc).

Had to spend a few hours watching it configure, update and reboot its self a number of time as found and installed my tool set, SqlYog, Enterprise Architect, NetBeans, Firefox, Skype, Mysql etc. All worked got a little board of now going to do xxx dialogs. All worked, but cant understand were the 780 mb or rams gone before installing any applications!. End results 4 hours work to get to a usable state and most of my environment build.

Finally got bored to put in Mint 4.0, my main desktop,and installed. The difference was shocking 10min later was installed and working . A simple selection package later and was up in working. As use crossover even the windows application installations worked faster and easer then under windows. Basically about 20 minutes later was up and running. Only real difference it computer simply appeared more responsive and faster.

End result it have not rebooted into vista again, will keep it around in-case get a nice .net C# project but otherwise Mint got the edge for my usage and just makes the computer appear faster!
Afraid believe role of a operating system is to run application for me not use all the processing cycles its self. Afraid vista appears to forget this, Linux remembers.

Tuesday 18 December 2007

Oracle and Rails 2.0

Oh well once you think you done, alongs coming testing in a production environment and some extra fun. Turns out no one else appears to be working with Oracle and Rails 2.0 yet.
No one implemented the needed select_rows in svn. Caused a few problems to use the driver in tsting.

In put ended up with a nice custom oracle driver in the end. Need a few minor changes:-
  • Modified mapping to my own likes
    • float <-> binary_double
    • char(1) N/Y <-> boolean
    • text <-> varchar2(2024)
  • Boolean (true t 1 y +) all mapped to true
  • Implemented select_rows
  • added a high/low sequence which I prefer for high insert rates with oracle
the current version of the gem I created is up at http://biorails.org/svn/biorails/contrib/activerecord-oracle-adapter-1.0.0.gem if anyone interested. At present its a work in progress. Need to put on my old oracle DBA hat and look for anyway to improve it. But may help anyone else moving up to 2.0 with a oracle backend in the next few weeks. Would like to use Insert returning for sequences and trigger filled values if possible but will have to have a further look.

Put needed changes on ticket: #10415 in rails dev.

Saturday 15 December 2007

Finished migrating to Rails 2.0

Just a not to say code base is now passing all test with Rails 2.0. Took about 8 hours of effort in the end mostly with scope and SOAP changes.

So feel free to upgrade Biorails and try it out and upgrade local rails if you want. At present environment.rb does not contain a version to will attempt to run on most recent installed rails version.

Expected status:-
  • Units: 353 tests, 668 assertions, 0 failures, 0 errors
  • Functionals: 301 tests, 780 assertions, 0 failures, 0 errors
Have got a simple does it return correctly or throw a exception test on most controller actions now . Only real problem is create/update functional are not really testing all the create/update objects with generation of new records.

Rails 2.0 upgrade produced a lot of donkey work but went smoothly the mains changes needed are shown below:-

1) Paginate.new => model.paginate via will_paginate plugin

Keep a eye of bottom of pages to check new paginate control is coming up ok in visual testing. Buts appears ok on initial pass

2) end_form*

Have had to change a number of forms to block wrappers to
<% form_tag( stuffff ) do %>
<% end %>
3) with_scope

Use this a lot to manage visibility of data. Has gone protected so having to move filters to part of correct model. Model.with_scope => self.with_scope and code moves into correct models and referenced so

On the whole appears a litte faster other then this no real problem seen.
def self.visible(*args)
self.with_scope( :find => {
:conditions=> ['exists (select 1 from memberships m,studies s where m.user_id=? and s.id=study_protocols.study_id and m.project_id=s.project_id)',User.current.id]
}) do
self.find(*args)
end
end
4) Had to Add 3 plugins to externals list in svn to cover bits moved out of core rails:-
script/plugin in_place_editing
script/plugin act_as_tree
script/plugin will_paginate
Need to find if there a Oracle plugin.There is talk that oracle ActiveRecord has moved out to separate gem/plugin could not find this yet. Will have another look later but will not effect development or testing yet.

5) Acton Web Services

Well this was a pain, but changed over to a plugin based on 1.2.6 code under my control at present. Will have to test this with our .net office client to make sure its working well.

ActionWebService and Rails 2.0

Well looks like I have to take on supporting this for my BioRails project. Afraid on the client side we are making heavy use of .NET generated client code generated from the WSDL. This is used for the Microsoft office client integration is isn't going to become restful soon. Also have clients using the same historic interface so ended up picking up AWS porting to 2.0.

To install the plugin the following should work:-
script/server plugin http://biorails.org/svn/biorails/plugins/action_web_services
At present all I can say is it passes our in-house test suite for the web services I want. Beyond that I have not had time to go. Had to do a few minor changes to get invoke to work, fully made it display calls sorted by name which have been meaning to do for ages.

Maybe for online services could keep few mongrels up with 1.2.6 dedicated to web service requests after move to 2.0. But as we distributing a software package instead of a service this would be hard on customers.

Basic changes are setting the gem dependencies to allow for use with Rails 2.0
gem 'activesupport', '>= 1.0.2'
gem 'actionpack', '>= 1.6.0'
gem 'activerecord', '>= 1.9.0'
Then the removal for include Reloadable::Deprecated from the code base. This appears to have worked for me. I expect there to be a similar gem soon. Then a number of conversions of render_file to render :text => content in the scaffold code.

Its now back to working on 2.0.1 with my .net client usage pattern. In fact working really well on client side as collections of simple data objects is a common pattern for .net and works well for building the client UI.

Tuesday 11 December 2007

Web vs. Application development

Have noticed Im have come full circle. Im not writting a web application any more in Ruby on Rails. I am builder a n-tier rich client application, the difference is the client is javascript+html in a web browser as a container. I now finding the MVC part moving to javascript with rails supplying the initial page template and then a few restful json data structures to handle change in state. Affraid cant see the point in the X part of ajax when talking from ruby to javascript its a classic cut out the middle man xml. The .xml there on the action but .to_json faster then .to_xml for moving the data.

I have been reading the ajax is evil etc talk, and this may be true to public wildly distributed view anywhere application. But I'm after the best user experience for a known set of clients for in-house usage. For my style of application JavaScript and Ajax is a boom as take away the web bar at the top with Mozilla prism and user just think its a richer client application like the host of .net application. In fact in user pilot beat a competitor thick client swing application as user rated the web page as having better windows integration (odd but true).

Wednesday 5 December 2007

Building the UI in Javascript

Its turning point time with release of ExtJs 2.0 My web forms are now looking richer and better then in then in previous generation of applications with thick client swing UI's. Ok its not as easy as working visual studio and .net, this still has the edge, but feel its at the same level now as old style hand crafted swing.

Have Tree, live feed combos ,drag and drop, data grids, validation and dynamic form editing sorted no. Can build and run all my major data entry UI in rich combination of rails and extjs.
Only down side its about 500 line of javascript for a complex UI which dwarfs the initial ruby implementations. This may not have the UI simplicity loved by the a lot of core rails people. But provides the richness expected on the thick client crowd without the pain of distribution and installation of 1000's of machines.

All that really lacking is solid graphics. Would really love all browser to support svg as think best approach would be a mixture of ajax and vector definitions from server. Could go the flash way for this and may well, but like open standard approach if possible.