Johnno's Workbench - 2/18 - Tips, Tutorials, Domino, XPages, Java, Mobile, Appcelerator, etc

7 Jan 2014
2

Convert MySQL queries to MongoDB using QueryMongo

I needed to perform a query search in MongoDB based on an array of values. I referenced MongoDB’s Manual, which provides great examples of comparisons between SQL and Mongo Queries, but sadly they don’t provide examples of all queries types. QueryMongo to the rescue!!!

The MySQL Version of the query I wanted to perform

In my particular case, I needed a MongoDB version of the following MySQL Statement:

1
2
3
SELECT mallType FROM Places 
WHERE mallType IN('Mall Type 1','Mall Type 2') 
ORDER BY mallType;

What I did to convert the Query

I opened QueryMongo, pasted the above Query in the MySQL Query Field and clicked on “Translate To Mongo“.

QueryMongo returned the following MongoDB Query back to me, which was exactly what I was looking for:

1
2
3
4
5
6
7
8
9
db.Places.find({
    "mallType": {
        "$in": ["Mall Type 1", "Mall Type 2"]
    }
}, {
    "mallType": 1
}).sort({
    "mallType": 1
});
 
I hope this helps. Happy coding :)
John
19 Dec 2013
2

New version of TiDomino released on OpenNTF

Hi All. I’ve just released version 1.0.1 of TiDomino on OpenNTF. This release introduces a new Notes Database called “TiDomino Sample DB“.

Thanks to Mr Sean Cull’s suggestion, there is no more need to create your own Notes/XPages Application to test out TiDomino’s integration capabilities. The Sample DB contains all the design elements and test records to have the TiDomino Kitchen Sink in Appcelerator Titanium produce and display results when run.

I recommend following the Developer Guide that’s part of the OpenNTF Download for more details, but in short…place the Sample DB in your Server’s Data Directory and sign the database accordingly.

In the Kitchen Sink, you’ll need to tweak the Server, Username and Password Parameters. That’s it!

Oh…and just a small bonus…the entire TiDomino Project is now available on GitHub.

Enjoy :)

29 Nov 2013
0

DanNotes Session Slides: Mobile Blast – Mobile Strategy for Developers

Here are the slides to my 2nd session at DanNotes this week: Mobile Blast – Mobile Strategy for Developers.

Enjoy :)

29 Nov 2013
2

DanNotes Session Slides: Appcelerator Mobile and XPages

Here are the slides for my 1 session at DanNotes this week: Appcelerator Mobile. The Doppelgänger to XPages.

I cleaned it up a bit. Sadly there were 2 live demos, but I will publish more content around this soon enough.

I will submit my other slides early next week and will also be blogging about my Denmark trip soon enough.

Enjoy :)

18 Nov 2013
2

And the count down to DanNotes begins…

We’re halfway into the last quarter of 2013 and there’s so much to look forward to. IBM Connect Abstract Reviews, IBM Champion Nominations, and the ever popular DanNotes User Group (Click here to view the DanNotes Website in English). What’s more is that DanNotes will also be celebrating their 50th event at the end of this November.

DanNotes User Group

I’m proud to say that I’m one of the few who have the privilege of speaking at this event and I honestly cannot wait. In this post I’ll provide a quick rundown of the event, what’s on the agenda and what to expect from my 2 sessions.

ABOUT DANNOTES

DanNotes is a Danish User Group established in 1993, and is primarily focused around promoting awareness of IBM Notes and Domino in Denmark. DanNotes holds at least 2 membership meetings per annum, the last one held in May 2013 and the next one now at the end of November 2013.

The DanNotes events are a perfect place to exchange information, knowledge and experience between companies, organizations, IBM enthusiasts and IBM specialists. Similar to IBM Connect, DanNotes is a 2 day seminar, with the next one beginning now on the 27th November and ending on the 28th.

Pricing

The pricing for the event is 3 950 Danish Kroner (Around $700) and there are still seats available. The price includes food and drinks for the 2 days as well as a 1 night stay at the hotel.

For more information or to register, send a mail to sekretariat@dannotes.dk.

The Agenda

Day 1

DanNotes starts off with the event registration, coffee and breakfast, followed by a welcome speech by Mr Thomas Lindberg. There is then a Keynote session presented by Uffe Sorensen from IBM.

Once the Keynote is done, the technical sessions begin, and what better way to start than to throw on stage Mr Paul Withers (Intec – IBM Champion) and Hans Petter Dalen (IBM), who plan on creating mass hysteria by luring everyone back into the Notes Client? This I gotta see!!!

We then have some Sponsor Posts by Christoph Adler (Panagenda), Roy Holder and Tony Holder (HADSL).

After that it’s Admin vs Dev! Both mine and Paul Mooney’s (Bluewave Technology – IBM Champion) sessions kick off at the same time. It will be sad to miss Paul’s session, but what must be done must be done. While Paul spends his hour laying down “Domino Administration” Law, I will be preaching all things “Mobile” (I’ll explain later in this post).

The day’s sessions end with Bo Holtemann (IBM) presenting IBM Sametime 9 and Jens Bruntt (Convergens) showing us how to develop an app using the Domino Data Service API. Sorry Bo….the developer that I am, I will be going to Jen’s session.

Day 2

Day 2 kicks off with some hotel breakfast (thank you please) and then a morning greeting by Mr Thomas Lindberg.

From there, it’s straight into action with none other than senhor Per Henrik Lausten (PHL Consult – IBM Champion – One of the DanNotes Sponsors) and John Foldager (iZone), introducing you to Java and Beans in XPages.

Paul and Paul (Champion Ala Champion), will be challenging Per and John, presenting their session called “Developers: Beyond Domino Designer”. Some tough decisions await me in terms of deciding which of these to attend.

It’s 25 minutes of Speed Sponsoring, then off to the next session where John Dalsgaard (Dalsgaard Data) and Jakob Majkilde (MAJKILDE) preach MVC Architecture in XPages. (Note: I’m a huge fan of MVC. Just saying.)

During John’s and Jakob’s session are 2 others:

  • Maurice Teeuwe (IBM) will be discussing Collaboration Administration for IBM SmartCloud, and
  • Mark Leusink (LinQed – IBM Champion) will be discussing Twitter Bootstrap and Responsive Design.

After a 15 minute break…we’re back in gear with the following 3 sessions that run parallel:

  • Jakob Majkilde (MAJKILDE) and Per Henrik Lausten (PHL Consult – IBM Champion – DanNotes Sponsor) chat about being an efficient XPages Developer and writing better code.
  • Christoph Stoettner (Fritz & Macziol) shows how Administrators can save time by using Scripts – Speedup Connections config and administration.
  • John Jardin (Ukuvuma Solutions – IBM Champion – Please hold applause till later) demonstrating and explaining why XPages Developers will do well to use Appcelerator Titanium for native mobile Application Development.

Lunch time for 1 hour and then we’re back with the following 3 sessions:

  • John Foldager (iZone) and John Dalsgaard (Dalsgaard Data) showing you how users can download images, videos, docs, pdfs etc using XPages.
  • Maurice Teeuwe (IBM) will be discussing Messaging Administration for IBM SmartCloud.
  • Paul Withers (Intec – IBM Champion) will give us a deep dive into the OpenNTF Domino API.

A 15 minute break and we’re back with the last 3 session for the day:

  • Mark Leusink (LinQed – IBM Champion) will go off on a debugging frenzy, showing 3 ways to debug your XPages application.
  • Christian Dencker (Performance Peek) giving us a “LIVE How To” on the Notes Browser Plugin.
  • Dmytro Pastovenskyi (e-conomic) showing us a modern way of developing for IBM Domino.

DanNotes ends off the event with a Closing and Awards ceremony.

My 2 Sessions

SESSION 1: Mobile Blast: Mobile strategy for developers

This session is quite important to me. Many out there have an idea of what to expect when pursuing mobile application development, especially native mobile development, but if certain key concepts and best practices are not considered and put into action from the get go…the costs can be quite severe.

My presentation focuses on 4 main areas:

  • Understanding native vs hybrid vs mobile web vs responsive development and when to choose what.
  • An overview of the 3 preferred Mobile Development Frameworks and their pros and cons.
  • Understanding the mobile ecosystem as well as HTML5 vs Native.
  • Best practices that will steer you on the right path to mobile application development.

I truly believe that there’s something for everyone in this session and I look forward to presenting it and making it as interactive as possible.

SESSION 2: Appcelerator Mobile. The Doppelgänger to XPages

This session is a little more technical than the “Mobile Strategy for Developers”, but I know it will be enjoyed by all who are developing for XPages and are looking to add native mobile development to the mix. Don’t get me wrong…even if you aren’t an XPages developer, you will still be able to fully understand what’s going on and will also be able to take advantage of Appcelerator Titanium.

This is a “Beginner” type session where I introduce Appcelerator Mobile and explain how it’s different from other mobile frameworks.

I will focus on the following key areas:

  • How to create a simple iPhone Application with a Login Page and a View to display some data.
  • I will compare the code used to create the iPhone App against code used to create a similar Login Page and View in XPages.
  • I will show you how to use TiDomino to integrate with an existing XPages Application. This will include:
  1. Authenticating with IBM Domino.
  2. Calling an Custom XAgent to return structured data back to the iPhone App.
  3. Creating a record on the iPhone App and submitting it to your XPages Application.

TiDomino is an Open Source JavaScript Library that I developed for Appcelerator Titanium, to help one integrate with Domino and XPages by leveraging most of your existing Domino skill set. Whether you’re skilled in LotusScript, Server Side JavaScript or Java, you’ll quickly learn how to make use of the TiDomino Library and bypass mobile design patterns that aren’t too common in an XPages environment.

Conclusion

If you haven’t registered yet for DanNotes, I implore you to consider it. There’s still 9 days left from when I’ll be publishing this post. If the sessions themselves are not enough of a reason, and I would hope they would be, think of the networking and discussions that happen between sessions and later on in the evening. The IBM Community are extremely well known for their knowledge sharing and that’s aside from the fact that 5 IBM Champions will be running around the venue evangelizing. I will be making a personal effort throughout the entire event to be of assistance to any who seek help or advice related to IBM, mobile, technology in general, best practices, etc.

Looking at the Agenda for DanNotes, there is an overdose of “You have to know this” sessions. Mobile Strategy and development, Java and XPages, Responsible Web Design, MVC Architecture, SmartCloud, OpenNTF Domino API, Best Practices and debugging. Most of the Event’s sessions focus on these topics and they are ALL IMPORTANT.

I personally am looking very forward to catching up with my fellow IBM Champions, (Per Henrik Lausten, Paul Withers, Paul Mooney, Mark Leusink). I am also looking forward to meeting John Dalsgaard, John Foldager and many others.

I don’t really know at the moment who else will be attending. If you are joining us next week at DanNotes, please let me know and I will make a point to introduce myself.

Feel free to comment and chat to me if you have any questions, comments, etc.

Have a great day everyone
John