Tuesday, May 17, 2005
I think that java is good for .net in that the designers where able to look at java and make design decisions based on what is right and what is wrong with the java implementation.  On the other hand .net is good for java because many of the great features of .net will find their way into java via open sources projects and/or additions to the language.

One place where java is lacking is XML serialization of objects.  In .net this is very trivial and the whole thing can be controlled by attributes.  In java attributes are new to 1.5 and there is no built in serialization.  Fotuneately, java has a huge open-source community.  I've found a product named Xstream which makes object to xml serialization very easy.  A couple caveats: version 1.1 does not handle serializing properties to attributes.  Also, serialization must be controlled through code as java just got attributes so you can't mark a property with an attribute in the code to control serialization. 

I've used Xstream and it is very easy to use.  If you are looking for a very easy serialization library for java then Xstream is your best bet.  I have not found another library that works like this and is at a production level. 

Here is the link:  http://xstream.codehaus.org
Tuesday, May 17, 2005 9:00:05 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
I have made some signifigant progress on the ACL security in CHT.  At this point the security is implemented using the visible and enabled proeperties of the controls on the form.  I have wrapped the label, input (textbox, etc) validators and help controls in a an asp:panel (which renders to a div) so that I can simlply hide the whole thing if the user does not have view rights to the object.  For the edit rights I simply disable the input if they do not have edit rights.

At the collection level there are add and delete permissions.  These are pretty easy to establish a link for add and delete just needs to be hidden/visible based on permissions.

An additional issue will be the view permissions in the collection (list) view of the objects.  This could either be handled with templates or with the same visible = true|false scheme. 

So far, so good...
Tuesday, May 17, 2005 8:48:46 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, May 16, 2005

I’ve implemented two things that will enable a fair amount of progress.

The first is a lookup table implementation.  Any name/value pairs can be stored and retrieved from the persistence engine (database, etc).  This makes population combo boxes, list boxes etc very easy.  The search is performed on the object and field.  So for instance a type of car could be search by car & category and then all matching values will be returned.  I have built this into the generation code so that all properties that have an attribute=”choice” will have their UI code load the choices.  This is a possible candidate for caching.

The second system wide feature is field level security.  This is a typical role based security system where each user is assigned one or more roles and each role is assigned permissions to each object, method and field.  This is context driven so that that a customer.name has different permissions then a builder.name.  I’ve built an AccessControlList table in the database and then each field can be queried by its distinguished name i.e. customer.name.  This feature is still experimental but should allow a very manageable security infrastructure for CHT.  This is another candidate for caching.

Monday, May 16, 2005 2:32:31 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Tuesday, May 03, 2005
The code generation project Prometheus continues to evolve.  I have the general ASP.NET UI generation completed.  However as I move forward there are some advanced features to add.  One of these is support for lists.  DropDownLists or ListBox controls are the first and foremost issue.  It's fine to generate them but the current issue is how to indicate the datasource for the values to populate the list.  This is more of a conceptual problem then a technical problem as I know serveral ways to do this but I need to determine a nice clean way to make this work with the rest of the site.
Tuesday, May 03, 2005 7:51:22 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, May 02, 2005
I spent a good deal of time working on the CHT product over the weekend.  I made some tweaks to the menu system and added a help system.  It works fairly well if I do say so my self.   I was running through a test and I found something interesting.  ASP.NET out of the box has very spotty support for browsers other then IE.  You probablly don't think this is much of a suriprise as #1 IE and ASP.NET are both MS products but from another perspective issue #2 is the adoption of IE.  It has an overwhelming market share and any company catering to the web market needs to look at its user base and see what the market is needing or wanting.  A product that works with IE is going to hit a large portion of the target.  Also most people using an alternative browser still have IE installed just in case (or b/c they can't get rid of IE ;>).

This brings me to the point of this post.  I have decided to postpone official support for Firefox until at least the next release of CHT.  I have been testing the product in both browsers to ensure the widest widest possible. 

Here are a few issues I ran into supporting Firefox:
  • ASP.NET considers all other browsers as down level, meaining that it renders tables instead of DIVs and some other annoying issues  This can be fixed with a browsercaps section in the web.config file.  Google on it.
  • ASP.NET client-side validation does not work on Firefox.  This is because of the validation script used by ASP.NET validation controls.  There is a work around for this.  It also involves the browsercaps issue mentioned above but you must also use custom validation controls of which there are a few out there.  A link to a great article on the topic.
So my alternatives are to use hacks in ASP.NET 1.1 or wait until 2.0 comes out with the official fixes for all this.  Considering the limited market share of Firefox and a foreseeable fix I think I will dealy official support for Firefox.  However I will continue to test against Firefox just to see what my CSS and HTML look like in another browser.  I will continue to use the browsercaps hack for correct rendering but I will have to leave cross-browser validation for another day.
Monday, May 02, 2005 1:22:11 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Friday, April 29, 2005
Another great article by Joel.  One thing that is glaringly obvious is that I need to add a bug tracking database.

Number 8 is especially impoortant and seems to be the one thing that managers and/or management in general doesn't understand about knowledge workers.

Here's the post
Friday, April 29, 2005 7:47:08 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, April 28, 2005

This is a great alternative to Access.  I've used this database for web sites and desktop apps.  There are drivers for virtually any major language (.net, java) and also ODBC drivers.  There are some nice visual front ends for this database but the command line utility is elegantly simple to use. 

Don’t expect features like stored procedures here as this is a very compact and light weight database.  Also the data typing is rather loose so don’t rely on the database to verify data types (which you shouldn’t do anyway).  It appears that PHP is including this in the distribution so this database will become widely available. 

This is a great database to use for prototyping and distributed or mobile applications.  Of course it lacks enterprise features but that may be a bonus in some situations.  The speed of the database is unbeatable so this is definitely a tool to look at if you need a fast light weight portable database.


http://www.sqlite.org/
Thursday, April 28, 2005 2:13:50 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, April 27, 2005
Wednesday, April 27, 2005 2:24:00 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
This is  a good article on a feature of Windows XP that I did not know about:

XP Prefetch Explanation
Wednesday, April 27, 2005 8:20:42 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Tuesday, April 26, 2005

Subversion is a nice open-source replacement for CVS which is the grand daddy of open source version control.  Subversion fixes some of CVS's problems and is a very nice package for the price (free).  I have stopped using Visual Source Safe in favor of Subversion and I believe that Subversion also beats ClearCase in ease of use and maintainability.
 

I have created a quick tutorial for getting SVN up and running.  This should not be a substitute for reading the manual.

SVN New Repository Setup

 1.  Download and install SVN and Tortoise SVN.  Currently at http://subversion.tigris.org/ and http://tortoisesvn.tigris.org/ respectively.

 2.  Decide on a repository layout.

            I prefer this layout format:

                        /
                        /project
                                    
/trunk
                                     /branches
                                     /tags

This layout allows us to have multiple projects in the repository organized by project which is the most convenient organization method by my way of thinking but you may come up with your own as Subversion does not force you to use a certain layout.  A layout can also be changed at a later date unlike CVS.

 3.  Once you have a layout it's time to create a repository.

            a.  Open a command line

            b.  run this command:  C:\>svnadmin create --fs-type fsfs c:\svn

This creates a new repository at c:\svn.  It is in FSFS format as opposed to the default Berkely Database format. 

The FSFS format appears to be a much better choice in almost all situations but you can consult the documentation for more info.

 c. There will be many files and directories inside the repository but you will not and should not edit these directly.

 
4.  Now that we have a repository let's implement that layout format we decided on in step 2.

The easiest way to create a file format is to create a temp directory and set up the structure in that temp directory and then import that into the repository.

         a.  In windows open a command prompt and do the following:

                        (this can be done in windows explorer also)

            C:\>mkdir tmpdir

            C:\>cd tmpdir

            C:\tmpdir>mkdir yourproject

            C:\tmpdir>mkdir yourproject\trunk

            C:\tmpdir>mkdir yourproject\branches

            C:\tmpdir>mkdir yourproject\tags

           
         b.  Now import this structure into our repository:

            C:\tmpdir>svn import . file:///c:/svn --message "initial repository layout"

           (Pay attention to the forward slashes as they are important, svn is not as forgiving as Windows in the forward/back slash department)      

           
         c. Now we can view our repository structure:

C:\>svn list --verbose file:///c:/svn/yourproject

 
5.  Now we will either begin work on a new project or check in an existing project.

 a.  If we have an existing project we can import it using this command: 

            C:\>svn import  c:\pathtoprojectfile file:///c:/svn/yourproject/trunk -m "initial import"

The syntax of the command is svn import pathofprojecttoimport urltorepository -m "message to label this version with"

Notice that we are importing our project into the trunk folder.  This trunk folder is our main line of development. 

 
6.  We want to export a working copy of our project so that we can begin to work on it.

                       Here is the command:

                       C:\>svn checkout urltorepository pathtoworkingproject

                       Notice that this is the opposite of import command. 

This is a good place to mention that when you have an existing project you want to add to source control you should probably move your original source to another directory then clean out all the unnecessary files, binaries or otherwise, that should not be added to source control, this is anything that can be built or generated.  Once you have cleaned up your files and import the project, you will want to choose the place where you want to work with the project, which might be the same place you imported it from in the first place, so you may want to make a backup of your current working directory because you will need to do a checkout into an empty directory.  Once you have completed the checkout into the empty working directory you can add back any libraries or other binaries (dll's, pictures, etc) that you did not originally add to source control. 

Binaries of any type that will not be changing but need to be saved should probably be archived in some manner, you may choose to add it to your version control system for convenience or simply store these in another directory that will be backed up but not version controlled. 

7.  Now that we've made our changes we need to commit these changes to the repository.

            change path to the directory of your working project

            C:\>cd \pathtoworkingproject

            C:\>svn commit -m "checkin comments"

This completes our command line walk though of SVN.  If you are not a fan of the command line all of this can be done using TortoiseSVN.  I will cover this in another tutorial.

Tuesday, April 26, 2005 4:35:15 PM (Central Standard Time, UTC-06:00)  #    Comments [0]

The Log4j project has become the de facto logging standard in the java community.  Even with the introduction of built in logging in J2SE 1.4, Log4j still remains the premiere logging framework for java.  The built in library java.util.logging provides convenience but lacks the features of the more mature Log4j.  However, not including the extra appenders and formatting that Log4j offers the function of the two libraries are very similar.  In my opinion you are much better off using the Log4j framework from the start and sticking with it.  The extra functionality has been worth it, at least in my experience.

Another advantage of Log4j is that there are versions of Log4X available for almost every major language.  I also use Log4net for my C# development and it is very nice to be able to switch languages but maintain a very familiar framework.  Almost all the configuration and even the method calls and classes remain virtually unchanged.  One caveat is that Log4net is in some kind of purgatory at the Apache foundation waiting for official project status.  I notice most of their releases are labeled as beta but I have not had any issues with it so far.  Your mileage may vary.

When you need logging, Log4X should be your first choice no matter what language you are using. 

Tuesday, April 26, 2005 4:23:19 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
One of the best sites for clean, clean and yes cutting-edge CSS is Stu Nicholls' Cutting Edge CSS.

I've integrated many of his examples into my projects including 3 column layout with DIV's and a nice 3-D tabular effect for menus .

I always try to check this site to see if there any updates because most of Stu's examples make it easier to design standards compliant pages with nice functionality.
Tuesday, April 26, 2005 11:35:56 AM (Central Standard Time, UTC-06:00)  #    Comments [0]