Thursday 30 April 2015

No Comment….

So Mr Salopian… How are things going with this ‘No Comment’ policy. Well, says I (looking to the sky and wishing on the long dead bones of Darwin that I actually believed in some higher being) good and bad. I’m not really struggling myself with the concept but I DO struggle with legacy code that is unclear in its intent. Yes, You find me still still battling with the demons of Dicom and converting our Leadtools v14.5 application to the latest and greatest version and in the process coming across some…. challenges. I’m not going to bitch about the parentage of the person who wrote the code or suggest that they should be prevented from accessing a computer ever again or anything like that. The truth is, I worked closely with the guy for about ten years and we had a great working relationship with a lot of mutual respect. We could both rely on each other in a jam and could step in and out of each others code without scratching heads too much.

However, even the best of us somehow take things for granted sometimes. Who’d think that 7 years down the line someone would want to understand or refactor ‘THAT’ piece of code! So I came across the following fairly innocuous lines of code:-

For full blog click here.

Written by Conrad Rowlands, Lead Developer and Team Leader, DSCallards


Solution Wide Compiler Directives

Continuing with my legacy migration of an application developed using Leadtools Medical Suite v14 to utilise Leadtools Medical suite v19 I blogged a few days ago about how I was attacking it using Conditional syntax dependant upon the library I was compiling against. My primary reason for doing this is that if I have issues with regard to the codebase I can easily revert to testing against the previous codebase using EXACTLY the same code and thus eliminate new issues from pre-existing ones. There are several ways that compiler directives can be utilised none of which entirely suit my needs and I thought I would share how I addressed this issue with y’all.

Click here for full blog.

Written by Conrad Rowlands, Lead Developer and Team Leader, Developer Solutions


Tuesday 28 April 2015

Conditional Love

Continuing with my work on converting a legacy application from Leadtools Medical v14.5 to Leadtools Medical Suite v 19 I came across the following annoyance which I felt compelled to share. One of the issues with moving a fairly complex and large application from one series of libraries to another just how you go about breaking things. Any fool can rush in deleting reams and reams of code and replacing the old libraries with the new libraries and then writing thousands of lines of new code only to find that the intent of the application is now not right and it is no longer functioning as was intended. Yes, user testing will pick this up but user testing is to make sure a product is ready for release, and NOT an extension of development.Unit testing will pick up some issues but in general the bugs will be many fold and extremely subtle, especially in already complex software. The key to migrating a functioning LOB application from one library set to another is thus breaking things slowly and in a controlled manner (much as I love the ‘Move Fast and Break things’ approach of Facebook which is fine and dandy if you are the client and accept the risks, generally they dont!).

Click here for full blog.

Written by Conrad Rowlands, Lead Developer and Team Leader, Developer Solutions

We Want Information (DICOM Information)

And so continuing with updating our legacy leadtools application from v14.5 to v19 of the Medical Suite I came across something which had me scratching my head for a little while and I thought as it did I would like to share it with the community so that others hopefully don’t have the same issue.

The issue I was having was related to loading a trying to Insert a module (and the related attributes) into a dataset. For some reason it just would not work. I then stepped back and compared my legacy code with the new code and came across the following anomaly. The InformationClass was not set in my new code. Odd….I was expecting to see it as a type CTImage. I then retraced my code and noticed that the newer libraries did not have the equivalent GetInfoDS method which seemingly loaded this information. So I dug and dug looking to see if a more object orientated approach had been taken to this population but all of my searches drew a blank. I suspected that I had arrived at the answer but the solution still eluded me.

Click here for full blog.

Written by Conrad Rowlands, Principal Developer and Team Leader, Developer Solutions

Thursday 23 April 2015

Embedding LEADTOOLS License Files

I have my colleague Jamie to thank for this particular blog. I have recently come to migrate a legacy project written using Leadtools v14.5 to v19 of the Medical Imaging Suite and so during a conversation with Jamie he showed me a nice way of embedding the Leadtools licence and developer key within the .NET application. I’m sure it’s not going to bring about world peace or halt global warning but it might stop you prematurely looking like the guy above without the aid of a CT scanner. In all seriousness its just a nice tidy way of handling the licensing, So with out further ado:-

Click here for full blog.

Written by Conrad Rowlands, Principal Developer and Team Leader, DSCallards

It's All Just Words!

Whilst migrating an existing framework version 2 application to version 4.5 of the .NET framework i came up against the following mixture of words for an error message that to be honest made me just blank over at the descriptiveness of it all.

Click here to read full blog.

Written by Conrad Rowlands, Principal Developer and Team Leader, DSCallards

Who Knew ...

Who knew that windows contained two registries, I suppose that this should have been dead obvious given the appalling way Microsoft lurch from 16 bit to 32 bit and thence to 64 bit. I just hope I’m not around when they decide to migrate to 128 bit operating systems. I’m sure they’ll manage to come up with some amazingly non obvious name akin to SysWow64 (seriously, who did that!?) that surely serves merely to confuse. I digress…

Anyway yes, so two registries, I had to install an old piece of software that moaned about the minimum requirement of MDAC 2.6 not being installed and instead this windows 8.1 box only had MDAC 2.0.0. I scratched my head as looking in ‘the registry’ i could plainly see that MDAC version 6.3 was installed! Surely this should suffice?! But then something came over me, it may have been the temperature, it was hot for England nearly into double figures, it may have been the romance of spring playing on my mind or more likely I just got desperate:- Registries…..

It turns out that on my machine the default registry is the 64 bit registry, as loaded from C:\Windows. There is also it turns out after a quick 10 second search another regedit.exe (not found by the windows search algorithms) located within the folder C:\Windows\SysWow64, this is of course the 32 bit registry which is where i found my MDAC version v2.0.0. I was now able to change the MDAC version from 2.0.0 to 6.3 allowing my install to complete. I hope that this can be of help to someone, failing that, i got to vent. We all win.

Written by Conrad Rowlands, Principal Developer and Team Leader, DSCallards

Monday 30 March 2015

Let's Get Physical

So, its something that’s been eating away at me for some time and it seems like I’m not the only one with several eminent galleries announcing that for the sake of posterity all of their digital images are to be stored as physical images. At first this sounds like madness with hard copy documents all being subject to the harsh world of the physical; Fire, damp, dirt, degradation, expense of storage space not to mention theft and any other amount of physical damage that may occur. This is however a very short term view, true; that photo stored on an array of local devices backed up on a server half way across the world with highly documented  recovery procedures spanning political and geographical borders seems on the face of it fairly safe… I mean, no one has ever irretrievably lost data like this except… they have haven’t they? Just ask the Inland Revenue! Still, balance of probability and given a certain amount of intelligence; that data will be safe as houses at least for a short period of time.

And then that term reverberates through my mind, safe as houses… Houses ARE SAFE because they are strongly based in the physical world. Anchored in reality through concrete foundations in a world in which the pure physics of interactivity just does not change. Gravity works and is constant, not constantly changing. We don’t suddenly find that our hands are no longer compatible with doors and so we can no longer enter the house, nor do we find that bricks suddenly become invisible and offer no resistance to burglars just because we fit new windows. The same is to a large degree also true of software, however there is a fundamental difference which underlies this… the landscape or Eco-system of computers changes at a rate that is far from geological so the physics of the ‘known universe’ changes with alarming speed. This of course means that some of the lesser known file formats appear and disappear within a matter of a few years and the means to read them disappear within a generation. Now, How safe is your data? That data spread around the globe, backed up in nuclear blast resistant silos. The answer is of course, still totally safe but completely inaccessible!. Now extrapolate this position over a century or two with priceless pieces of art and you can see why these galleries don’t want to entrust the Monets and Rothkos of today to the digital world. They are just to valuable to be entrusted to the transient world of software and computers.

My own situation is slightly different though not unconnected, my problem is what happens when your amazing photography collection is up there in the cloud on Facebook/Instagram/iCloud etc. The answer is of course… Nothing, it gets largely forgotten about. Sure if you suddenly remember you need a photograph of some event or such you go and look for it, generally spending hours to do so as you don’t know which album it was in. But how often does anyone as a family sit around  the computer screen cooing and ahhing at cute photographs of back in the day. I would imagine that for others just like myself it never happens. This is a shame, especially when you  now consider that there are probably far more photographs being taken at this time than ever before with every family having not just one photographic device within the household but many. I know that within our ‘creaking at the seams’ house there are around 20-25 digital cameras of differing types what with iPhones, iPads, Bridge cameras and compacts. There is never a day when photos are not taken and yet these photographs end up in a public silo safe, but never really employed or enjoyed; whole family events backed up in every crevice of the world for maximum availability but only viewed infrequently by one person browsing an album if even that happens. Why? I guess a part of the issues is that the quality of these photographs is maybe not in direct proportion to the quantity. They capture a moment sure, but maybe we are just bombarded with sheer number and due to the fact that absolutely EVERYTHING gets saved they have lost their ‘specialness’ or at least they get tarnished with the brush of all the awful and substandard photos we take. Except, photographs haven’t lost their appeal, as can be proven when one family member stumbles upon a photograph album… within 10 minutes it has become a family event that can last hours, at least it does in our house!

So why this media gap? You could argue that the ease of capture has devalued our experience with the finished media, that the sheer volume turns us off ever browsing our extensive archives or that we are just not selective enough with what we choose to keep, with what we regard as special. My own feeling? We just like and interact with physical things more positively, we feel involved not detached from them. We can’t zoom the image, change it, alter the colour or airbrush the things we don’t like; we fight over who has the best view of the album and we all hang off each other generally being very invasive of personal space and yet we get far more enjoyment out of these experiences than our full screen fully interactive sterile digital albums.

Maybe not what you expect a software developer to say….Lets get Physical? Hell Yes!

Written by Conrad Rowlands, Team Leader and Developer, DSCallards  

Tuesday 24 March 2015

Six Benefits for Mobile Business Apps

At home, on the train, waiting for the kids, in the queue, at work, in the car ...
   
Mobile devices are used everywhere, and that means EVERY business has to embrace the technology and extend their systems to incorporate the current single largest pervasive technology.
Businesses have traditionally built their operational foundations on paper-based processes; these are highly inefficient, cause slow turnaround times, errors and provide poor operational visibility. Mobile apps offer unprecedented opportunities for streamlining business processes - especially as they become more prolific.

Mobile apps aren’t just confined to consumer use but are now being used by businesses for their internal operational processes such as data processing, signature and photo capture and much more.

So why should you consider leveraging the opportunities a mobile business app can offer?

The Six Benefits of Mobile Business Apps*

1. Rich data capture in real time: Processes are dramatically slower if you have to collect your data before manually uploading it to your business system. With a mobile app you can have always-on, always available, rich data capture in real time including; text, numbers, photos, signatures and GPS locations, all on a mobile phone/device app. This enables increased data visibility to key decision makers without having to be in the field, in turn giving them the ability to make a decision from the office while receiving the data in real time.

2. Work Offline: You are also able to access and collect your data whilst offline. The mobile app automatically synchronizes data in the background and stores it on the device, so that users can access data in the app even without connectivity. Captured data is also stored in the cloud so that no data is ever lost.

3. Reduce problem solving time: An issue in the field can take a long time to resolve if the right support isn’t available, this in turn can cause costly delays, e.g. confusion with project plans and measurements. Having real time communication and data availability can assist experts in providing guidance to remote field workers, dramatically decreasing issue resolution time.

4. Work the way you live: We are all adopting mobile apps in our everyday lives, whether it be for shopping, social networking or organisation. Workers are increasingly using smartphones in their private lives and expect to have the same capabilities at work. This is now possible with the development of mobile business applications that can support field workers to make more timely and effective decisions on-site.

5. Custom Branding: Your business app can be customised to suit your unique requirements whilst being consistent with your business branding. Your company name, logo and the processes can be integrated into a unique app which fits your business needs.

6. Fast and easy to use: Mobile apps are very simple to use plus the devices are small, light and easily transported. There is no need to carry around big old bulky devices or a clipboard, pen and paper which can be easily lost, when this technology is available. To progress in their industry everyone should be looking at adapting to change and using the most up to date technology.


These are just a few of the benefits of having an enterprise app and reasons why businesses should look at investing in getting one. The key point to remember is that mobile business apps will increase employee productivity regardless of time or location.

So why not be in control and plan your company strategy with applications that work on mobile as well as your desktop and be ahead of the game?

Building and deploying customised mobile apps has traditionally been expensive, slow and complex. With the availability of more stable and effective development platforms we can now have them built in weeks rather than months, with less hassle and cost.

The business world is moving very quickly towards running on mobile as well as traditional desktop – why don’t you join us in this revolution?

Talk to the experts on 0800 652 4050 to see how we can help today or visit us at www.developer-solutions.co.uk.

*Source:  The Grove Group

Taking Your Development Offshore to Devon?

Software development over the past twenty years, as predicted by Edward Yourdon’s seminal 1992 book “Decline and Fall of The American Programmer”, has seen a key migration of support services to external providers located in parts of the world that provide the cheapest resource.

From offshoring to nearshoring to reshoring, from co-sourcing to hybrishoring, experiences of service provision in software support have been variable. Offshoring and its variant combinations has suffered from logistical and time zone issues and cultural barriers increasing leading to the overall degredation of the experience and end result.*
But what if your software applications were designed, developed, implemented and supported from offices in the glorious West Country? You would be getting the advantages of outsourcing your software development but not having to suffer with traditional offshore issues such as time zone, culture or major logistical barriers.
This formula has worked for Developer Solutions for well over fifteen years with many large customers and here’s why:
    • We have the right talent that can deliver quality work.
    • Removing the time difference barrier and therefore the need to exchange emails with hours/one-day-delay to reply will not kill the momentum and motivation of the project.
    • Although onsite visits are always necessary, working remotely for the bulk of the project with regular online meetings is a smoother, more ‘agile’, less expensive form of delivery.
    • We have a great lifestyle in the West Country, which means when we work on your projects we do not have the larger city pressures of commuting or hectic offices.
    • Our teams rarely change. Because we have decided to enjoy our lifestyle on the edge of Dartmoor, we really don’t want to leave so you will get to know our team.


Talk to the experts on 0800 652 4050 to see how we can help today or visit our website www.developer-solutions.co.uk.

Who Supports Your Software Apps?

Ask yourself the question, “When your old IT application fails, who are you going to call?”. If the answer is ‘"not sure", then please read on.

Most of us rely on IT Software that has stood the test of time, Support ran out years ago, the people, the team, the company that was involved in writing it, building it and supporting it have long moved on – but the system still works – it does what it’s supposed to do – JUST.

However, you’re now starting to worry. How long is too long to leave IT software running quietly in the corner? Operating systems have changed, the web has changed our lives, mobile, network solutions the whole of IT rolls on at alarming pace – leaving that piece of software slowly but surely creaking at the seams.

Developer Solutions knows this problem well. We have been working with companies for many, many years resurrecting and supporting IT software. Offering support when the person who knew has left or retired! Amending, fixing, supporting and evolving legacy systems that need to continue running because they do the job.

The risk of failure of your systems goes up every year and the cost to business when the eventual failure happens, and it will happen, is often astronomical.

Not doing anything shouldn’t be an option, it is the easy choice but will not end up being the right decision.

Developer Solutions offers an established, proven Application Support Service ensuring your business critical applications are maintained and enhanced by high calibre IT and software professionals. Developer Solutions development capabilities span the most widely used technologies, meeting the IT and software needs of clients across many different industries.

Our Application Support Service could leave you with the freedom to plan and develop your future strategic approach knowing that your existing systems are functioning at 100%.
Application Support includes:
    • Support for legacy applications
    • Reporting and service reviews
    • Skills transfer
    • Access control and security
    • Application configuration
    • Application upgrading and patching


Why choose support from Developer Solutions?
    • Bespoke Support and SLAs to meet the needs of your enterprise.
    • Technical excellence – our software developers have been writing code since 2001 and working for companies of all sizes using multiple technologies.
    • Dedicated team so timely engagement of the ‘right’ resources and root cause analysis. Technical experts with in-house knowledge of your solution.
    • Access to highly skilled experts able to resolve the immediate problem and devise the improvement plan forward. Ability to retain the expertise of what and how the application operates and was built.


Simply put, Developer Solutions will help you to extend the life of your applications for as long as you need them. We will ensure that your business critical applications are performing at peak efficiency, are up to date and available for use throughout the business day.

Talk to the experts on 0800 652 4050 to see how we can help today or visit out website at www.developer-solutions.co.uk.

Monday 16 March 2015

Who Supports Your Current Software Applications?

Many businesses today use custom built software applications to fit better with their business processes, rather than be limited to 'off the shelf' solutions'.

Quite regularly these applications are critical to the smooth running of your business.

However, in many instances, the original Development, Test and Support teams are either reduced in size or are have moved onto other projects as the application has been built and delivered.

But what if Operating System updates or browser compatibility changes mean that an application has issues?  Or database updates lead to changes required within the original application?

This is where DSCallards can help.

DSCallards supply development configuration, support and maintenance for your applications within a wide range of technologies to ensure the business is kept running.  And when systems need big change, we are there with the knowledge of your current business systems and processes to design, develop, implement and support these new applications.

We can provide you with peace of mind by providing support and maintenance for your software systems.


Click here and take a look at our website to see how we can help.

Alternatively you can speak to one of our team today to find out how we can help you to take the strain!

Wednesday 14 January 2015

Case Insensitive Lookups with SSIS

Whilst recently compiling a reasonably complex transformation to bring in some data from an Excel spreadsheet I was left in the situation where I had a some look ups that were failing to resolve due to case sensitivity. This was a failure on my part really as I should have understood from the outset that this could have been the case and I should have factored this in from the start but I didn’t. No problem usually, You can just change the case at the source and and in the look-up component and you’re there. However… In my situation this was not feasible without me throwing myself out of the nearest window and making finger paintings with my own blood in my dying moments. The reason for this is that I had about 50 separate sources which is an onerous task in itself. In addition to this as I was ‘unioning’ all of this data together using the union component and then going through several more complex transformations with additional unions along the way it was getting very messy, The union components do not refresh with new fields when the source changes and so the only way to correct this is to drag new union components on in place of the old ones! This in turn means that all of the adjoining components also need to be refreshed and even talking about it I can feel the end approaching.

Read the full blog here.

Written by Conrad Rowlands, Team Leader and Developer, DSCallards  


Visit www.dscallards.com for more information on our Development Services.
 

Happy to do Superficial ...

So…. Sometimes the very simplest of things can take gargantuan efforts to work out and you find out that the detail really is just too much detail.

Just such a  situation happened with me this week when working on a site I am developing. I needed to implement the sending of an email once a post had been received from an MVC page to indicate that a booking had been made. The mail would be sent both to the establishment where the booking was made as well as a copy being sent to the person making the booking. I elected to use the inbuilt System.Net.Mail class, how hard can it be right?…… Well A damn sight harder than I thought that’s for sure! This week there will be no code sample as code was in this instance not at fault or has no bearing on what was happening. To cut a very long and very boring story short it did not matter what I did I could not get the mail class to send the mail; upon sending, the operation would timeout or the server would disconnect etc etc. It made no sense so I took a step back. I had been utilising my Yahoo account using the smtp.mail.yahoo.com server and of course as this was secure and requires authentication I used port 465.

So I thought maybe the issue is with Yahoo and I changed to my Google account instead using the smtp.googlemail.com SMTP server again with port 465. Still no dice…..Odd. Much headbanging later and I stumbled across this StackOverflow article which led me on to this blog.

Now I’m not going to lie and say that it all makes sense to me. It has at least allowed me to at least find a workaround by in this instance using port 587 on my Google SMTP server. If I sat down and thought about it I’m sure I could understand in finite detail what exactly Explicit SSL is and why the .NET mail client only supports this type of SSL, the point is…. I just don’t want to! I feel like I’ve already wasted enough time dealing with this bug (I’m sorry, Its not a feature its a bug whatever they say and one they seem reticent to fix).

Normally I’m a man who likes to get the detail, a superficial overview is never normally enough as it leads to design mistakes. However in this instance I now know in enough detail for me that the .NET mail class does not support all SSL SMTP conversations and I’ll continue to bask in my own ignorance.

Written by Conrad Rowlands, Team Leader and Developer, DSCallards  


Visit www.dscallards.com for more information on our Development Services.

Supporting PHP in Visual Studio

I was very recently asked to lend my support for maintaining a website we have which is written in PHP. Now normally I’d run straight off to my trusty little 2010 macbook (which, by the way, has NOT degraded in speed in all that time nor does it require constant reboots..do you hear that windows? I digress) and use any one of the free or cheap plethora of tools to help with this task. Personally I tend to use Aptana Studio. Just for once I thought I would try and leverage my normal windows work machine for this task and so I turned straight to Visual Studio. It turns out that there is an add-on for studio made by the guys at Devsense. So using the Visual Studio Extensions and Updates manager I installed the add in called ‘PHP Tools for VS 2013′ (which is on a 30 day trial) and awaiting the amazingness…..

Time passed and true amazingness did not happen and so I decided that I would just get on with my work instead.

I downloaded the source for the website put it onto my machine and then started the process. As the project is an already existing site i needed to run the ‘Project From Existing Code’ menu item available from the File/New menu item. This takes you through a simple wizard and at the end of this process you have a visual studio project with all of your PHP code. Great, so now down to it…. Unfortunately what I did not realise was that this site made use of PEAR extensions, thus everytime i tried to run a page with email capabilities it would just break unable to resolve the necessary libraries.

Click here to read full blog.

Written by Conrad Rowlands, Team Leader and Developer, DSCallards 


Visit www.dscallards.com for more information on our Development Services.

Augmented Reality



So, IBeacon…. You may or may not have heard of this technology, Indeed up until a year or so ago I must confess that I had not. These funny little items then ended up on my desk, 3 in all, and I wondered what to do with them. As with most things that cross my desk eating them was an option but they looked pretty inedible so after an interval of some months I instead opted to find out what I was supposed to do with them. So i headed over to the Estimote website who are the manufacturers.

 “Estimote Beacons and Stickers are small wireless sensors that you can attach to any location or object. They broadcast tiny radio signals which your smartphone can receive and interpret, unlocking micro-location and contextual awareness.” Instantly I can imagine that sales and marketing teams are practically wetting themselves at yet another opportunity to push their unwanted wares upon us in yet more insidious ways. 


I know that the first and every other subsequent app that tries to promote their wares to me in this way will be removed from my life for ever. I do not need any help in spending money. However looking beyond the more obvious tired use case for these beacons and examining the phrase ‘contextual awareness’ raises some real and positive use cases that I as an individual would actually subscribe to. ‘Contextual awareness’ or ‘Augmented Reality’  is the process of providing supplemental information about an environment or area that would further help the user to understand or interact with his/her surroundings; that is, enriching the real world with appropriate digital information ensuring that that ‘viewer’ has access to a fuller understanding of the environment which they find themselves in. So real world examples…. Well mostly people are trying to sell you stuff.. sigh, you know the drill, you walk into a department store and as you approach the perfume department the stores app will sense your proximity (and odour!?!) and will tell you what special offers are available today.

Click here to read the full blog.

Written by Conrad Rowlands, Team Leader and Developer, DSCallards 


Visit www.dscallards.com for more information on our Development Services.

Building Blocks – Objective C

You can only work for so in the world of Objective C before you become exposed to the concept of ‘Blocks’. A very powerful tool in the arsenal of any developer they can drastically increase the amount of code reuse that a developer can leverage in their program. Code reuse is of course a great thing as tried and trusted code can be relied upon to perform correctly and will need the minimum amount of testing whereas duplicated code tends to, as a former colleague of mine used to remark,  lead to the worst kind of inheritance; that is :-  ‘clipboard inheritance’ responsible for many a brainteasing bug. I have also seen it reported that Blocks effectively give you ‘lambda’ in Objective C which as a heavyweight user of LINQ in my preferred language C# I must admit makes me feel a little easier about taking on more Objective C work. They are however a little bit tricky to get your head around when you first come to dealing with them.

Click here to see full blog article.


Written by Conrad Rowlands, Senior Systems Architect and Developer, DSCallards

Visit www.dscallards.com for more information on our Development Services.

Using Visual Studio Templates to Scaffold ‘Framework Stacks’

Any applications developer worth their salt will, even when they have downtime, look for new ways to make themselves more productive whilst retaining their quality levels. One such way that we do this is to have ‘Application Frameworks’, common blocks of code and infrastucture that we use on every project. If we were to write this infrastructure and wiring on every project it would just add to the cost and to the drama.

Click here to see full blog article.

Written by Conrad Rowlands, Senior Systems Architect and Developer, DSCallards


Visit www.dscallards.com for more information on our Development Services.

iPad Orientation Issues

ipad-layout-with-landscape-portrait-modesOn a recent i-Pad development project using Phonegap and the Ionic framework we ran into issues with the orientation seemingly being set to portrait only. We had been labouring under the somewhat misplaced apprehension that changes in orientation were just supported with no code being necessary.

Upon looking further into this and seeing what other peoples experiences were there seemed to be a lot of people writing handlers to display when the orientation changed such as this:-
Click here for more.
Written by Conrad Rowlands, Senior Systems Architect and Developer, DSCallards

Visit www.dscallards.com for more information on our Development Services.

Where Have You Been All My Life?

Every once in a while a technology comes along that once you have become accustomed to it you wonder how you ever got by without it. For me the ‘stand out by a mile’ example of this is of course LINQ and lambda which if I do not use within any given day means that I’m probably on holiday or procrastinating.

Sometimes, and much more rarely a tech comes to my attention that has been in existence for many years and once used I think…

‘Man, where have you been all my life?’

Read the full blog here.

Written by Conrad Rowlands, Senior Systems Architect and Developer, DSCallards 


Visit www.dscallards.com for more information on our Development Services.

Beautiful South

http://proudsalopian.files.wordpress.com/2014/03/code_django.pngI have recently been looking into Django and Python as a new direction for my own programming. Whilst the default database migration is quite cool I think that for longer term projects with lots of iterative changes dbSync just does not cut it.
It didn’t take much digging to find mention of a project called South which is a more fully featured database migration tool for grown ups. Having had the migrations work without issue in DBSync I thought that once I had got South installed it would be a simple case of migrating and the job would be, as they say, ‘a good one’. Turns out that South is maybe a little less forgiving than I had thought….

I started off with some of my models defined…. Creating the actual upgrade scripts is as simple as issuing the following command:


$ python manage.py schemamigration MyApplication --initial
 
A cursory examination of my app and I now see a migrations folder, contained within is a 0001_initial.py file which contains the code required to upgrade my database. Great, without examining too closely I continued to apply the patches to the database

$ python manage.py migrate MyApplication
 
This too went of without issue and a cursory test of one of the models proved that my changes had indeed been applied:-

>>> from MyApplication.models import MetricIndex
 >>> MetricIndex.objects.all() []
 
Doesn’t look like much, but the empty block of course means that I have returned an empty array and NOT a big fat juicy error which is good! However my cursory examination of the upgrade script meant that I missed the detail…. I am using abstract inheritance for my tables because with many of the tables they have a lot of common fields. These fields are defined within an abstract model interface and then each table inherits from that. The upshot is I should have 1 database table created for each concrete class and no tables  created for the abstract classes. This was not what the scripts had generated within them. My model classes were defined thus:-

class ModelBase():
 Name =models.CharField(max_length=255)
 Order =models.IntegerField(default=-1)
 class meta:
 abstract =True
class MetricIndex(ModelBase):
 pass
 
Strange it should have worked… I should have had one MetricIndex table with two fields and no ModelBase table. The answer turned out to be frustratingly simple ( and remember, this worked correctly with dbSync). My abstract class was not defined correctly, ‘class meta’ should in fact have been ‘class Meta’. I applied the changes to the code as below

class ModelBase():
 Name =models.CharField(max_length=255)
 Order =models.IntegerField(default=-1)
 class Meta:
 abstract =True
class MetricIndex(ModelBase):
 pass
 
I then prepared the database script to migrate to the next iteration of the schema thus…

$ python manage.py schemamigration MyApplication --auto
 
And applied the schema changes as below

$ python manage.py migrate MyApplication
 
Voila…. I now had one properly formed MetricIndex table and no ModelBase table. Onward and upward and I urge you to use this great tool!

Written by Conrad Rowlands, Senior Systems Architect and Developer, DSCallards

Sql Server Data Tools Issues

So, there I was beavering away on a Monday morning scoping some changes for some new work for a client. I have recently had a new super quick desktop built for me with Windows 8 (bygones) and all of the usual development tools installed. Visual Studio 2012 is currently our tool of choice twinned with in this instance Sql Server 2012.
200428509-002
In the midst of my scoping I came across some database stored procedures being referenced that I felt unclear about exactly how they achieved their goal. I decided to investigate further by examining the SQL scripts that we keep within our project solution as a matter of course. So I double clicked to open the files as you do and…

Hmm, not what I was expecting to see.

enter image description here

As I previously stated I have recently had a new machine built for me, Visual Studio 2012 and SQL Server 2012 already pre-installed  and I was not expecting such a broken installation. I tried again and did a few more investigations like trying to creating a database project, nope all broken. So I resorted to my most excellent friend, Google, and after a little research here  found that I needed to ensure that my SSDT was up to date. The article spoke about a ‘Check For Updates’ menu item being available from my SQL menu. OK, this was the first clue as I had no SQL menu! I thus downloaded the latest SSDT installation and ran the installation program.

What do you know, it now all works!

I hope this helps.

Written by Conrad Rowlands, Senior Systems Architect and Developer, DSCallards 


Visit www.dscallards.com for more information on our Development Services.

Wireframing with WireframeSketcher



design-520x245The importance of wireframing an application to allow free and frank discussions with a potential client, cannot I think, be overstated. To this end we use WireframeSketcher. Potential clients generally dont care about the technology behind an application, indeed they dont really care about the controls you use. They just want to know how they will interact with it.
 
Read full blog here.

Written by Conrad Rowlands, Senior Systems Architect and Developer, DSCallards 

Visit www.dscallards.com for more information on our Development Services.

Warm Fuzzy Feeling

Software matters, this much we have ascertained from an earlier blog on ‘that car!’. I think it may be fair to draw a comparison in some ways between something else that really does matter, relationships.  Like any relationship we should be in it for the long haul,  ultimately everybody gets much more out of the software if its not a quick ‘get it done and boot it out of the door’ thing. There’s no feelings of guilt about having done a half job nor the shame of being in it for the one thing, money. In addition there is no awkward history to catch up with you when you least expect it and no sense of the whole relationship being just another logo on your ‘customers’ page .

Read full blog here.

Written by Conrad Rowlands, Senior Systems Architect and Developer, DSCallards 


Visit www.dscallards.com for more information on our Development Services.

Ascertaining Geographic Data within an SSIS Import

Capture
So, You probably had it before… A client asks you to plot their addressing data on a map of some sort. Its not an issue you tell them, make sure that within the the data you have the appropriate latitude/longitude data for the address and we will do the rest.. And thats where the awkward silence starts, they haven’t got this data, they NEVER have and data costs!

There are of course ways around this with Google maps of course being top of the list of possible non paying solutions. I thought I’d share my experiences of this with you…. We needed to implement an address look up on an initial import of data using our ETL tool (SSIS). Whilst not being major surgery this is slightly more than ten minutes work …..

Read full blog here.

Written by Conrad Rowlands, Senior Systems Architect and Developer, DSCallards 


Visit www.dscallards.com for more information on our Development Services.

Say What?


So, We have an inherited VB website that we just bought under our own processes and controls. We like to keep things tidy and as a result of this decided to place the website under a Visual Studio solution within it’s own ‘website project’ (not application). There are several other projects associated with the application and as such it makes sense to store them all within one solution, this way anyone who elects to come ‘caped like’ to the rescue does not have to search disparate areas within the whole organisation for the source. All good.

I was then tasked with plugging the solution into our internal build processes (we use CCNet) and after a little scratting around to find how you build a web site the I was hopeful that my work was nearly at end. Upon kicking the automated build off all seemed to go without issue until I got  the following rather spurious error whist trying to ‘Publish’ the website :-

Read full blog here.

Written by:  Conrad Rowlands, Senior Systems Architect and Developer, DSCallards

Visit www.dscallards.com for more information on our Development Services.

Gandalf Gives a ‘Bit’ of Inspiration


So there I was in Camden High Street (which was weird because I live in Devon) posting a letter and minding my own business when a unicorn came along carrying Gandalf the Grey (who was actually my mum in a beard, bygones….) and he spake unto me.

“Young Wizard, have you never thought of using a bit field to represent related data within a database?”

The question threw me, In part because I really like the look of the giant sized marshmallow that Gandalf was now devouring, in part because I wasn’t aware that Gandalf had any interest in RDBS techniques but mainly because I hadn’t ever considered it

Read full blog here.

Written by:  Conrad Rowlands, Senior Systems Architect and Developer, DSCallards


Visit www.dscallards.com for more information on our Development Services.

Float Like a Butterfly ... Errr




floatlab



I know, I know…., in an ideal world we’d all have the latest and greatest browsers but in the real world companies are not so ‘lithe’ when it comes IT infrastructure.

Recently whilst putting a .NET web project to bed we had some reports from the field of some rendering issues with Internet Explorer 7.  Of course we had tested IE 7 using the compatibility modes present within later versions of IE but seemingly this does not throw up many issues that arise in the ‘real’ browser.


One such issue being reported has been recorded in my blog, here.

Written by Conrad Rowlands, Senior Systems Architect and Developer, DSCallards.


Visit www.dscallards.com for more information on our Development Services.

Theory of Relativity



Recently whilst putting a .NET web project to bed we had yet more reports from the field of some rendering issues with Internet Explorer 7.  Of course we had tested IE 7 using the compatibility modes present within later versions of IE but seemingly this does not throw up many issues that arise in the ‘real’ browser.

Relativity-formulaI know, I know…., in an ideal world we’d all have the latest and greatest browsers but in the real world companies are not so ‘lithe’ when it comes IT infrastructure.

The issue being reported was that one form displaying an accordion control, which in turn had embedded within it a scrollable div which in turn contained three or four divs as well as a JQGrid was having ‘issues of parentage’… When the main scrollable div was being scrolled all underlying divs were being rendered correctly and scrolling with the content whilst the JQGrid was not moving at all, just merely floating in space and generally getting in the way. After a lot of digging I found the following solution that cured my issues:- The main HTML was defined thus











  with the ‘QuestionnaireGrid’ being the location that the javascript JQGrid is rendered into, The issue however seems to lie with the parent div and not the JQGrid itself, what I needed to do was attach a style via the css to the ‘QuestionnaireGridContainer’ div like thus:
 
 





This ‘position:relative’ style  in this instance seems to explicitly force all children objects to behave correctly with regard to their location within time and space and now when i scroll my div content all child objects are scrolled exactly as I would expect.

Written by:  Conrad Rowlands, Senior Systems Architect and Developer, DSCallards 


Visit www.dscallards.com for more information on our Development Services.

Sending Error Mail from Elmah


As part of a recent release of a web application we decided that in order to make the best use of error logs being created by Elmah we should email these to stakeholders as and when they happen to improve the general response times. Here is how we set up ‘that thing’ in our .NET MVC4 application! The red sections indicate properties that were either added or edited to enable the email functionality and green section indicate those fields you will need to change to reflect your choice of smtp server.

Click here for the full blog.

Written by:  Conrad Rowlands, Senior Systems Architect and Developer, DSCallards


Visit www.dscallards.com for more information on our Development Services.

Displaying Alternative Coloured Images in JQ Grid


RedAmberGreenWhilst coding up a recent .NET MVC application built heavily using JQGrid I came across a requirement which to be honest I struggled with at first . In short I wanted to, on a column by column basis, colorise the icons that were to be displayed. Now JQGrid supports a icon colorset which seemingly cannot be changed easily so in the end I had to resort to changing the styles. Here is how I achieved this, warts and all….


Firstly of course JQGrid uses the standard set of JQuery Ui Icons to provide its user interface. I say ‘Icons’ but this is of course provided as one image which is broken up into sprites of 16 x 16 pixels, more of that later. So the first step is to download the set of colour icons that you require…. JQueryUI.com provides a standard set of these icons rolled in every colour you can dream so its in fact very easy. The hardest part is arriving at your chosen colours!

Click here for the full blog.

Written by:  Conrad Rowlands, Senior Systems Architect and Develope, DSCallards 

Visit www.dscallards.com for more information on our Development Services.

The Piece of Wood and Full Possession of the Facts



 Wood


Now I can’t lie to you, I’m not an insanely practical man….. When it comes to home repairs and the like I’d prefer to pay a man (or woman) who knows what they are doing to do the job; They won’t swear half as much, will generally get the job done without resort to every ill fitting tool in my toolbox, without the use of a calendar and they’ll also have an understanding of the problems that are likely to be encountered on the way. More importantly they’ll plan to avoid the potential issues. (in)Famously I once tweeted that ‘there are only so many ways that 15 pieces of wood can be put together to make a wardrobe, I know because I’ve tried all the others!’

I once knew a guy who was immensely practical, being a general builder for much of his life I asked, and he agreed, to assist me with repairing some windows as I wanted to learn; maybe I could become self sufficient in all my windowing needs and move onto doors and the like… possibly take over the world, I don’t know what I was thinking. Anyway we first needed some strips of wood to replace the pieces that we were going to have to break in repairing the window. How hard could this be? I mean it’s just a piece of wood right, so long as the dimensions are fine and it looks clean…. However I was aware of time passing as we stood in the local ‘shed’ looking at various seemingly identical pieces of strip wood. After he had discarded what seemed like the 7th identical piece I asked what he was doing… I don’t remember his exact response but I do remember that he was particularly keen to ensure that the grain of the wood was absolutely as he needed for a good deal many reasons. It was at this point that my practical life in windows was curtailed as there was clearly way more to think about that I had previously imagined.

I know what you re thinking….. no code snippets in a developer blog? The answer this week is a resounding No! Before one line of code can be written the problem MUST be understood in it’s entirety, you can’t code for a problem until you understand the problem and you can’t code a solution unless you understand how your chosen platform allows you to best solve a problem, well you could but like with the window if we’d used just any piece of wood it would likely have just broken midway through the job.

I guess you can sum this post up in one word ‘Experience.’

Written by:  Conrad Rowlands, Senior Systems Architect and Developer, DSCallards 


Visit www.dscallards.com for more information on our Development Services.

Setting Default Data for Add New operation using .NET MVC JQGrid

Of late I have been working with the .NET MVC JQGrid control for a relatively simple project and have found myself asking all sorts of questions of the technology which do not seem to be easily and readily supported without resorting to hacking around in HTML. One such example came up recently where I needed to default the value for a column upon creating a new Company record. After posting on the forums I was directed to a ‘sample’ which actually showed me nothing even though the forum poster had responded with an answer that was meaningful. I thus decided to document the actual methodology so that you don’t have to!

In short I have a Responder object which upon creation needs the ‘ResponderType’ property to be primed with the value ’2′ to indicate what type of responder we are creating. I have included a full listing  of the ‘MVC’ components although only the items highlighted in bold red are actually pertinent to this blog post. The rest is provided for completeness (although as the code has been derived in reality from some abstracted classes there may be some errors, so apologies in advance).

Click here for the full blog.

Written by:  Conrad Rowlands, DSCallards, Senior Systems Architect & Developer 


Visit www.dscallards.com for more information on our Development Services.

Happy to do Superficial ...

So…. Sometimes the very simplest of things can take gargantuan efforts to work out and you find out that the detail really is just too much detail.
 
Just such a  situation happened with me this week when working on a site I am developing. I needed to implement the sending of an email once a post had been received from an MVC page to indicate that a booking had been made. The mail would be sent both to the establishment where the booking was made as well as a copy being sent to the person making the booking. I elected to use the inbuilt System.Net.Mail class, how hard can it be right?…… Well A damn sight harder than I thought that’s for sure! 

This week there will be no code sample as code was in this instance not at fault or has no bearing on what was happening. To cut a very long and very boring story short it did not matter what I did I could not get the mail class to send the mail; upon sending, the operation would timeout or the server would disconnect etc etc. It made no sense so I took a step back. I had been utilising my Yahoo account using the smtp.mail.yahoo.com server and of course as this was secure and requires authentication I used port 465. 

So I thought maybe the issue is with Yahoo and I changed to my Google account instead using the smtp.googlemail.com SMTP server again with port 465. Still no dice…..Odd. Much headbanging later and I stumbled across this StackOverflow article which led me on to this blog

Now I’m not going to lie and say that it all makes sense to me. It has at least allowed me to at least find a workaround by in this instance using port 587 on my Google SMTP server. If I sat down and thought about it I’m sure I could understand in finite detail what exactly Explicit SSL is and why the .NET mail client only supports this type of SSL, the point is…. I just don’t want to! I feel like I’ve already wasted enough time dealing with this bug (I’m sorry, Its not a feature its a bug whatever they say and one they seem reticent to fix). 

Normally I’m a man who likes to get the detail, a superficial overview is never normally enough as it leads to design mistakes. However in this instance I now know in enough detail for me that the .NET mail class does not support all SSL SMTP conversations and I’ll continue to bask in my own ignorance.

Written by Conrad Rowlands, Team Leader and Developer, DSCallards  

Visit www.dscallards.com for more information on our Development Services.

Case Insensitive Lookups with SSIS

Whilst recently compiling a reasonably complex transformation to bring in some data from an Excel spreadsheet I was left in the situation where I had a some look ups that were failing to resolve due to case sensitivity. This was a failure on my part really as I should have understood from the outset that this could have been the case and I should have factored this in from the start but I didn’t. No problem usually, You can just change the case at the source and and in the look-up component and you’re there. 

However… In my situation this was not feasible without me throwing myself out of the nearest window and making finger paintings with my own blood in my dying moments. The reason for this is that I had about 50 separate sources which is an onerous task in itself. In addition to this as I was ‘unioning’ all of this data together using the union component and then going through several more complex transformations with additional unions along the way it was getting very messy. The union components do not refresh with new fields when the source changes and so the only way to correct this is to drag new union components on in place of the old ones! This in turn means that all of the adjoining components also need to be refreshed and even talking about it I can feel the end approaching.

Read the full blog here.

Written by Conrad Rowlands, Team Leader and Developer, DSCallards 

Visit www.dscallards.com for more information on our Development Services.