Jul 25

An Ajax Application

About 2 years ago, at work we where looking to to create an application to allow customer service to handle calls for insurance (hopefully that is enough information for you to form in your own mind how much data there could be, if not stick around you might learn). During the inception of this application it was decided we would use PHP on our IBM i (AS/400), this meant that we would be using Zend for the server and Zend Studio for our IDE. At that time Zend Studio only supported dojo, so it was the natural choice (things have changed since then and more frameworks are supported now). At some point I decide to take the approach of making this application 100% ajax based. I still think that this was the best choice because the application supports the ability to open multiple policies at one time. We started using dojo 1.4 (I think), and we have gone through many growing pains but I still think it was a great choice (I know that many developer use JQuery and I have to admit that I used jQuery very little). I guess this will give some jQuery developers a chance to voice their opinions. Since then we have gone through a few upgrades of dojo and PHP which I hope to expand on also.

I have giving you a little back round but hopefully I will continue to post some things I have learned and how we have things setup. This might give you a hint of the size of our application. The original minified size was about 1.1 MB(the uncompressed and debug version is 2.5 MB), now that includes the custom code we wrote and the dojo framework that we use all bundled into one file. Since then we have added many more customized requirements to the application and changed what we used of the dojo framework like going from the basic grid to the enhanced data grid. Now our size is 2.1 MB (the uncompressed and debug version is almost 4MB). As I said, hopefully over time I will explain in more detail what this looks like.

Mar 08

Change image hue with PHP

I am considering changing the color of my dojo grids so it is easier to distinguish them because there will be so many on one page (this is an internal application). I have not worked through the CSS changes which could be a small challenge but more on that to later. For now this is the php code that I used to change the hue on the images from the soria theme. I am using ImageMagick, specificly the modulateImage function. Yes, I did search and could not find any existing app that could batch change the hue, so PHP came to my rescue!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
$originalPath ='/dojo/chadsmiley/Themes/soria/';
$path ='/dojo/chadsmiley/Themes/Hue30/';
 
$dir_handle = @opendir($originalPath);
 
//running the while loop
while ($file = readdir($dir_handle)){
	   if($file!="." && $file!=".."){
 
			$img = new Imagick();
			$img->readImage($originalPath.$file);
			 /**
			   *@var brightness 100 = no change
			   *@var saturation 100 = no change 
			   *@var hue (percentage of absolute rotation from the current position)
			   */
			$img->modulateImage(100, 100, 30);
			$img->writeImage($path.$file);
			$img->clear();
			$img->destroy();
	   }
}
 
//closing the directory
closedir($dir_handle);
 
?>
Feb 20

The Time has come…

to move on, I have been learning PHP for about 6 months and have not done any Notes/Domino development for a couple of years. I have converted my blog to WordPress so I am sure some things will be lost or missing so if you need something please let me know. I hope to blog more about what I am doing but I just have not made the time to do it.

A little update about life: I have been doing my share of computer work on the side the last year and web development (just static pages). The kids have been keeping us busy, we now have a teenager, that seems a little wired but life must continue. I got a camcorder for Christmas!!!!, so hopefully some posts about that. I also am looking for some good but not expensive editing software, any suggestions welcomed. We took a family vacation to PA in the fall and that was awesome. We got to got to NYC and Washington DC. There is more but that would take away form some possible posts.

Mar 12

Building Windows Mobile application with Visual Studio

I am still working on this Windows Mobile application.  I am in the polishing stage now.  It has been a challenaging project becuase of having to learn about SQLCE, Windows Mobile, wireless printing (which Windows Mobile does not support natively).  One of my biggest frustrations was the Visual Studio build was getting longer and longer.  It seemed the more I added the slower it got, but shutting down Visual Studio also helped.  I could not find anything anywhere that described this problem or anyone else that had the same problem.  Until yesterday I found VS2008 Windows Mobile 5 Project very slow to compile on a MSDN form.  Yes, I have tried 2005 & 2008 version and they both act the same.  The builds where taking 30 minutes.

It got to the point that I started developing this application as a Windows application and the builds would take only a couple of minutes.  This was fine until I got to the point of really testing the application using a mobile device, so I had to convert the project back.  Believe me the 30 minute build only last a couple of days until I found a new way to build my project.  It is not so new but different, because I am using MSBuild to do my compiling and taking only 2 minutes to compile.  After the build I still use F5 to build the project and run, but now there is nothing to build so VS starts the deploy and I am a happy man!!!  There is one BIG downfall to this approach, forgetting to use MSBuild to do the compiling and pressing F5.  It does allow me to write this article though!!!!

Here is my solution to slow builds in VS:

  1. Open a VS 2008 command prompt (this is not a normal command prompt, it is a short cut by the VS short cut in the Start | Program | .. menu) ( this only needs to be done once)
  2. Save all changes (Ctrl-Shift-S)
  3. At the command prompt type MSBuild <path\filename of your VS project> (drag the file from Explorer) & press enter
  4. Wait for build to complete
  5. Run (F5) your VS project

Hope that saves a few hairs.

Mar 05

Bloglines

I read my feeds with Bloglines (yes, I have tried Google Reader ), because I like to read all the enteries from a subscription at one time.  It is that simple.  OK, there is one more thing "s".  The shortcut key for bloglines uses "s" to navigate next which on the left side of the keyboard means I can leave my right hand on the mouse if it is already there.

The new beta look is looking very nice and have changed some of there wording (Keep/Pinned). So far so good, keep up the good work. I did notice that the counts are not geeting updated in the new beta but I can live with that.  

Update:  the counts are being updated but now I have to mark each as being read, yes there is a user setting to mark them all as being read but that does not seem to be working.

Old Bloglines
New Bloglines