Wednesday, February 27, 2013

Fighting for control of URL in Domino

We have really annoying problem for years with our URLs on all websites based on Domino. We use classic approach because we want control all tags + we like jQuery more etc. Our problem is about mandatory action [?open | ?opendocument] for pages with parameters, so if you want to add parameters to your page (i.e. param1=123) you have to add [?open | ?opendocument] just after your URL and only then you are allowed to add parameters.

Not really a huge problem, however we want to use new tracking code from google. That tracking has problems with [?open | ?opendocument]: it does not work correctly in case if first parameter is ?open. So now its blocker for us and we want to fix it for all another cases as well. We want to have possibility get rid off ?open | ?opendocument

Question in few words: "is it possible to get this URL working?"
http://www.e-conomic.com/accountingsoftware?parameter=123
instead of this
http://www.e-conomic.com/accountingsoftware?open&parameter=123

We've tried redirect, substitutions - no success ofc :(.

Next in my queue is DSAPI and I'm sure it can solve that problem (at least from documentation) however I'm not able to do that due to my experience with DSAPI and very very low information in the web.

I've played with different events in DSAPI: kFilterStartRequest, kFilterRawRequest and kFilterRewriteURL and tried to change incoming URL from request but did not success with it. Does any of you guys can give me tips :) what I do wrong or maybe there is another solution how to achieve that quest?

Tuesday, February 05, 2013

Nodejs and compression of HTML, JS, CSS

To decrease loading time for pages, it is always nice to minify your HTML, CSS and JS. Also to decrease number of requests we inject our minified CSS/JS directly on our pages (ofc we will do that unless our CSS/JS have small size), so minus 2 requests to all pages.

Now time to write couple lines of real code

1. UglifyJS - compress JS

var uglifyJS = require("uglify-js");

var result = uglifyJS.minify("filename.js");
console.log(result.code);

2. Sqwish - compress CSS

var sqwish = require('sqwish');
var filename=app.get('filename.css');
fs.readFile(filename, 'utf8', function(err, data) {
    if (err) throw err;
    var minifiedCss = sqwish.minify(data)
    console.log(minifiedCss);
})

3. HTMLMinifier - compress HTML

var htmlminifier = require('html-minifier');
var minifiedHTML = htmlminifier.minify(data, {
 removeComments: true,
 removeCommentsFromCDATA: true,
 collapseWhitespace: true,
 collapseBooleanAttributes: true,
 removeAttributeQuotes: true,
 removeEmptyAttributes: true
});
So at the result we decreased size of our pages a lot and also decreased number of requests which is also nice, we all love "fast pages".

Wednesday, January 30, 2013

Node.js first experience and first simple project

From 2013 I've started to learn (as much as I've free time) Node.js. 'Domino/Notes' still my main, however it is always nice to learn something new.

Node.js is a platform built on Chrome's JavaScript runtime for easily building fast,
scalable network applications. Node.js uses an event-driven, non-blocking I/O model 
that makes it lightweight and efficient, perfect for data-intensive real-time 
applications that run across distributed devices.

Together with Andrew Kuba (who guide me how to 'node') we are doing simple website for one game which is very popular right now, we are aiming to have hundreds users/month :) at some points + it is always nice to do something that is real and online
We are using only couple modules for our first application:
  • Express - minimal and flexible node.js web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications.
  • Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects
  • mustache is a logic-less templates.
  • yuicompressor compressor to minify our JS/CSS (we do compress all our CSS/JS and put it directly on page to avoid additional lookups)
  • html-minifier compressor to minify our HTML
We do not use database right now, however we are planning to use mongodb with mongoose in near future.

Pick LoL is our website (first version) we are working on to get some experience with Node.js

During next couple months I will write more posts about node.js which I'm going to like hopefully :).

Monday, December 17, 2012

First couple days with IBM Domino Designer 9.0 Social Edition

Worked 2 days already with Domino Designer 9 (I do not really care about changes in Notes 9, as I believe in 'web' direction). I did not find something really new/impressive for developers, however worked only 2 days and also I do not forget that it is just a beta. My impression:
  • It is fast enough, however I do not feel difference compare to my 8.5.3, perhaps my laptop just too good.
  • Ext Library is included by default.
  • I've also read that now we have an API (Java, LS, C API) for C&S, would be great to have it few years ago, now its too late :), but still thanks!
  • Special places for JAR, I guess it is only for xPages, but not for Java libraries/Agents, need to verify.
  • Server-side JavaScript debugger for use with xPages (need to verify how it works, but options are present, I saw that :))
  • $DesignerVersion still says: "8.5.3" when you save elements. I think that would be changed with Release candidate.
  • There are some new options to "Manage working sets drop-down" I really like, waited for those changes for a long time.
  • Application Properties got 'Xsp Properties'.
  • There are also changes to xPages, but I had no time to look on them.
  • All 'old staff': old window to work with @formula, properties dialog still looks same (and that is sad).
Some words about API for C&S.
I've been working on synchronization Lotus Notes 6.5-8.5 Calendar & Scheduling with huge CRM on my previous job (synchronization in 2 side, from LN to CRM and back) and we spent months to manage that correctly, oh dat recurrent events :), it would help us really a lot if we get such API earlier.

I've read also on some blogs that Domino 9 may have dojo 1.8. which would be nice to have and use.

That's all for now.

Sunday, December 16, 2012

Moved from Ukraine to Denmark


From 1-st December I work and live in Denmark. It's really interesting experience for me and my family. I had been working with e-conomic from Kiev for more than 3 years and at some point company decided that it had sense to invite me to work in main office. Now I'm here, so wanna tell 'hi' to those who live here :)

Couple fresh photos of Copenhagen.

City is ready for Christmas:
Now most funny thing :), we met hundred well organized girls, they marched along the main shop-street of the city and cried slogans about Justin Bieber. It was really funny.