Archive for September, 2006

Solutions for basic logging

September 25, 2006

The application I am creating for my project is a Windows Service, therefore I need to maintain a basic log of events in case there are technical issues. From the start I wanted to create an XML file that would hold this information, the reason for choosing XML being that it does not matter how the log file is to be used (it can be directly fed to a database, or viewed using a viewer). It’s just a simple, portable format.

The problem with maintaining an XML log is the overhead of appending a record to the file. Each time I need to append an entry the whole document must be loaded into memory and parsed. Quite alot of memory usage and processing to write a single line of text to a document!

The idea of using XML fragments seems to be the perfect balance as it allows valid XML to be appended to a file as you would with regular text. This example identifies this solution and provides an example.

Another solution, which I havn’t tried but looks very interesting is the technique identified in the post: Appending XML files and confusing disposables. This solution allows XML to be appended to an XML document without loading it into memory.

And finally, there is the log4net framework. At the moment I’m leaning more towards log4net due to the simplicity. Logging isn’t of key importance to my project so it’s important I don’t spend too much time on it 🙂 Appending to a plain text file is actually enough for me, but It’s good to evaluate the options.

My service has to read from an XML file.

Time to make a start

September 25, 2006

I’ve been quite busy lately but it’s time to manage my time more effectively so I can get some projects I’ve been wanting to do under way. I definitely work best when I write out a to-do list, and I’m a graphical thinker so doing sketches and screen designs helps me get productive quickly. With that in mind…
My first project is going to be my Java RSS feed reader. I’ve recently started a fresh OS install so need to install a Java IDE, and mySQL. My to do list looks something like this: (very basic)

  • Screen design
  • Download/ Install javaIDE
  • Download/ Install mySQL
  • Create GUI front end
  • Create logic
  • Put it all together

The reason I’ve wanted to make this is because the offerings out don’t exactly fit my needs and it’ll be a fun project. I also have a feature that I don’t think has been incorporated in a feed reader that should add a little more enjoyment to keeping up with feeds! More on that as I develop it! The GUI will be first but I’m very interested in making a complete commandline interface.

Ariel for ruby and Netscape daily WTF?

September 18, 2006

Ariel was featured on the front page of del.icio.us today and is a ruby libary for extracting information from structured documents, for example HTML files. This looks like a very useful libary and may be the perfect motivation for me to learn ruby! From what I have seen and played round with I’m looking forward to doing more 🙂

I also found a link to the Blake Ross on Popup Suppression daily WTF, quite a funny post regarding Netscape 7.

SQL – XML in SQL Server 2000

September 13, 2006

I managed to try out the sp_makewebtask T-SQL stored procedure for exporting the result of an SQL query to XML file that I mentioned in an earlier post. I’m happy to say that it works a treat! I’m quite excited about it and would love to know if there is something similar for mysql now that stored procedures are supported (mysql 5).

The conversion is as simple as creating a .tpl file with the following (root can either be removed or changed to represent a doc type definition, much more useful then just root!):

<root>
<%begindetail%>
<%insert_data_here%>
<%enddetail%>
</root>

And then calling the stored procedurce in the query analyser, or however way you wish to call it.

sp_makewebtask @outputfile = ‘c:\temp\myxmlfile.xml’,
@query = ‘select * from sysobjects for xml auto’,
@templatefile = ‘c:\temp\template.tpl’

The result is an XML file created in c:\temp called myxmlfile.xml. I tried a few different queries such as: select * from customer where custID=1… which created a node called customer with the customer details as attributes.

<root>

<Customers custID=”1″ custFirstName=”John” custLastName=”Smith” custAddress=”123 Queen St”/>

</root>

I see this as being useful for sites such as del.icio.us where a user may want to export their url list to a file (del.icio.us actually offer this service, just using it as an example).

Microsoft AJAX Library…

September 12, 2006

… Is the new name for the Atlas toolkit. I much prefer the singular ‘Atlas’ and don’t see why they needed to change it? Longhorn – Vista is a different story:).

In saying this until I found out about the name change I hadn’t even heard of Atlas! The discovery comes at the perfect time as I need to do some web GUI work very soon and the Atlas toolkit looks very useful. I’m interested to see how it compares to the Yahoo YUI toolkit. The particular application I’m working on is a .net environment so looks like ‘Microsoft AJAX Library’ may be the go. I wonder if developers familiar with Atlas will continue to say Atlas?

I have mentioned YUI before in my post: GUI toolkits for web apps?

Web-based development is my biggest interest at the moment so I’m really looking forward to trying these toolkits out.

My industry project meeting yesterday went great and they were impressed with my documentation so its all go!

I’ve been looking at my large category list and have been wondering what to do with it? I think I will group them into more generic categories such as programming, design, database, etc. Less clutter and should allow easier navigation by category. I’d like to be able to list all posts on a single page (by title) too. I think simply having a link to the categories will be the best option.

Content management system

September 11, 2006

I’ve decided I’m going to go ahead with the porting of the basic content management system I wrote in Java EE to PHP. For a while I decided I wouldn’t due to the flexability of systems such as WordPress but I want to do it to extend my programming knowledge as well as to use as a demonstration of what I can do, as I created it from scratch.

I’m going to start by revising my class diagram and writing the Java classes into PHP classes. This shouldn’t be too big of a deal! I will also be revising the GUI as I didn’t have time to put a good effort into the design before. There are a few bits and pieces I want to add (XML feeds for example) ,so should be quite fun. It will also have no blogging features as this is not the scope or intended use of the system.

I have a couple of other projects on the horizon as well 🙂 Not going to say anything till they are underway but I’m hoping to start making some progress. Stay tuned!

editpost

I’ve also downloaded XAMPP. XAMPP is a package containing Apache 2.2.2, MySQL 5.0.21, PHP 5.1.4, phpMyAdmin 2.8.1, XAMPP Control Panel Version 2.3 and FileZilla FTP Server 0.9.16c and is perfect for portable media (I installed it on my portable hard disk). There are also Perl and Tom Cat add-ons available.

I have a meeting today with some developers for the company I am doing my project for to discuss the requirements and implementation so fingers crossed they like what I have done and agree on the plan of attack 🙂

Google Apps for Your Domain – Should a business trust a free service?

September 6, 2006

I’m sure most of the people reading this will have heard of Google’s Google Apps for your domain. This service allows a business to intergrate with Google’s Gmail free email service by allowing a company to use their registered domain name with a gmail account.When this was released I realised the great benifits of this to small businesses / organisations but was a little hesitant over the fact the data is not stored locally.

I read the post: Google & Windows Apps for your domain, the killer app for small businesses? Which gives a good overview of the service and highlights the trust issue. In the authors opinion, and my own, why not trust a third pary? Well it depends…
On the surface it’s easy to say it’s better to have your data stored in house as you have complete control. A counter argument could be that it would be better to have your information stored on Googles secure and highly maintained servers, off site. I think the later is much more appealing, backups, outages, and access become much less concern.

In my opinion it comes down to research; there is nothing wrong with entrusting your information to a third party (Accounting for example) as long as you have done some research on the company and are sure they are trustworthy. It’s also best to keep in mind Google Apps would be one of very few free services worth considering. I believe Google is trustworty and if the data is really that mission critical email may not be the best option anyway!

Google Apps for your domain looks like a great service and I’d reccomend it to a small company. One thing that would be nice to see is the ability to ensure all your data is deleted from Googles server when the account is deleted, even if you have to pay for it. I’m not sure what the procedure for deleting emails currently is.

Getting there!

September 1, 2006

I’m just finishing an analysis report for the organisation I’m doing my project for. The outcome will determine what path I take for the rest of the project. I’ve done research/ requirements report covering all aspects of the proposed system, alternative technologies and the implementation details. The documentation includes models such as an ERD for the relational database, and UML notation for the requirements gathering (use case), main processes and interactions (sequence). I have also included sample XML documents and schema files as well as the GUI prototypes. Its looking quite good!

This has mean’t I havn’t had much time to blog! I have managed to waste a lot of time at this site though!: http://eol.jsc.nasa.gov/info/use.htm

ESC_large_ISS006_ISS006-E-15620

Good ‘ol New Zealand 😀 Keep an eye out on my FlickR account, I’ll proberly post a few more up as I come across good ones.

Quite a while ago I was looking at getting into game development and came across The Media Design School. My interests since changed but I am still a subscriber to their email newsletter as I like to see whats going on in the local scene. The reason for bringing this up is that the latest newletter had a showcase of student work and I wanted to share Ricky Bok’s – Great Escape. Pretty cool!