Archive for February, 2009

Building Dynamic Tables on the Web that are sortable, resizeable and editable to backend data using Domino and Tablekit

Friday, February 27th, 2009

I have to give it to the folks at MillStream, who have developed TableKit. TableKit is a collection of HTML table enhancements using the Prototype framework. TableKit currently implements row striping, column sorting, column resizing and cell editing using Ajax. In less than an hour you can easily implement a table based on data in a Lotus Notes/Domino database. TableKit has a small footprint and gives the user freedom to easily update and sort data. Here are the steps to implement a TableKit for your Domino Database:

  • Step 1 – Downloading the Kit & Loading Files into your Domino Database – After downloading the kit you need to attach the files in the CSS and Javascript (JS) directory to your Domino database. There are a number of ways you can store these files in the database, I chose to store them as file resources and preserve the directory structure as shown below.

blog_dynamic-tables_1

  • Step 2 – Create Your Form Containing Necessary Elements -You can see the layout of this basic form below. Note that I store “xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en” in the $$HTMLTagAttributes field and I store the DocType settings in the $$HTMLFrontMatter field, using the same doctype obtained from the TableKit demo. I have a very simple table where I specify the classes/functionality that I want included in the table (sortable, resizable and editable) and the column headings that correspond to the data I will be presenting to the user. Note that your table head/th ID should be the EXACT NAME OF THE FIELD you plan on updating if you want to make the column editable.

blog_dynamic-tables_2-elements
The next screen cap shows the bottom of the form where we reference the JS files (computed text is to @webdbname) and the URL that should be called since we want this view to be editable. In this case we have it call an agent, which I will explain later. At this point we have everythingon the form that we need except the table data.

blog_dynamic-tables_3-elements

  • Step 3 – Adding the Table Data – Now we need to add the table data from the Domino Database. In this example, I chose to use a view although there are a number of ways this can be accomplished (e.g. QueryOpen agent). The view is set to be treated as pure HTML and the table is incredibly simple. You can set a class of “noedit” if you do not want a specific column to be updated by the user. If you want the table to be updated, you must assign a unique ID to the table row. Here is what I used for the first column of the view I embedded into the form:

blog_dynamic-tables_4-table-data

  • Step 4 – Create a LotusScript Agent to Receive the Post, Parse it and Update the Document – In step 2, we added a line specifying the agent to call when a user edits a cell. The user double clicks to edit a cell, makes the change, then clicks OK as shown below.

blog_dynamic-tables_5-script-agent
Upon clicking OK, a Post Request is made to the URL/agent that we specified. The code for the agent is below. When a post (vs. a get) is made to the agent, it creates a temporary document stored in memory that you can access via session.currentdocument. The document will automatically contain a field called Request_Content which contains, in valued pairs, the content posted. For example in the scenario in the above screen cap, if the user clicks OK the following is found in the session.documentcontext Request_Content field:

&row=3&cell=2&id=D17E1E80E02D9C4585257504006385D9&field=Subject&value=Platt%20Street%20Bridge%20

The agent below gets a handle on the document and Request_Content field and parses it to give us the document’s unique ID (IDstring) to be updated, the field that needs updating (fieldstring), and the value to place in that field (valstring). It also parses and replaces characters to handle spaces, forward slashes, and quotes. Then the agent gets a handle on the document to be updated, makes the change, and then prints the value back to the browser so the user is presented with the new value entered.

blog_dynamic-tables_6-postquoteview

And there you have it, a quick and easy way to implement sorting and inline editing for your web based Domino applications! Many thanks to MillStream for putting together such a robust, but easy to use, solution.

Dynamic, Search Engine Optimization Friendly dropdown menus for the web

Friday, February 20th, 2009

The problem with many of the dropdown menus found today on websites is that they are typically heavy javascript which presents the following drawbacks:

  • Search Engine Bots indexing your site cannot follow the links and subsequently index those pages. Bots will only follow links that are presented as a “standard href”. The majority of menus found have all links in javascript and stop any chance of the bot going on to these pages and indexing them.
  • Javascript Menus have a Heavy Footprint, meaning that it’s a lot of code in the js files which increases the download time. This is especially true if you have a site or application that builds the menu on the fly.

DCG has implemented and evaluated a number of open source menu options before finding OpenCube. This tool has allowed us to build web applications and websites using a dropdown menu that is highly configurable and uses the standard “href” tag. This allows search engine bots to easily access and index those pages. This CSS based dropdown menu system has a much lighter footprint and as a result, it is much easier to code when making it dynamic.

DCG takes it a step further with web applications using CSS based dropdown menus that are dynamic. This mean the menu options a user sees are based on their access/user roles. More importantly, we give the capability to distribute access to content and menu items to our customers so they can be self-sufficient and internally manage access to their web application content. This type of control is inherent to DCG’s custom hosted applications. Contact us for more information.

White Paper: Web 2.0 Demystified, what it is in plain English

Friday, February 13th, 2009

Web 2.0 is the popular term for advanced internet technology and applications and means a lot of different things to different people. The expression Web 2.0 was originally coined in 2004, following a conference dealing with next-generation Web concepts and issues. One of the most significant differences between Web 2.0 and the traditional World Wide Web is greater collaboration among internet users, content providers, and enterprises. Web 2.0 is all about blogs, social networks, and user generated content. It’s also about technologies and frameworks such as Rich Internet Applications (RIA), XML, Web Services, and AJAX. A technocrat could easily write a thesis on any of these applications and services. That’s not our style. Not only because we have much more interesting work to do, but also because we choose to simplify. To us, Web 2.0 means Community & Collaboration, Rich Internet Applications, and Integration.

Community & Collaboration- I call it Community and Collaboration, although there are many other ways to descibed it such as social networking and user generated content/sites. The explosion of bandwidth and user demand has generated a number of sites where users can post content. Examples include Flickr, FaceBook, MySpace, and YouTube. Users have information they want to share, or they have opinions they would like to express on your content. The point here is to put less thought into these sites and more thought into your own network or niche. Does your company or network have a community? Our internal Durkan Consulting Group (DCG) Portal is a perfect example of a Community. It is our employee intranet where content can be added, deleted, and modified. It is where we store and share information on projects and progress. We create and maintain comprehensive databases loaded with always-changing content. Durkan Consulting Group has unsurpassed experience in creating customized Community environments for our clients. When it comes down to it, Web 2.0 is about the people. It has to be inclusive. At Durkan Consulting Group, we listen, we learn, and we create exactly what our customers can use to maximize their productivity. We provide hosted intranets where you establish your own community of employees, partners, and clients, in any combination.

Rich Internet Applications – Web 2.0 also means robust web sites and web applications that have capabilities previously only found on desktop applications. For example there is AJAX, it’s not just for cleaning toilets anymore! AJAX (Asynchronous JavaScript and XML) is a method of building interactive applications for the web that process user requests immediately. AJAX combines several programming tools that allow content on web pages to update immediately when a user performs an action. (Unlike an HTTP request, during which users must wait for a whole new page to load.) For example, a weather forecasting site could display local conditions on one side of the page, without delay, after a user types in a zip code.

Durkan Consulting Group makes use of AJAX with the Google Map API. This interface allows the user to change views and manipulate maps in real-time. AJAX applications do not require installation of a plug-in, but work directly with a web browser. Functionally, there is a listener in the background on the web browser. That listener gets data passed to it and makes a call to a server. The server gets an answer and presents data to you.

Simply put, web applications now have a robustness that previously wasn’t common. Durkan Consulting Group builds and delivers powerful web applications using AJAX that allow our customers to do things such as; requesting a product list and having the list pop up to select an item, mapping, and walking down a decision tree choosing different options.

Our extensive AJAX knowledge allows us to deliver robust web applications for our clients that feature type-ahead, integration with web services, and customization retrieving data from a backend without ever refreshing the user’s browser page.

Rich Internet Applications are not only about AJAX, but are about other technologies as well. Durkan Consulting Group can also deliver internet applications based on Adobe Flex. Web 2.0 brings desktop capabilities to the web.

Integration- Finally, we have Integration, which means taking data that you have complete control over and mashing it up to an interface that hooks into a database. An example of this integration is the real estate map Durkan Consulting created for G. Anderson Agency, a realtor on Long Beach Island. We receive an XML feed of all rental data and programmatically retrieve the Google coordinates via a web service. Users are able to easily see where a specific rental property is located on the island. This integration is based on open standards such as XML. These open standards and Durkan Consulting Group’s technical expertise allows us to deliver advanced websites and web applications. We can easily handle XML feeds, integrate your data with your ERP system, and mash your data using the Google API or any other web service or external system .

At Durkan Consulting Group, we encourage our customers to be co-creators and contributors. We want our clients to feel a sense of ownership over their website or web application.