If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How is your Javascript breaking on an upgrade?

Started by melee, 10 Feb 2011 10:38:35 AM

Previous topic - Next topic

melee

Since I'm so new to Cognos, I haven't experienced an upgrade where everything breaks because IBM decides to change how they render prompts or something.

As a matter of fact, I have no way of knowing if any of the jQuery stuff I've been writing will translate to 10, because frankly, we use none of it at my job. I think I have a pretty solid strategy, though.

If I had to guess, I think that the problem is with Javascript breaking because of code like warping - the ID or class is changed, then everything breaks. I've countered this by wrapping pretty much all of the elements I'd like to manipulate in HTML items and giving it a div with an ID. I'm pretty sure that isn't going to change through an upgrade, as I'm writing static code, not the rendering engine.

I'm also selecting by element and position, which may create a problem. Unlike Javascript without a framework, because most of the operations are one line only in jQuery, finding and resolving issues should be easy even in my absence. For example:

jQuery("#YOURIDHERE option:first").remove();

This code for removing an option is one line and pretty much self-explanatory. Go to the ID, and find the first option in that prompt. It's hard to see a scenario where this would change drastically during an upgrade.

So that's what I'm asking! There's a sense of fear when it comes to using JS with Cognos - it would be naive to say it's not a problem, but I think maybe developers are overcomplicating the JS and introducing developer tie-in with their code. What are you seeing?

RobsWalker68

Hi Melee,

I'm not sure if its the fear of code breaking on upgrade for many companies than it is the fear of no support from IBM or their IBM partner.  I must admit, I find it interesting, although I'm no coder, and there are some great scripts out there but I try to avoid it where I can on a client site and keep it as very much last resort kind of stuff.

I think this is especially true of the larger companies, who are typically direct IBM clients, and who rely on a lot of temporary contractor support to fulfill projects. The company I'm working for example ban the use of scripting in all Cognos reports.  If there is no away around it then they would rather formally do a mini project and do it in SDK which is then supported by IBM

I think very much they want to avoid having to think about possible java scripting in reports that then break on upgrade and which when referred to IBM are declared outside of the IBM support agreement.

Rgds

Rob





melee

Great point - I think that goes back to code tie-in. If a developer comes in and doesn't comment code or anything, I can easily see how hard it would be for someone else to come in and play clean up in the event that something breaks.

RobsWalker68

Hi Melee,

Your completely correct about commenting and writing good code but you also need to take into account that if a temporary contractor writes something for a project and then hands the report over from development to the production team there may not be anyone in the production support team who understand the script to fix it.  This equally applies to a full time employee who knows scripting and then leaves a company.

As a real life example, I'm on contract at the moment writing reports but once signed off in UAT and I've completed the contract I'm under no obligation to fix anyrthing should they upgrade and then not work.  That's IBM's issue (although of course I would always help out where possible for client relations :D) and would be covered by the normal support agreement.

If however, I find a bit of script on the web to sort some prompt issue then should it break at upgrade, and the report is vital, IBM are under no obligation to fix it.  I may be on another contract and therefore not available. The company is therefore stuck with perhaps a vital report than no one can fix internally and IBM won't support.

If the skills are in the organisation then go for it as long as you have IS agreement in advance to support it then its not an issue, otherwise its a bit of political minefield.

Hope that didn't sound too preachy, just a few obsevations  ;)

Cheers

Rob




Arsenal

IBM does not officially "support" JS's, but if during an upgrade your JS heavy project breaks, then they can always "help" you out by sending in a $250/hour consultant for a few weeks to "fix" what was broken  ;)

If the client has premium support, then depending upon the leverage the client has, IBM's in-house SDK team will assist you in upgrading Javascripts. Due to the cost of premium support, only pretty big clients (think banking giants, insurance majors etc.) will have it and all of them will pretty much have solid influence at IBM, but some are alwaos more equal than others  ;) I know it first hand from a prior client....boy, did we hammer IBM when we went from 8.2 to 8.3 and many of the Javascripts (that IBM consultants had put in, in the first place) broke. We had gotten IBM to fix each and every one of them. After that, we swore no new JS in any report except SDK.

Problem with JS is that unless someone has written Java code before, he/she will not be able to fix it, as opposed to a Cognos person who comes in for an upgrade project and if some Cognos functionality breaks, he/she will at least know their way around and how to attempt a fix. JS guys with Cognos experience are not that easily available so smaller clients who don't have much leverage with IBM will bring in the $250/hour consultant from IBM for a few weeks rather than go through an interview process, select an independent consultant etc. and end up wasting a lot of time, while their user community threatens them with dire consequences every day....this is where IBM makes money.

And once you get a user community used to "hacking" (aka "I want these reports to work in this particular way because this is how our prior reporting tool used to work) and making a circus lion out of the tool, it is near impossible to wean them away for it without a lot of fights and arguments and as IT well knows, he who gives the money (i.e. users) usually almost always win in the end. Hence why I advise clients not to use complex JS's at all. If something cannot be done with a JS then just say no to the users. Using simple scripts is fine, but complex scripts is when the shit hits the fan

RobsWalker68

Arsenal, I always thought by your name your were an Arsenal football fan but as you used dollars in the example i guess that was abit off the mark :D

Spot on, you can always fix it, just at what price?  This contract is with an IBM direct Insurance major and yes they could most probably get IBM to fix it at the end of the day but working in the finance division I would need to have a load of meetings with IS , agree procedures, resource and budget to have IS adopt the code and support it going forward.  It then stops being drop a bit of script on a page and more a budget issue.

Cheers

Rob










Lynn

I am in the avoid JS where possible camp, although there are places that don't have a problem with it and have weighed the pros and cons. To blom's point....sometimes you just need to do what you need to do. I've used it on occasion (despite my poor skills in this area) so I don't slap people silly for judicious use of tools at their disposal.

Documentation, especially in circumstances where one has wandered off the straight and narrow, is always important. Unfortunately too many technical people aren't all that good at it; hate doing it; and avoid where possible. When forced, they'll do something to say it's documented and no one actually reads it. If you do bother to read it you discover things like this:

if (a = b ) then ( 'blah blah' ) else ('blah blah blah')

with the ever-so-helpful comment something like this (although to be more accurate I'd need to spell a few words wrong):

/* If A is equal to B then blah blah. If A is not equal to B then blah blah blah */

If you're going to employ SJ then make sure the ramifications of the decision are well understood and that there is documentation that actually says something useful.

P.S. Rob....I also thought the name Arsenal was for the football team! The only reason I even know anything about it was a guy I worked with at my last place who is a big fan and a program that aired on PBS about their new stadium built some years back. They were following things along leading up to when the Queen was supposed to visit and she bagged it at the last minute. Geez I thought those guys were gonna just start crying when they found out!!

melee

Quote from: Lynn on 10 Feb 2011 02:16:35 PM
Documentation, especially in circumstances where one has wandered off the straight and narrow, is always important. Unfortunately too many technical people aren't all that good at it; hate doing it; and avoid where possible. When forced, they'll do something to say it's documented and no one actually reads it.

haha, I guess I'm really good at notating code and writing documentation. I was a teacher for some years, so that definitely helps.

I've practically got a changelog going in every report I've built!

Arsenal

RobsWalker, you had initially thought right - I'm a HUGE Arsenal football club fan but I stay in the US so I have to use $'s  ;)
Am not Brit though I probably watch as much footy as any other European, if not more.

RobsWalker68

Melee, as you were a teacher I'm going to get paranoid about getting my spelling and grammar correct now, especially my former and latter  ;)

Lynn, the Emirates.  See Royalty don't turn up to anything!

And now of course the most pressing issue on this thread, so Arsenal why Arsenal?

Cheers

Rob

Lynn


RobsWalker68

Lol, it told  me to review my thread before I posted.  Glad to hear it I thought it may be because you lived next to a missile silo in Ohio or something.  Come on gooners, it may be your season  ;)

Cheers

Rob


Arsenal

RobsWalker, in 2 words - Dennis Bergkamp. Wasn't a big fan of footy till about 95 although I would watch international games. Then Euro 96 happened. And Holland as a team and Bergkamp as a player caught my eye. Started following both and Bergkamp led me to start watching Arsenal where I saw some DAMN good players besides Bergkamp - Adams, Winterburn, Dixon, Merson, Wright, Seaman to name a few. I had seen someof them occassionaly under George Graham in the early 90's but never really followed them. Arsene Wenger came in to manage and brought in one of my favourite Dutch players besides Bergkamp - Overmars. And followed Anelka, Henry, Petit, Vieira and Sol and I was in footballing heaven. Of course, I've been a severely disappointed fan in the last few years and I do think Wenger is close to losing the plot (the best of them do, Graham, Shankly etc. all lost it at the end) but that's another topic.

Arsenal

lol sorry, I thought Robswalker was asking me why I support Arsenal hence the reply to you,  mate  ;)

RobsWalker68

Hi Arsenal,

No I immediately presumed you supported Arsenal just the $ sign lost me as they don't have the International coverage that Man U, Liverpool have and then thought it must be for another reason  ;D

I'm a Crystal Palace fan, although now living in Scotland but had a gooner mate I used to go and see Arsenal play a Highbury.  Haven't had the pleasure of the Emirates yet!

Ok, haven't got the silverware but their style of play is the most exciting in the Premiership IMHO and maybe this season might produce something.

Cheers

Rob

Arsenal

Quote from: RobsWalker68 on 10 Feb 2011 03:02:55 PM
Hi Arsenal,

No I immediately presumed you supported Arsenal just the $ sign lost me as they don't have the International coverage that Man U, Liverpool have and then thought it must be for another reason  ;D

I'm a Crystal Palace fan, although now living in Scotland but had a gooner mate I used to go and see Arsenal play a Highbury.  Haven't had the pleasure of the Emirates yet!

Ok, haven't got the silverware but their style of play is the most exciting in the Premiership IMHO and maybe this season might produce something.

Cheers

Rob

Au Contraire, Arsenal have more international coverage than Pool do actually. For example, in the US they show Arsenal games regularly and Yankses Sports Network even shows the club's own Arsenal TV programs, which is quite uncommon in the US for clubs other than Utd.

RobsWalker68

Hi Arsenal,

I  happily stand corrected and good to hear that.  Good luck for Wolves on Saturday and maybe with Man U v Man City another step closer  :D

Cheers

Rob