Amazon deals

Monday, September 22, 2008

Xforms - An insight

Xpath, Xquery, Xlink, XSLT, Xforms uph... the never ending list of techologies that begin with an X and literaly give people headaches being one of the most complicated yet powerful SGML. This is a honest effort to render off itsy bitsy details about one such XML based technology - Xforms.

Well Xforms to begin with is a W3C recommendation that is a replacement for standard HTML forms. XForms provides a richer, more secure, and device independent way of handling web input. Pretty easy to learn actuall if u go through some tutorials like http://www.w3schools.com/xforms/xforms_intro.asp but they don't spell out the looming truth. You can very well write an xform page but to get it to display in your ordinary browser... well its close to defining hell. So here's what you got to do.

XForms browser Plugins


For Mozilla: Well for all those who switched to mozilla 3.0 there's no plugin available for Xforms, there goes W3c statements of supporting Xforms in all future browsers. The new kid on the block Chrome also doesn't support it natively nor has it plugins. For those still on Mozilla 2.0 check http://www.mozilla.org/projects/xforms/download.html

For IE: for once IE is good. Well atleast there are plugin developers who have developed plugins for Xforms for non native support. These include formsplayer and Novell

XForms standalone browsers


The most popular standalone XForms browser is surely X-Smiles, developed by the the University of Helsinky. X-Smiles is a Java-based browser, with full support for XForms and for Smil. X-Smiles works as well on PCs, as on PDAs as on (modern) mobile phones

XForms application servers


This is the third category which is quite useful if you don't want your clients to install software at their end to run your web application. That doesn't make it the recommended option though as its damn slow as the server process your xml based form and renders an equivalent html+js. However you can try it out in case you can sacrifice the speed for delivering your end users a hassle free usage of your application. The most popular of these application servers is probably Chiba 2.0, from ChibaCon. It is open source, very stable, and very easy to install on the server: just deploy the .war file on your favorite application server (Tomcat, JBoss, Orion, Resin, Oracle, WebLogic, WebSphere ...), and you are ready.

Friday, September 19, 2008

Lessons learnt

I've learned that it's taking me a long time to become the person I want to be.

I've learned that we are responsible for what we do, no matter how we feel.

I've learned that either you control your attitude or it controls you.

I've learned that learning to forgive takes practice.

I've learned that there are people who love you dearly, but just don't know how to show it.

I've learned that just because someone doesn't love you the way you want them to doesn't mean they don't love you with all they have.

I've learned that it isn't always enough to be forgiven by others. Sometimes you have to learn to forgive yourself.

Last but not the least I've learned that no matter how bad your heart is broken the world doesn't stop for your grief.

Wednesday, September 10, 2008

Don't move a database that has it's tables linked in db2

Hey guys, don't make the mistake I did by trying to move a database that has its tables linked. You'll get an sql error numbered 3304.

LOAD is a very fast and direct way to get data from a file residing in the file system into a table in your database. LOAD does not use SQL INSERT statements, as does IMPORT. Instead, it writes the data directly to the data pages in the tablespace. Additionally, less logging occurs to further improve performance of the load process.

So, we need to keep the behavior of LOAD itself in mind. If there are any dependent tables (tables that have a foreign key referencing the table into which data is to be loaded, for example), they might be placed in the CHECK PENDING state. Additionally, further constraints could also result in the table not being available right after the LOAD operation, requiring you to run the SET INTEGRITY SQL statement first.

So, you could either set INTEGRITY SQL or you could do the mapping in your buisness logic using entity beans.

Monday, August 25, 2008

Hibernate...

This video is a part of our continuous approach towards learning by sharing knowledge together. We deal with hibernate plugin onto the reverse engineering process we discussed earlier.

[googlevideo=http://video.google.com/videoplay?docid=7169964626981764870]

Sunday, August 24, 2008

AJAX

AJAX is simple.... It ought to be as you can even find books titled "Teach yourself AJAX in 10 minutes". I mean even the silliest of technology learning book titles have a minimum time span of 24 hours but by jove 10 minutes?? By the way the simplicity of ajax using jmaki plugin is demostrated in the following screencast(PS:don't feel bad, its a little screechy and 14 mins long but anyway gives an overview of jmaki and dojo). Now to the reality part, what exactly is AJAX? AJAX (asynchronous JavaScript and XML) isn'ta technology. It's really several technologies, each flourishing in its own right, coming together in powerful new ways. AJAX incorporates:

  • Standards based presentation using XHTML and CSS

  • Dynamic display and interaction using the document object model

  • Data interchange and manipulation using XML and XSLT

  • Asynchronous data retrieval using  XmlHttpRequest

  • and JavaScript binding everything together.


What is important to note is that it is easy to use ajax code from ajax libraries available  such as those from Yahoo, Google and DOJO to name a few, but to write your own code in AJAX its humongus. The only way to be good at AJAX is "Practice, practice and more practice".

Saturday, August 9, 2008

Reverse Engineering : An insight into the process of reverse engineering databases

Lets first look into the definition of reverse engineering. Reverse engineering (RE) is the process of discovering the technological principles of a device, object or system through analysis of its structure, function and operation. Reverse Engineering is a very powerful technique for discovering the structures of databases. There are many tools available like Apache Cayenee,Oracle Designer etc. What I want to talk thorough here is the concept of reverse engineering and its relevance into enterprise application development. You must be knowing that in the 3 tier system of Enterprise Applications other than the business code in the middle tier a lot of coding goes into both data access and modification in the innermost layer. So an enterprise app could be seen as a concentric sperical shell of three layers with the ineermost core dedicated to database(say db2),its connections and data access. Once we have this core, i.e. we know exactly what data is to be delt with we could use a tool to map the database directly to code(POJO and DAO combination in case of EJB's) and then build the rest of the application on top of this. This is reverse of the actual front end to back end conceptuation we tend to do and is termed reverse engineering. Its a relatively fast and effective method wherein the focus is exactly on the application data, enabling us to build on both existing databases and our own data logic on any given scenario.

Monday, July 28, 2008

Moving a db2 database

You must have encountered this problem sometime while working on db2. It doesn't have a proper GUI for direct moving of a database from one system to another. Here are the detailed steps.

Step1:
Export using following command sequence

/>db2move databasename export

Commet: this generates files Export.out - ASCI info about export db2move.lst - has table info tabn.ixf - info exchange format, holds data .msg -message files tabna.nnn - large object data

/>db2look -d databasename -e -a -o outputfilename.sql

Comment: generates the sql file holding DDL data

Step2:
move all files to the target system

Step3:
Import using following command sequence

/>db2 create databasename
comment: creates the database
/>db2 -tvf sqlfile.sql
comment: structure the generated database with the sql file from the export
/>db2move databasename load

/*HURRAY DATABASE MOVED */