Author Topic: How is your Javascript breaking on an upgrade?  (Read 7693 times)

Offline melee

  • Community Leader
  • *****
  • Join Date: Oct 2010
  • Posts: 95
  • Forum Citizenship: +4/-0
  • Running on the steam of apathy
    • Beautiful Data with COGNOS and jQuery
How is your Javascript breaking on an upgrade?
« on: 10 Feb 2011 10:38:35 am »
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:

Code: [Select]
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?

Offline RobsWalker68

  • Statesman
  • ******
  • Join Date: Apr 2009
  • Posts: 299
  • Forum Citizenship: +28/-1
    • Linkedin Profile
Re: How is your Javascript breaking on an upgrade?
« Reply #1 on: 10 Feb 2011 12:47:56 pm »
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





Offline melee

  • Community Leader
  • *****
  • Join Date: Oct 2010
  • Posts: 95
  • Forum Citizenship: +4/-0
  • Running on the steam of apathy
    • Beautiful Data with COGNOS and jQuery
Re: How is your Javascript breaking on an upgrade?
« Reply #2 on: 10 Feb 2011 12:51:45 pm »
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.

Offline RobsWalker68

  • Statesman
  • ******
  • Join Date: Apr 2009
  • Posts: 299
  • Forum Citizenship: +28/-1
    • Linkedin Profile
Re: How is your Javascript breaking on an upgrade?
« Reply #3 on: 10 Feb 2011 01:25:16 pm »
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



 

Offline Arsenal

  • Statesman
  • ******
  • Join Date: Feb 2007
  • Posts: 384
  • Forum Citizenship: +18/-1
Re: How is your Javascript breaking on an upgrade?
« Reply #4 on: 10 Feb 2011 01:41:01 pm »
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  hits the fan

Offline RobsWalker68

  • Statesman
  • ******
  • Join Date: Apr 2009
  • Posts: 299
  • Forum Citizenship: +28/-1
    • Linkedin Profile
Re: How is your Javascript breaking on an upgrade?
« Reply #5 on: 10 Feb 2011 02:03:31 pm »
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


 







Offline Lynn

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 2,701
  • Forum Citizenship: +341/-1
Re: How is your Javascript breaking on an upgrade?
« Reply #6 on: 10 Feb 2011 02:16:35 pm »
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:

Code: [Select]
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):

Code: [Select]
/* 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!!

Offline melee

  • Community Leader
  • *****
  • Join Date: Oct 2010
  • Posts: 95
  • Forum Citizenship: +4/-0
  • Running on the steam of apathy
    • Beautiful Data with COGNOS and jQuery
Re: How is your Javascript breaking on an upgrade?
« Reply #7 on: 10 Feb 2011 02:29:02 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!

Offline Arsenal

  • Statesman
  • ******
  • Join Date: Feb 2007
  • Posts: 384
  • Forum Citizenship: +18/-1
Re: How is your Javascript breaking on an upgrade?
« Reply #8 on: 10 Feb 2011 02:39:49 pm »
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.

Offline RobsWalker68

  • Statesman
  • ******
  • Join Date: Apr 2009
  • Posts: 299
  • Forum Citizenship: +28/-1
    • Linkedin Profile
Re: How is your Javascript breaking on an upgrade?
« Reply #9 on: 10 Feb 2011 02:42:48 pm »
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

Offline Lynn

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 2,701
  • Forum Citizenship: +341/-1
Re: How is your Javascript breaking on an upgrade?
« Reply #10 on: 10 Feb 2011 02:45:34 pm »
You missed his post!!

Offline RobsWalker68

  • Statesman
  • ******
  • Join Date: Apr 2009
  • Posts: 299
  • Forum Citizenship: +28/-1
    • Linkedin Profile
Re: How is your Javascript breaking on an upgrade?
« Reply #11 on: 10 Feb 2011 02:45:52 pm »
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


Offline Arsenal

  • Statesman
  • ******
  • Join Date: Feb 2007
  • Posts: 384
  • Forum Citizenship: +18/-1
Re: How is your Javascript breaking on an upgrade?
« Reply #12 on: 10 Feb 2011 02:51:26 pm »
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.

Offline Arsenal

  • Statesman
  • ******
  • Join Date: Feb 2007
  • Posts: 384
  • Forum Citizenship: +18/-1
Re: How is your Javascript breaking on an upgrade?
« Reply #13 on: 10 Feb 2011 02:52:27 pm »
lol sorry, I thought Robswalker was asking me why I support Arsenal hence the reply to you,  mate  ;)

Offline RobsWalker68

  • Statesman
  • ******
  • Join Date: Apr 2009
  • Posts: 299
  • Forum Citizenship: +28/-1
    • Linkedin Profile
Re: How is your Javascript breaking on an upgrade?
« Reply #14 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

 



       
Twittear