Saturday 31 December 2011

Import image resources via LotusScript & Java

People have created various versions where you can import image resources in a NSF database using LotusScript. Basically you mimic the functionality of "Import Image Resource" button present in Domino Designer via code.


Some of the examples can be found here and here. Here is my version of doing this same thing using combination of LotusSciript & Java with LS2J.

Continue reading »

Three people icon...

Here are some three people icons similar to Lotus Notes. I will be updating it as when I come across new logos... :)

Lotus Notes

MySpace

Continue reading »

Thursday 22 December 2011

"loaded" vs "rendered" in XPages

I couldn’t find many resources on the exact difference between loaded and rendered property available in XPage controls except for this blog by Thiyagarajan.

When you hover your mouse over loaded property it says – “Specifies whether or not the control should be created when the page is loaded.” while for rendered it says – “Indicates whether or not control should be displayed or processed on any subsequent form submission.”. Enabling the properties (exclusively) does not generate the control in the web page. But this is where the similarity ends. It was after a discussion with Sven Hasselbach on XPages forum, I understood the usage of these properties.

Create two computed fields cfLoaded and cfRendered with loaded & rendered property set to false in them respectively. Now add another computed field with following code:
Continue reading »

Friday 16 December 2011

Accessing XPages global objects in Java

Update 24-Dec-2011: Added method to access session and database.

Update 10-Mar-2012: Updated the view object as it was pointing to a super class. Thanks to Tom pointing that one out.

Update 22-May-2012: Rectified the code to get viewScope. Thanks to Jens Winkelmann for pointing it out.

Update 16-Mar-2013: Added link to get getComponent equivalent in Java.

Tim Tripcony in his reply to one of the questions in the Notes/Domino XPages development forum had suggested using Java over SSJS to improve XPages performance. He basically said – “...Minimize the use of SSJS (server-side JavaScript). Every time any SSJS expression is evaluated, Domino parses the expression in realtime into an abstract syntax tree, then runs Java code that is a rough approximation of how the JavaScript specification states that code matching the detected syntax should run. The more you move your logic directly into true Java classes, the less expensive it is to execute, so it runs faster...

So I started thinking about how can we access various XPages Global Objects like – facesContext, sessionScope, context, etc. from Java classes.


Well... here's how we can access it:
Continue reading »

Thursday 15 December 2011

Importing script library in Domino Designer

Domino Designer provides facility to import image resources, style sheets and file resources.


But for script libraries, there is no such option.


So when I need to import a third-party JavaScript script library I usually would create one and then copy-paste the contents into it. But there's an easier way to do it.
Continue reading »

Where are the breakpoints stored?

I am sure at some point or another you would have used breakpoints while debugging your LotusScript code. But I always wondered how does Lotus Notes store them. Well, it stores in the profile documents. To view the profile documents in your database there free utilities available like - NotesPeek (my favorite), ProfileMgr by Andre Guirard or NoteMan.

Using NotesPeek you can see a profile document named "breakpoints_" which stores all the breakpoints.


Monday 12 December 2011

Get Java class names for variables defined in SSJS in XPages


Every global object or variable in SSJS is an object of a class defined in Java. The help documentation says that facesContext is an object of class com.ibm.xsp.domino.context.DominoFacesContext. But what about facesContext.getExternalContext() and other variables?

Well in Java every class inherits directly or indirectly from its base class java.lang.Object. This class has a method named getClass() which returns object of class java.lang.Class (Yes, there is a class called "Class" in Java!). With this you can find out to which class the object belongs, its methods, super class and lot more.

Create a new XPage and add a computed field. Add the code given below for its value and preview it in browser.
Continue reading »

On a dark foggy night...


This story was was emailed to me by my friend during the appraisal season... Make sure you read it till the end!

On a dark foggy night, a small figure lay huddled on the railway tracks leading to the Chennai station. At once I was held back to see someone in that position during mid night with no one around. With curiosity taking the front seat, I went near the body and tried to investigate it.

There was blood all over the body which was lying face down. It seemed ruthless blow by the last train could have caused the end of this body which seemed to be that of a guy around my age. Amidst the gory of blood flow, I could see a folded envelope which was fluttering in the midnight wind.

Carefully I took the blood stained envelope and was surprised to see the phrase “Appraisal Letter” written on it. With curiosity rising every moment, I wasted no time in opening the envelope to see if I can find some details about the dead guy. The tag around his body’s neck and the jazzy appraisal cover gave me the hint that he might be a software engineer. I opened the envelope to find a shining paper on which the appraisal details were typed in flying colours.

Thunder broke into my ears and lightning broke into my heart when I saw the appraisal amount of the dead guy! My God, it was not even, as much as the cost of the letter on which the appraisal details were printed...  My heart poured out for the guy and huge calls were heard inside my mind saying, “No wonder, this guy died such a miserable death”... As a fellow worker in the same industry, I thought I should mourn for him for the sake of respect and stood there with a heavy heart thinking of the shock he would have experienced when the manager had placed the appraisal letter in his hand. I am sure his heart would have stopped and eyes would have gone blank for a few seconds looking at the near to nothing increment in his salary.

While I mourned for him, for a second my hands froze to see the employee’s name in the appraisal letter... hey, what a strange coincidence, this guy’s name same as mine, including the initials. This was interesting. With some mental strength, I turned the body upside down and found myself fainted for a second. The guy not only had my name, but also looked exactly like me.  Same looks, same built, same name... it was me who was dead there!

While I was lost in that shock, I felt someone patting on my shoulders. My heart stopped completely, I could not breathe and sprung in fear to see who was behind... SPLASH! Went the glass of water on my laptop screen as I came out of my wild dream to see my manager standing behind patting on my shoulder saying, “Wake up man? Come to meeting number two. I have your appraisal letter ready!”

Sunday 11 December 2011

Read only edit box in XPage

In XPages, for edit box there is a property called “Read-only”. This property behaves a little different from the one in normal INPUT tag in HTML. I found this out recently and also posted it on the XPages Forum.


Here is a sample code:


When you preview this XPage in a browser it looks something like this:
Continue reading »

Google + Snaptu = Trouble + Confusion


Recently I discovered a beautiful mobile app called Snaptu. It enables users to access variety of services from a single screen like - Facebook, Twitter, News, etc.

There is a very good application for Google Calendar which allows you to add / modify you calendar events. This is actually much better than the Google Calendar for mobile with ability to add events specifying date / time.

But after some days when I accessed my Gmail from browser I got a message that my account was recently accessed from UK....!!!!



A bit worried, I used an IP Address Locator and found that the IP indeed belonged to UK to some website called RackSpace which is basically used for hosting services on web. Now I Googled for "Snaptu RackSpace" and got this link. It basically says that Snaptu is hosted on RackSpace. PHEW! :)

Creating ticker using JavaScript inside Lotus Notes client

I always felt that the power of JavaScript is Lotus Notes client is underrated. Some articles which do describe this are here and here. I realized this power when a some time back I had create a ticker that worked in Lotus Notes client. You can simply embed an Java applet in the form but, Java applet and Lotus Notes don't gel together very well. You also go for animated table, but then you there would be only specified number of entries (rows) which you be able to cycle through.

Using JavaScript to create a ticker is very similar to creating one for Web browser. To start off create two computed fields on your form - TickerURL & TickerText with their respective field names in their value.


Put an action hotspot around the field TickerText and write the following formula:
Continue reading »

Opening design elements with single click in Domino Designer on Eclipse


With Domino Designer on Eclipse one change IBM made was that you needed to double click on the design elements to open them. Very irritating for a Lotus Notes developer who has been developing applications in Lotus Notes 7 or before for quite some time. But thankfully IBM provided an option in the preferences to get the previous behavior.

Open your Domino Designer on Eclipse and go to "File > Preferences". In the “General” section you see option of “Open Mode” where you can select either “Double click” or “Single click”. Select "Single click". Use the image below for reference.


And good old days are back again… :)

Editable field which does not get saved in document when saved


Ever wondered whether an editable field can be created on a form which does not get saved when the document is saved! Well it can be done. It’s pretty simple. All you need to do is to write @DeleteField in the "Input Translation" formula of the editable field in the form.


You can have an elaborate formula written in Input Translation based on which you can decide whether to save the field in document or not.

Validating number fields in Lotus Notes

Anyone who has created number field on form and done validations on that will have faced this problem.

Suppose you have a number field on a form and user enters a value other than number in it and the form gets refreshed, either by F9 (CTRL+F9 in 8.5.x) or via code to validate other fields, then Lotus Notes comes up with a beautiful error of "Cannot convert text to a number".

You don't want this message to come when you want to execute your own custom code to display error messages and show it to user. To get around this error just
Continue reading »

User preferences deleted in Lotus Notes 7

Recently on one my colleagues Lotus Notes whenever we went to "File > Preferences > User Preferences..." a dialog box used to show up saying "Document has been deleted".

After searching on Google I found this technote which indicated that if the user is assigned some policy and it has been deleted then this problem may occur and we had policies assigned to users. But technote is talking about problem on server. But still we decided to give it a try. And it worked!
  1. Open "names.nsf" on your local machine.
  2. Go to the hidden view "($Policies)".
  3. Press "SHIFT+F9" to rebuild current view (you must have Manager access on names.nsf). And you are done!

    Creating round cornered border table/image in Lotus Notes

    Recently I found a property in Domino Designer that you can (actually!!) put a round border to your table. There is a simple table property that enables you to do that.


    Continue reading »

    Open frameset of another database in Lotus Notes


    While working on a Lotus Notes client-based application I came across one peculiar scenario that we could not open a frameset residing in another database. You can code @Command([OpenFrameset]; FramesetName) in formula language or Call NotesUIWorkspace.OpenFrameSet(<FramesetName>) in LotusScript. But both these commands open frameset which reside in the same database from which the command is being executed. After searching (read it as Googling) I found a solution by Tammie Miller on SearchDomino. But this required me to modify the target database also. After some tinkering in Lotus Notes I was finally able to do it without modifying the target database.
    Continue reading »

    The Tortoise and the Hare

    A long time back my friend sent me an e-mail based on Aesop's famed fable The Tortoise and the Hare which I found pretty interesting. Its a bit long but worth reading. Here it goes...

    The Old Story

    Once upon a time a tortoise and a hare had an argument about who was faster. They decided to settle the argument with a race. They agreed on a route and started off the race.

    The hare shot ahead and ran briskly for some time. Then seeing that he was far ahead of the tortoise, he thought he`d sit under a tree for some time and relax before continuing the race.

    He sat under the tree and soon fell asleep. The tortoise plodding on overtook him and soon finished the race, emerging as the undisputed champ.

    The hare woke up and realized that he`d lost the race.

    The moral of the story is that "Slow and Steady wins the race".

    That`s the story which we grew up with!

    Here`s the contemporary version of the story and the saga of the race between the Hare and Tortoise continues.. Read on...

    The New Story

    The hare was disappointed at losing the race and he did some Defect Prevention (Root Cause Analysis). He realized that he`d lost the race only because he had been overconfident, careless and lax.

    If he had not taken things for granted, there`s no way the tortoise could have beaten him. So he challenged the tortoise to another race. The tortoise agreed.

    This time, the hare went all out and ran without stopping from start to finish. He won by several miles.

    The moral of the story : Fast and consistent will always beat the slow and steady.

    If you have two people in your organisation, one slow, methodical and reliable, and the other fast and still reliable at what he does, the fast and reliable chap will consistently climb the organisational ladder faster than the slow, methodical chap.

    It`s good to be slow and steady; but it`s better to be fast and reliable.

    But the story doesn`t end here.

    The tortoise did some thinking this time, and realised that there`s no way he can beat the hare in a race the way it was currently formatted. He thought for a while, and then challenged the hare to another race, but on a slightly different route.

    The hare agreed. They started off. In keeping with his self-made commitment to be consistently fast, the hare took off and ran at top speed until he came to a broad river.

    The finishing line was a couple of kilometers on the other side of the river.

    The hare sat there wondering what to do. In the meantime the tortoise trundled along, got into the river, swam to the opposite bank, continued walking and finished the race.

    The moral of the story? First identify your core competency and then change the playing field to suit your core competency.

    In an organisation, if you are a good speaker, make sure you create opportunities to give presentations that enable the senior management to notice you.

    If your strength is analysis, make sure you do some sort of research, make a report and send it upstairs. Working to your strengths will not only get you noticed but will also create opportunities for growth and advancement.

    The story still hasn`t ended

    The hare and the tortoise, by this time, had become pretty good friends and they did some thinking together. Both realised that the last race could have been run much better.

    So they decided to do the last race again, but to run as a team this time.

    They started off, and this time the hare carried the tortoise till the riverbank. There, the tortoise took over and swam across with the hare on his back.

    On the opposite bank, the hare again carried the tortoise and they reached the finishing line together. They both felt a greater sense of satisfaction than they`d felt earlier.

    The moral of the story? It`s good to be individually brilliant and to have strong core competencies; but unless you`re able to work in a team and harness each other`s core competencies, you`ll always perform below par because there will always be situations at which you`ll do poorly and someone else does well.

    Teamwork is mainly about situational leadership, letting the person with the relevant core competency for a situation take leadership.

    There are more lessons to be learnt from this story.

    Note that neither the hare nor the tortoise gave up after failures. The hare decided to work harder and put in more effort after his failure.

    The tortoise changed his strategy because he was already working as hard as he could. In life, when faced with failure, sometimes it is appropriate to work harder and put in more effort.

    Sometimes it is appropriate to change strategy and try something different. And sometimes it is appropriate to do both.

    The hare and the tortoise also learnt another vital lesson. When we stop competing against a rival and instead start competing against the situation, we perform far better.

    So the new stratregy paradigm is:
    • The fast and consistent will always beat slow & steady;
    • Work to your competencies;
    • Pooling resources & working as a team will always beat individual performers;
    • Never give up when faced with failures;
    • And finally, compete against the situation. Not against a rival. Challenge Ideas and Issues. Not People.

    Saturday 10 December 2011

    Configure 24Online for Ubuntu / Linux

    At my home I connect to internet using 24Online. The service of this ISP is pretty good with prompt customer support. I recently installed Ubuntu 11.10 with dual boot on my Windows Vista PC. Ubuntu is a pretty good OS, but without an internet connection there's nothing much you can do with it.

    For Windows, 24Online provides a UI client.


    But for Linux there's no UI client available - only command line utility is available. If you already have an account with 24Online then you can log in your account from browser and download the file from "Client" menu in the website or you can download the file from here (13.2 KB). You can get your IPv4 settings by going to "Control Panel > Network and Sharing Center > Manage Network Connections". Right click on "Local Area Connection" icon and click on "Properties". From the dialog box select "Internet Protocol Version 4 (TCP/IPv4)" and click on "Properties" button. Note down the IP addresses from the fields marked in the screenshot below.


    Continue reading »

    Friday 9 December 2011

    The first one...

    This is my third attempt at blogging my thoughts and learning. My first attempt ended after 1 month and second one after 3 months. Hopefully this time around I will be able to post at regular intervals.

    I won't be blogging on any specific subject per se. It would be a mixed bag but mainly on technology, but you may find a lot of posts on Lotus Notes and its related technologies like XPages (after all I am in Lotus Notes development).

    And yes, I know the spelling of my blog title is wrong. It's actually a portmanteau of two words - Naveen (that's my name) & Navigator... :) Also I guess all the exciting blog names had already been taken.

    Wednesday 26 October 2011

    WP7 A better InkPresenter using XNA

      Last week I was at SMAU Italia  together with Matteo Pagani giving a hand at Windows Phone 7 labs and having a good time with my friends at Microsoft. I also got the pleasure to meet Ben Riga. One of the attendees at the laboratory raised a really good question about the performance of the InkPresenter in WP7. He is using the control to capture a signature, but if you are pretty fast (usually people when they do their signature are fast) the result is "ugly" and not really usable. You won't get a smooth curve, but something like this:


     This screenshot is taken in the emulator, but on the real device the curve looks worst and it's easy to reproduce this behavior. I took this "problem" as a challenge (two nights of work and now the third to write the post) convinced that I can get better results with a mix between XNA and Silverlight, mix that in Mango is possible. T
     The main problem is the number of points returned by the event MouseMove of the InkPresenter control which is not enough points to draw a decent curve.
      The first thing I've tried in the XNA version was to use the TouchPanel.GetState() but I was surprised to see that I get the same number of sampling points as the MouseMove in InkPresenter. The things improved a lot when I've used TouchPanel.ReadGesture() with GestureType.FreeDrag. Using these sampling points as StylusPoints for the InkPresenter the situation improved a little:


     The black line is the one obtained with MouseMove and the red one is the one obtained with ReadGesture.The result is better, but not satisfying. The only way to further improve the result was to manually draw the curve without InkPresenter. I've have used BezierSegment to draw the curve. Without any processing this would be the result:


    The new curve is the blue one which is better than the others, but it is still not smooth in some points. This is because a Bézier path is smooth if each endpoint and its two surrounding control points lie in a straight line. In other words, the two tangents at each Bézier endpoint are parallel.



    There is more than one approach to solve this behavior and I've implemented two (with all the mathematics I felt back at the University http://en.wikipedia.org/wiki/B%C3%A9zier_curve). 

    The first is an algorithm for Automatically Fitting Digitized Curves with the Douglas Peucker algorithm to reduce the number of points (http://stackoverflow.com/questions/5525665/smoothing-a-hand-drawn-curve).

    The second one uses Bézier splines which creates the First and Second control points for each Bézier segment http://www.codeproject.com/KB/graphics/BezierSpline.aspx . 

    With both algorithms the results are pretty good:


    If you are interested to play with the sample you can change the following parameters:

    double PhilipSchneiderTolerance = 0;
    double PhilipSchneiderError = 4;
    -used when the fitting algorithm is PhilipSchneider (run this sample http://cid-c27e99281f78a67a.office.live.com/self.aspx/Public/Simplify.zip on the desktop to understand what changes when you change the Tolerance and the Error)

     private bool _showPoints = false;
    -shows or hides the points read by ReadGesture
            
    private bool _showOtherCurves = false;
    -shows or hides the InkPresenter curve using MouseMove and ReadGesture

    private FitCurveAlgorithm _algorithm = FitCurveAlgorithm.PhilipSchneider;
    -changes the fitting algorithm: None, BezierSpline, PhilipSchneider




    P.S. The project still needs some working/polishing in order to be used in production, but that is the simple part so... HAVE FUN

    NAMASTE

    Thursday 20 October 2011

    Skydrive Library for Windows Phone v1

       I've started this project before Build. At that time I didn't know what Microsoft was preparing for the skydrive REST Api so there was no way to fully access your skydrive folders and files. The idea was to be able to get the modified files (word, excel) from Skydrive back to the dropbox account (a lot of people requested that feature and, as you probably know, in Mango you can save the files directly to your skydrive account). So I've started by contacting the people that already had developed applications that use Skydrive for Windows Phone 7 ( it doesn't make sense to reinvent the wheel if you can borrow or buy one) . I've found 2 applications: Sky Wallet and the other Skydrive Player and the answers from the developers were not what I was expected: the first one pointed me to Skydrive.Net which is(was) unusable for Windows Phone and then didn't replied to my other emails (so I understood it was disturbing for him to share his work) and the other said that the source code was not really clean (so more or less I don't want to share it). The only option was to start digging up and find out how they did it (that day I've also promised to myself that i will publish the code even if this will mean that the application I have in the marketplace will loose some value) It took me more than I expected  to understand and implement the mess (for me it's a mess) behind the WebDAV, but the results are not bad ... it works. The source code is quite a mess but it's free and you can use it (if I wait to have time to "clean" the code I will never publish the library). When the REST api will be out of beta (you cannot publish an app with the beta sdk) this library will be obsolete, but till then you can use it in your applications and they will pass certification (at least mine did ... till now ). The list root folder method is slow because I have to call two methods in order to have all the files and folders. You will also find a test project that will show you how to browse your skydrive. Creating folders and uploading files are not implemented in this version and it doesn't make sense to implement them because it will be much easier to do it with the REST api. If you need this functionality contact me and I will point you in the right direction.
      The project is published on Codeplex: http://wp7skydrive.codeplex.com/
      
      If you have questions, need support, or want to improve the library please let me know. If you wanna see a better integration of the library than the simple test project you should buy my dropbox client Boxfiles :) .

    NAMASTE

    DropBox library for Windows Phone 7 v1.1

     I have just published an updated version of my Dropbox client on CodePlex. You can download it here. I have rewritten the library from scratch (took out all dependencies - Json.Net and Hammock, added the download progress event and a lot of other things that I cannot even remember). It's faster, better and it's the exact same library I am using in my Dropbox application . I really hope that it will be useful for your projects and hope your projects will not be something similar to Boxfiles.
       That's all folks!

    P.S. It doesn't have a test project, but you can use the one in the first release. It should be easy to use and pretty intuitive. If you find bugs or want to improve the library please let me know


    NAMASTE!

    Wednesday 7 September 2011

    BoxFiles for Dropbox v2 Beta

              Dear readers,
      We've just published the first beta of BoxFiles for Dropbox Mango edition :). The beta is available at: zune://navigate/?appid=8cfa8f66-3174-48e1-99b5-f2d0146113e8 and is limited to the first 100 users that will download the app (if we reach that limit and we still have requests we can publish another beta). We've rewritten most of the source code so it needs a good testing and some feedback. Send your problems/suggestions to: info@neologics.eu .
      The Dropbox library was rewritten from scratch taking out all the 3rd party components (JSON.Net and Hammock), but the featureI am most proud of is the integration with Skydrive. You can now upload your modified Office files back to your Dropbox account.
        We need your help to make our product better. If you can, please tweet the link.

    NAMASTE!

    Thursday 1 September 2011

    Mobile HTML5 Speed Reading Again

     Today I've upgrade my iPad 2 to iOS beta 7 and I was thinking that a more "realistic" comparison for the HTML5 Mobile Speed reading would with the new iPhone compared to a new Windows Phone Mango device (new year new hardware). On my Omnia 7 with 7712 build and video drivers not optimized for Mango I get around 30fps, the same that I was getting on my iPhone 4 with iOs5 beta. I remember that on a tweet I read that, on some devices, Windows Phone 7.5 Mango was doing 60 fps. On the other hand the new iPhone will probable have the A5 processor just like the iPad2 so I've run the same test on my device and the results are not bad at all. The iPad2 with iOs5 beta 7 is doing a stable 60fps. This is the frame rate we can expect from the new iPhone.So Apple and Microsoft are, for now, at the same level and let's hope that the OEM's will optimize their video drivers for Mango in order to get 60 fps, if not it could be a boomerang for Microsoft (the new iPhone, doing 60fps, would smash WP7 Mango that is doing 30-40fps). Hope it won't happen.

    Here is the test on the iPad2

    NAMASTE

    Thursday 25 August 2011

    Where XNA beats up Silverlight

       Finally a blog post. I am in the process of updating (it's more of a rewriting) Boxfiles for Mango. Till now I have rewritten the Dropbox library from scratch (took off all the dependencies Hammock, Json.Net and now it's pure HttpWebRequest) and developed a library for accessing Skydrive resources (it works and it is possible to list the folders and download the files mainly what I need to get the modified Office files back to Dropbox). Anyway the Skydrive API it's a mess for the moment and I really hope they will get a "clean" API. The current version of the Rest Api is usable only for contacts, photos and videos. I will post both libraries on Codeplex (very probable after I finish the update of Boxfiles). 
        So what is this post all about. One of the features of the new version of Boxfiles will be pinch to zoom. Searching on the web I have found the XNA and the Silverlight solutions. I've started with Silverlight and with pinch to zoom added the application would easily eat more than 90MB of RAM while the image window is opened.  Digging up on what was consuming so much memory it turned up that the image window eats around 40 MB of memory (also because I have enabled CacheMode="BitmapCache" in order to have a smooth zoom). This is an abomination for a simple page with one menu and an Image control displaying a file  of 3MB. I than remembered that, in Mango, Silverlight and Xna can "live" together. The feature was introduced for enabling Silverlight in Xna (menus and stuff) , but in this particular case I will use Xna in Silverlight. I've created a project where I can compare the pinch to zoom on both Xna and Silverlight. The results are not bad: XNA uses around 10MB while Silverlight uses 40MB and the pinch to zoom is much smoother in Xna (the sample starts with 10MB of memory occupied).




        In order to have a realistic comparison I've added an ApplicationBar to the Xna window and both of the windows have a Menu where you can force the GC to collect. While testing the solution I've found a really strange behavior (in my opinion it's a memory leak of the image control and maybe somebody from Microsoft should have a look into it): the Silverlight window, after the first launch, was not releasing 10MB of memory. In order to release the memory I had to manually remove the Image control from the ContentPanel and give it a null value.


    ContentPanel.Children.Remove(image);
    image = null;

    If you play with the solution just comment the two lines located in OnNavigatedFrom (ImageSilverlight.xaml.cs) and you will see the leak.

    Here is the Source Code

    NAMASTE!

    Monday 18 July 2011

    Mono is back

      Great news today... Mono is back. Looks like the Xamarin guys were able to convince Novell to take over the Mono project. You can read more on Miguel de Icaza post. Now the first thing I hope is to be able to reactivate my Monotouch license on my new Macbook (for more than two months I got no answer to my emails - Xamarin or Novell). Multiplatform mobile development... Sweet

    Saturday 16 July 2011

    Windows Phone 7 Marketplace What to expect


      We all know that the actual version of Windows Phone 7 Marketplace can be better and that a new version is coming. As a registered developer with an active application on the marketplace I've been invited to compile a survey on the Windows Phone 7 Marketplace. The survey had a very interesting part where you select what you would like to included in the next version of the Marketplace. Here is the list with what might come in the next version of the Marketplace. If you see items that are doubled it's because the system they used for evaluating was to cycle on the same answers where you select which one is the most important and which one is the least important in groups of 4:
    1. Real-time app download information: "Watch number of app downloads in real time (no delay). App downloads are categorized by user market, device and mobile operator.
    2. Annual paid subscriptions for technical support: "You can buy a paid subscription for advanced technical support."
    3. App emulator: "Users can check out a full version of the app in a browser window, prior to downloading or purchasing."
    4. Web marketplace: "An online web marketplace for users to browse the app catalog and make purchases; apps downloaded/purchased on the web marketplace show up instantly on their phones without the need to tether to the PC or perform any user action."
    5. Easy app updates: "The App Hub will retain metadata, artwork and descriptions from prior versions and make it easier to submit updates."
    6. Paid featured slots: "Bid money for a featured app slot within the web and phone marketplace clients. Featured slots are assigned based on a real-time auction to the highest bidder."
    7. Early access to updates: "Developers will have early access to OS upgrades to help them update their apps to take advantage of new features."
    8. Flexible pricing: "This will enable developers to price your app differently in different markets and also have more price tiers to choose from."
    9. Private distribution of apps: "Apps can be published hidden in the marketplace, so only users with a special deeplink are able to download the app. This can be used for private distribution scenarios where you don't want your app to show up in the general catalog."
    10. More intuitive category structure: "Changes to the category structure to make it more intuitive, add additional categories like education etc."
    11. Respond to user reviews: "View and respond to user reviews. Draft responses to user reviews from your App Hub account without seeing the real user email address. Users receive your response and can optionally come back and change their review."
    12. App gifting: "Allow users to gift apps to other users, paying on their behalf. The gift recipient gets an email with instructions on how to redeem the app."
    13. Role-based developer accounts: "Multiple user accounts can be created to manage your AppHub account, with different permissions. For example, one account could have permissions for viewing download/payout reports (your finance manager) but no permissions for submitting or editing existing apps. Another account could have permissions to submit apps or edit metadata, but no access to reporting."
    14. Additional payment methods like PayPal: "Ability to pay App Hub fees with PayPal. Ability to buy apps or in app purchases using PayPal."
    15. Discount offers/coupons: "Ability to generate and offer a discount coupon to users (x% or $x off) for app promotions, etc. Users can enter the coupon code during checkout. Coupons can be unique (one time use only) and have an expiration date. Coupons can be easily generated from your App Hub account."
    16. In-app commerce: "Ability to charge users a small amount of money from within the application. This can be used for selling extra content (e.g. a new game level, accessories) or unlocking new app functionality."
    17. Screen capture tool: "Tool for capturing the right size (480x800) screenshots off the emulator or a phone tethered to the PC."
    18. Video content in-app description: "Ability to upload videos to showcase app for users to see from PC or web interface while browsing the catalog."
    19. App analytics: "Get real-time information on number of application runs, active users, app installs and uninstalls, etc. to understand how often your app is being used."
    20. Simplified identity validation: "A simplified identity validation process that will be based on your credit card details and/or email verification."
    21. More frequent payouts: "We will lower the payout threshold and so you will receive your payouts more frequently ."
     All are great features. Let's hope they will implement all of them



    NAMASTE

    Friday 15 July 2011

    WP7 Network Printing

       As promised I am publishing the sample for network printing on Windows Phone 7 Mango. It is a proof of concept and it is the same I did more than a year ago on Monotouch.  It uses sockets to connect to a network printer and send one page that contains two rectangles (one with shadow and one without shadow) and some text. It is an implementation of PCL5 (not a complete one of course). Hope that somebody will take the time to finish implementation. If so please let me know cause I will need it.

    Source code

    NAMASTE

    Thursday 14 July 2011

    My Monday thoughts on Thursday

      For more than three weeks I wanted to do a post on Monday called "My Monday thoughts". Too bad that on Monday I always have a lot of work to do and never got it done.
       Three weeks ago was about localization and ignorance. The italian "garante" for personal data privacy, Francesco Pizzetti, declared that smartphone are dangerous because they are always "tracking" us at any step. That, in my opinion, is pure ignorance. First of all somebody has to explain to him that GPS is a receiver not a transmiter and that having a cellular phone (any cellular phone) is having a tracking device (the mobile operator is logging the sequence of cells where your phone is connecting). So if you don't want to be tracked don't buy a cell. Than there is the question what is the mobile operator doing with this data? Almost all the time it is used for statistics, and then, when an authority asks for it they are used in investigations. Would I mind being tracked by Google, Apple or Microsoft? Not really and if this could help them make better products I would agree to do it. Does anyone ask you if you want your data logged by the mobile operator? I remember the guy that discovered the logged positions on his iPhone and everybody saw it like a big problem. But if anybody, besides Apple, arrives to read that data it means that he already has access at your emails, contacts, phone calls which are more sensitive than the log of your position. If you don't have anything to hide being logged or not is not such a big deal and in some cases could save your life (accident in the mountains for example) . On the other side the persons that usually vote against it are in parliament and some of them have things to hide.
        Two weeks ago  I had a week of holiday and I was in Nice, France. Wanted to blog a lot instead I just wrote an article about Mango, fixed some bugs for some clients, and ported the code for network printing on WP7 in order to write a blog post (still have to try it with the printer). I arrived at the conclusion that writing along with a glass of wine is much easier. The project that eats almost all my time at this moment is a Home automation/Domotic one. The client wanted the WPF:


    and in my spare time (usually from 10pm-1am) , for a demo for Microsoft Italy, I've developed the Windows Phone 7 client that uses sockets:

      I intend to finish the application before the Mango Marketplace opens and have it as a free version with a fixed plant in our office.
         This Monday I was pretty sad because I had the occasion to go Microsoft WPC and present Boxfiles for Dropbox on stage and could not go. The problem was that my visa (I am romanian and need a visa) was not ready. Anyway I already have in mind version 2.0: multilingual , add Skydrive support in order to be able to upload files to dropbox from skydrive when mango arrives (this is the only way to get your modified word, excel docs back to dropbox). Also 2.1 plans: background download/ upload of files.
         Today I am just happy that my article was published. But one of the things I am more happy about is that in all this period I made new friends: Lorenzo Barbieri, Roberto Freato, Alessandro Scaradova, Matteo Pagani, Michele Locuratolo. It's good to feel part of a group that share the same passion for mobile development ( DotNetLombardia). A special thanks to Lorenzo Barbieri and Roberto Freato for making it happen. 

    Getting back soon with the post on Network printing on Windows Phone 7

    NAMASTE

    Wednesday 22 June 2011

    Thursday 16 June 2011

    Metro Style UI in iOS 5

          Today, when I've changed my SIM card, I've noticed this screen on my iPhone:


     
         The icon seems more an WP7 icon then an iPhone one.  Good choice the Metro UI :)

    Tuesday 7 June 2011

    iOS 5 HTML5 Speed Reading

       It's hard to start a post when it passed so much time from the last one. So much things to say but when you want to write about them you realize that are not so important/innovative/interesting or at least worth reading about.
       I remember back in April at Mix Keynote when they presented the IE9 mobile edition that Apple was the worst performer in the tests. This is a small part of the Mix keynote where they show how the various devices perform:



              So ever since April I was curious how much time will it take Apple to get back on the track with Safari mobile browser. Luckily I am the "proud" owner of an iOS developer account with no application published on the App Store (I will blame time and now Novell as I had to change my Macbook on which I had activated the Monotouch license and now it's GONE as nobody answers of that part anymore. I can only hope that Miguel and his team will "cook" a new product as soon as possible. All the money we've spent on Monotouch and Monodroid are now a dead investment). But let's get back to the post.... So today I've downloaded the first beta of the iOS 5 and deployed it to my iPhone 4 and ... SURPRISE... after not even two months the Safari browser outperforms Android and Windows Phone 7 (the way they were two months ago). Here is a small video with the test I ran:


             I can hardly wait to be able to install Mango on my device and it seems that this could happen at the end of June for developers (keeping my fingers crossed). In that case Apple and Microsoft are definitely winning a small battle against Google. It is very important to give the tools developers need when they need them and this is not when the phones ship (being able to test on a real device it's a MUST). While for Apple it is an easy battle to win as they develop the hardware so they decide what to do, Microsoft on the other side has to convince the hardware OEMs and the mobile operators to let developers get early access to Mango and also find a way to make it "work" on all the Windows Phone 7 devices available today .
         iOS 5 brings a lot of interesting new features and I agree that some of them are similar/inspired/copied from Windows Phone 7, but if that makes the product better Microsoft should copy and improve some of the iOS features. Here are some things that I still don't like in WP7 :
    • the most annoying in this moment is the email client that doesn't go to the next email when I delete one but comes back to the inbox and make me lose a lot of  time (for the moment I have mobile internet only on my Omnia 7)
    • I still don't like the application list even if now you can use search or jump list
    • HATE the InCall experience with small buttons and the "half" window (I don't understand why)  that doesn't make sense as you usually will push with the face the outer area and the window will go to background or even more annoying instead of closing the call you will send it to the background 
    NAMASTE

    Thursday 17 February 2011

    WP7 Emulator Tip: Use your hardware keyboard

       Yesterday at MWC I was telling Bryan Agnetta how frustrating it is not to be able to use you hardware keyboard to input text in the Emulator and he told me that as long as he knows there is some shortcut that enables the hardware keyboard in the emulator. Searching with google I've found a post on Brad Tutterow's blog and in fact you can use PgUp to enable the hardware keyboard in the emulator. Hope this tip will help you as much as it helps me. No more frustration...:)

     Here are all the shortcuts:


    Page up / page down: Toggle between the software keyboard on the emulator and the hardware keyboard on your development machine.  While using your machine’s keyboard, you can TAB between fields.
    F1: Back
    F2: Start
    F3: Search


    Monday 31 January 2011

    Windows Phone Marketplace: More frustration

       I wanted to do this post for quite a while, but never found the time. Hope that someone from Microsoft will have the patience to read this post and take some action. 
        In my opinion the current version of the Windows Phone Marketplace reflects the state of WP7 platform ... unfinished, rushed on the market. Some time ago I wrote a post about the development platform and said that it's frustrating that "normal" developers don't have access to resources that are already present on the platform like: sockets, camera stream, database. The Windows Phone Marketplace is even more frustrating and I experienced that both as individual developer and company account . So let's take it step by step:

    1. Registration
      As a company we were already registered as Windows Mobile developers. When Microsoft updated the Marketplace we had to update our account and something went wrong when the XBox account was generated because it was located in USA instead of Italy. This made impossible the publication of any application as the developer website went into error. We contacted Microsoft support and after almost one week the only solution was to generate/subscribe a new account.
      As an individual when subscribing the Developer Program on the same webpage there were 2 prices "Abbonamento annuale Hub App € 99,00" and "L'abbonamento annuale di € 80,00IVA inclusa" but when I received the message from the credit card the real price was €113,85. 

    2. Publisher Certification
       I know that Geotrust is responsible for the certification but they represent Microsoft in this process so it's Microsoft that has to do something to improve this service.
      Company account: after waiting for 3-4 days, as we had our application ready for more than two weeks, we contacted them directly. The first time they said that everything was ok and that we will have the account certified the same day. As we had no answer we had to contact them again after two more days in order to finally have the account enabled
      With my personal account was even worst.I have subscribed the Developer program on 24th of Nov. 2010, then received an email on 26th of Nov 2010 that they needed a document that I have sent the same day. Geotrust answered on 3rd of Dec 2010 that they have received the document and they will complete the verification process shortly. I wrote to them on the 3rd of Jan. 2011 asking why my account was not activated and they finally activated the account on 4th of Jan 2011 :).

    3. Publication
      This part is not so bad but can be improved. If you submit an application/update but you find a bug it is impossible to cancel the submission even if it's not have been tested. On one hand it's quite normal, but as time is money if the developer finds a bug why not stop the process right away meaning Microsoft won't loose time to test an application that won't pass certification and the developer won't have to wait for the certification to fail in order to be able to submit an updated xap. The alternative would be to create and submit a new application but if you don't pay attention you will end up with two applications on the Marketplace. This happened to me with BoxFiles. I then wanted to split the applications (one for US and the other for the other markets) but this meant that some users won't be able to update the application they bought because if you bought an application that is updated but not available anymore on your Marketplace you won't be able to update. So I've decided to let both of them.
        I have to make compliments to the testing team. They are really well organized and you will usually get an answer in one or two days. This is the only part of the Marketplace that I can say it's great (even if my latest update was postponed because the Dropbox service was not working for 30 min so they could not login or create a new account).

    4. Updates 
       The bad part about updates is that it is impossible to write the update text. The user will see that there is an update, but you cannot communicate what is new in this release

    5.Reviews
       The first thing that I don't like is the fact that a user can write more than one review. A user should be able to update his review but this should erase his old review (now both of them will be visible). I don't like it because if a user changed his opinion changing it from bad to good a possible buyer will be influenced by the bad review even if the user that wrote the bad review now has another opinion.
       Another aspect is that nobody verifies the reviews. For example one of the bad reviews of my app states that the search section freezes even if, in the old version, there is no search section (1.7 will have it :) ). Another user said that it cannot login in trial version and he will not buy the app even if, for writing an app review, you will have to buy it. It looks like some users are having "fun" trying to make the applications of the others look bad instead of trying to make their applications look good and the Marketplace helps them.
       I also think that the algorithm for calculating an application rate could be improved. I might be mistaken but in this moment is a mean value from all the reviews of an app which, in my opinion, is not reflecting the "state" of the app. I will explain why: an user usually, if everything works, won't take time to do a good review. On the other hand if an application does't work you will be angry and you will do a bad review.  If the developer fixes the things the users that wrote a negative review will usually not take the time to write a positive review. So it would be more fair to calculate an application rating using an weighted average by the application version number. If the first version had many bad reviews and the next one have very good ones but not as many they should count more in the rating as they reflect more precise the actual state of the app. 

    6. Security
       I let for last the worst of them all. This part is very shameful for Microsoft. A company that teaches Security Best Practices has such a BIG HOLE in their system and they are not patching it. At the start Microsoft was warned that anybody can download any xap directly from Microsoft Marketplace but Microsoft did NOTHING and there are programs circulating on the web that are able to download xaps directly from the Microsoft Marketplace (just search WP7 3MktPlace). It's shameful not because the Marketplace has a bug/hole but it's shameful because Microsoft is not patching it right away. This means that Microsoft has no consideration for developers. Developers are trusting Microsoft giving their intellectual property for selling and when a bug enables anybody to download any xap Microsoft doesn't take action. I remembered that Paul Thurrott wrote a blog post where he was frustrated by the fact that Microsoft is releasing software for the iPhone while Apple in the first three months of the iOS  released four updates to their OS patching bugs and adding new features. Instead of using their developers for iOS Microsoft should use all their forces to get WP7 a valid alternative to Android and iOS. I know that NoDo will lock the possibility to sideload applications on WP7 but if it will still be possible to download any xap from the Marketplace Microsoft will encourage Intellectual Theft as it will be possible to use Reflector to see how an app it's done. Of course Microsoft will say that you can use an obfuscator to protect your xap, but why justify a security problem with a workaround? It is enough to patch the hole: authenticate the download of the xap using the windows live id and verify if the user can download a certain xap.
        Another thing that I've noted is that you see everywhere on twitter/blogs that WP7 has more than 20.000 developers and there are 7.000 apps on the marketplace. Let's say that we have an average of 1.5 apps per publisher so we have 4,666 "active" publishers. Let's round it to 5.000 meaning that only 25% of the developers "concludes" the publishing process. In my opinion this means that developers need more. I really hope there is more in NoDo for developers other than Copy/Paste and speed. There are so many things still missing.

    NAMASTE!