Posts Tagged ‘json’

18 Sep 2012
3

TUTORIAL: Integrating XPages with DB2 – Part 2

Hi everyone. So, just 2 things firstly:

1. This is an extended Post to David Leedy’s NotesIn9 Posting of “Intro to XPages and Relational Data – Part 2“.

2. I do apologize that this took a while to publish. This is one of the more challenging years to find some free time to contribute to the Domino and XPages community. Having said that, I have quite a few Video Tutorials planned before this year ends, so stay tuned :)

 

Now that that’s out the way…..this post is Part 2 to the “Integrating XPages with DB2 – Part 1“. In this Video I show you how to Create/Read/Update/Delete DB2 Data using XPages. More importantly, I show you how to empower the User to perform all these functions via a User Interface. It’s usually easy to write this logic in the back-end, but a little more involved when handing that power over to the User.

 

The good news is that it’s fairly straightforward. I show you some quick functions that will get you up and running in no time. As I explained in the Video though, there are much more advanced ways of integrating to DB2. This will involve some knowledge of DB2 itself. The keyword is…..”Stored Procedures“. This is where the power lies. A Stored Procedure is very much like a Sub Routine in LotusScript or a Function in Java or JavaScript, but you code in SQL Language. You can pass the Stored Procedure parameters, have all your logic neatly set out in a central place in DB2 and return values from the Stored Procedure which will allow you do things like create Child Documents, etc.

Later on in the near future, I will think up a straightforward Tutorial which will show you how this all works.

I hope you enjoy this Video. I really enjoyed making it. It was one of my smoothest recordings where everything went right the first time.

I want to thank David Leedy as always for adding this to his NotesIn9 Series. You da man :)

Cheers.

John

 

IMPORTANT NOTE: If you are not able to view this Video in HD, please Click Here to open this video up in a different Player.

29 Feb 2012
13

TUTORIAL: Integrating XPages with DB2 – Part 1

Hi everyone. I’m happy to announce a Video Tutorial where I explain how to integrate one’s XPages Application with DB2 directly, and not through back-end Forms and Views.

The trick here is to have a bit of JDBC understanding, as well as a basic understanding of Relational Databases and SQL Query.

To work with this Video Tutorial, you’ll need to have the following in place:

1. An installed version of DB2. This can be DB2 Express as well, which is free – Click here to download.

2. An installed version of Domino Designer 8.5.3. I tested everything on my Domino Server, but there’s no reason why this shouldn’t work using your local HTTP session for Domino Designer – Click here to download.

3. An UpdateSite to install OSGI Plugins on Domino Server. NOTE: The UpdateSite database gets used for Domino Servers, and will not work for your local environment. To test everything using your Local HTTP, you’ll need to install the OSGI Plugins manually. You do this by extracting the contents of the Plugins Zip File to the Notes Data Directory, under “domino/workspace/applications/eclipse” folder.

 

Click here to view the Tutorial on how to setup the UpdateSite database and deploy OSGI Plugins on your Domino Server.

 

4. With reference to point number 3, Install the XPages Extension Library and JDBC Driver Plugins.

Download XPages Extension Library

Download JDBC Driver

 

5. Once you’ve deployed your plugins to your Domino Server, you can type in the following Commands to check if the Plugins were installed properly:

XPages Extension Libary:

tell http osgi ss com.ibm.xsp.extlib

JDBC DB2 Plugin:

tell http osgi ss extlib.driver.db2

The Domino Server should return information relating to the plugins you installed.

 

6. Here’s a copy of the Code that needs to be added to the db2.jdbc file that I speak about in the Video

<jdbc>
<driver>com.ibm.db2.jcc.DB2Driver</driver>
<url>jdbc:db2://localhost:50000/TESTDEMO</url>
<user>db2admin</user>
<password>password123</password>
</jdbc>

 

7. Here’s a copy of the Code that I use in the Video to add/remove/update and delete data in DB2

var mydata = {
FIRST_NAME: “John”,
LAST_NAME: “Jardin”
}

@JdbcInsert(“db2″,  “JJARDIN.USERPROFILES”, mydata)
var mydata = {
FIRST_NAME: “Sean”,
LAST_NAME: “Smith”
}

@JdbcUpdate(“db2″, “JJARDIN.USERPROFILES”, mydata, “ID=?”,1)
@JdbcDelete(“db2″,”JJARDIN.USERPROFILES”,”ID=?”,1)

 

I trust you will enjoy this Video. A Big thanks to David Leedy for making the video part of his NotesIn9 Series, and congrats once again on his recent milestone of 100 000 Views.

Also, another Big Thanks to the Domino and XPagees community, for always been available to assist wherever help is needed.

 

STAY TUNED FOR PART 2 OF XPAGES AND DB2 INTEGRATION!!!

 

25 Oct 2011
0

Ukuvuma Xpages Showcase – The Project Manager Dojo Grid

Hi Everyone. It brings me great please to announce our first Xpages Interactive Demo. In our Showcase, I demo a Project Manager Report, developed using a Dojo Tree Grid Report. The Grid gets populated using JSON, and all the Business Logic is written in Server Side Javascript.

You’ll see I’m also using the Application Layout Custom Control from the Xpages Extension Library, which you can find on OpenNTF.

A quick Note, if you change the selection from “All Projects” to “Selected Project(s)“, you’ll see Mark Hughes’s View Picklist Custom Control in action.

Click Here to open the Ukuvuma Xpages Showcase. You will get to a login page. Simply enter ‘guest‘ as the Username and ‘guest‘ as the Password. I more than welcome feedback and comments from everyone. Enjoy :)

NOTE: This Showcase is hosted in South Africa, and while it will provide an almost real time experience for South Africans, it might take a few seconds to load internationally.


COMING SOON!!! Create Timesheets and Projects using a Xpage Timesheet Dashboard.

22 Oct 2011
1

A full day of Xpages and Dojo

9QKUWDNWXP5W
Good day/evening all :)

As I had hoped, I had an awesome 10 full hours of XPages today. What a learning curve for the most part. I made the decision this morning to investigate and manipulate some of the Controls in the XPages Extension Library. Sadly, I found a defect as well as an inconsistency.

First and foremost, a big SALUTE to the XPages Community for supporting me today. You guys make programming in XPages such a joy.

Today I created a Travel Requisition Dashboard, which is made up of the following:

The defect I found was in the Dojo Tab Container. It works well for the most part, but if you enable the “Closable” Property in the Dojo Tab Pane, you will experience a hiccup now and then. Essentially, if you try to close a tab when that tab is inactive (i.e. if you’re currently viewing another tab), the tab will be removed in the UI, but not in the backend, which just messes up your entire page. I will be logging this on OpenNTF soonest and hopefully the guys will sort it out soon.

Then, I used the Extension Library Dialog Control, and inside it, I added the Dojo Accordion Container with the Button Dialog. After much troubleshooting, I finally got it working in Firefox, but sadly not in Chrome or IE. I had to wash my hands off the Dialog Control for now.

Then, thanks to Jeremy Hodge and Mark Hughes, I got the ZetaOne Modal Dialog working on my Page. It took a little while initially, but once I got it up and running, I added the Accordion Container, and guess what….My first test was successful on IE, Firefox, Chrome and Safari. Now that’s what I call POWER CODE.

To sum it up, it’s Friday 10:30pm, and it’s been a Power Day. I look forward to chilling a bit this weekend. New Zealand play France tomorrow.

Have a good weekend all.

John

8 Oct 2011
0

Weekly Wrap Up For – 8th August 2011

Hi Everyone. I trust everyones weeks and weekends went well. Mine was pretty inventive. Below is my first Weekly Wrap up on this Blog. I trust you will enjoy it, and comments are always welcome :)

AGENDA

1. Wrap Up (Personal Life) – A wrap up of events that occurred in my personal life for the past week

2. Wrap Up (Work Life) – A wrap up of events that occurred in my work life for the past week

3. Why this week Mattered – Events that occurred in my week that I feel made a difference in my Personal and Work life.

4. Forecast for the following week – My general plan for the following week that i’ll most likely blog about.

5. Conclusion – A final Thought.

1. Wrap Up (Personal Life)

One of the reasons I enjoyed last week is because I am starting to dedicate more time to my personal life. Work has been hectic of late, but I am positive that balance will soon be restored.

My family came to visit this weekend, as we had a 30th and 60th celebration on Saturday for my Cuzzy and Uncle. It was awesome to see everyone again. My brothers and I also finalized a game we invented called Frispoline which involves a Frisbee and a Trampoline. Check out the 2 short videos below for stunts my brothers and I are currently pulling off :)

My favorite Rugby Team (The Sharks) beat Western Province on Friday…What a nail biter….They took the game in the last 4 minutes. The Springboks unfortunately lost against Australia. Don’t worry guys, there’s still 1 more game, and then THE WORLD CUP!!!
Other than that, I watched Hereafter which I didn’t really enjoy. The trailer oversells the movie. It was good to see The Bone Collector again. I’m quite a Jeffrey Deaver fan.

Finally, happy Womens Day to all the women out there for Tuesday the 9th August 2011.

2. Wrap Up (Work Life)

The week started off a little hectic. It was a week of deadlines and reviews. I’m glad to say that all were met. I’m especially happy that I ended off my week by presenting to one of my clients their first Xpage Report, which involves a Dojo Tree Grid that gets populated using JSON. I am planning a video tutorial on this in the near future, but will first be showcasing the technology on my Company Website in the next 2-3 weeks. I’m also wondering if I will be able to turn this Tree Grid into a Custom Control. Shouldn’t be too scary. I know it would add value to many developers out there.

After my awesome Xpage Presentation, I met 2 hours later with another of my Clients to discuss their first Xpage Application. This technology is selling like Hot Cakes.

3. Why this week Mattered

One thing that mattered for me was that one of my Microsoft developers got a taste of extending the oneuiv2 Theme in Xpages, as well as playing around with some Xpage Controls. This has led him to become very interested in what the technology has to offer, which is always great to see.

4. Forecast for the following week

I’ve been tasked by IBM to Review a R8 Designer Tutorial they created and that they want to use for their Domino Designer Wiki. I happily volunteered for this, and can’t wait to submit my feedback to them at the end of the week.

I have scheduled 3 Enhancement Implementations at my clients, which I am quite excited about.

I will also be migrating many of my tutorials to this Blog. They currently only exist on my BleedYellow Blog as they focus mainly on Domino and Xpages Development.

5. Conclusion

Well, this is my first official Wrap Up. In some ways it feels weird to blog about all of this, but hey…I am assuming that someone out there will be entertained with what I have to say. It also helps me not sound too serious, which is how I am portrayed when submitting tutorials, videos, etc.

I definitely welcome feedback from everyone out there. Feel free to follow me on Twitter, or wherever else.

Have a good day all :)