By Rupert
javascript
ExtJS: Window Snippet
Mar 27th
Just a quick example on creating floatable windows
Note that renderTo: ‘document.body’ would result in an error, use renderTo: document.body instead
Test Driven Development using Test.AnotherWay and mxUnit
Mar 20th
Time and time again, I have debugging bugs and redeveloping code which some I wrote but mostly done by others as well. Experience is still my best teacher in web development and I believe it would be a heavier burden later on if we continuously pursue rapid development without any testing at all.
You may have heard of writing test cases before diving into code which is well known as Test Driven Development. This methodology has been widely adapted in programming (Java thru JUnit, etc). Following Kent Beck’s Test Driven Development (TDD) we will follow this simple method:
- Write the test first
- Watch the test fail
- Write the component
- Watch the test pass
Aptana Impressions
Mar 16th
I recently downloaded Aptana Studio 1.1 Community Edition and have been using it mostly for my Javascript/ColdFusion development.
- Intellisense for ExtJS by using com.extjs.ext.2.0_1.0.0.00000.jar from the ExtJS blog. Umm, I am hoping someday OpenLayers can provide a similar jar file to provide code assist.
- I like the fact that it could clearly display an outline of my javascript objects but sometimes not for all.
But one of the major problems I encountered was the startup. Sometimes, for some unknown reason, Aptana cannot start using the executable it provided during the install. However, I was able to weed that problem out by instead launching it from startup.jar. All of these is documented from Aptana’s JIRA ticket.
1. Downloaded and install Aptana
2. Watched Aptana TV Overview
3. Installed cfeclipse http://www.cfeclipse.org/update
4. Installed viPlugin http://satokar.com/ (Note that the viPlugin would not work with files = *.html)
5. Added the extjs2.0 code assist
Making GeoJSON outputs from PostGIS
Feb 23rd
I have an internet/web application sitting on top of OpenLayers, ExtJS, ColdFusion and PostGreSQL/PostGIS. I can query the geometry from PostGIS thru ColdFusion without any problems. If you are in ColdFusion 7, then you need a postgresql driver installed, but I do suggest you use ColdFusion 8 as the driver is built-in.
To display the geometry, I typically use AsGML output from PostGIS and supply that path to OpenLayers. Although it works as expected, I need to invest in two (2) http calls to the server:
- 1st Request: Call search.cfm and get the attributes (name, address, tel_no, etc…). Afterwards, display the results on an Ext.Window.
- 2nd Request: Display the geometries on OpenLayers using GML.
ExtJS and OpenLayers
Feb 19th
It seems that ExtJS and OpenLayers does not blend well together. One of the bug biters that hit me was the way ExtJS was handling arrays. It would be wise for OpenLayers to be agnostic of these frameworks.
for( var i in blocks ) should be transformed to for( var i = 0; i < blocks.length; i++)
I believe OpenLayers Ticket#1362 closely resembles this bug. Thanks to pgiraud for pointing me to the right direction.
Comments