Wednesday, February 24, 2016

Java and SCons: We had to build a Coding Competition for an IDE in 2009. Developers would drop in Code. I went on with the research it appeared that SCons support for Java was basic. And we had to come up with our own way of solving the -classpath problem. Setting the class path and JavaStrategy
project-java-build-run main files: SConstruct,,

SConstruct: Main build functions. lib: lib files needed for compilation. src: Source files. bin: Compiled class files. tools: scons-local or junit. Execution.

The idea was to walk directories and pick the jars

Friday, January 8, 2016

This post is for care of Parents:
Parents as they get old, should be helped, physically. Only 5 minutes of boxing on their head and arms is sufficient for their health.

The 2nd One :
Medicines are taken slowly and left that way. And the doc should take the history as well

3th One :
"If a hard medicine is advised, one should be a bit more compensating in sharing the home's resources".

4th One:
Lesser carbohydrates, walk

5th One:
Parents should not be treated like servants

Monday, October 8, 2012

Linux as a user's desktop is a wonderful experience. Beyond your imagination.
Fedora KDE is like windows but heavy at times, task bar is at the bottom and themes available right from the desktop, which make it quite a surprise at the first look.

Fedora Default spin, I used Fedora 15 and got sick of it as I had to do a lot of mental work with it, and it was just an additional overhead, so I switched to other spins, like KDE, Xfce.

Xfce has taskbar on top of the screen, I just wanted it to be at the bottom, but this is how it is. Quite a good one actually. As simpler and developers should use it.

I have used ubuntu as well, and it's like Fedora 15, as I don't have laptops and LCD's so that was a bit too much for me, though I have a 19 inch monitor. Older versions of Ubuntu were good. As Kde.

Installation of Linux, could not be made simpler, download live image, FedoraUbuntu, to the USB, boot, install and you will be able be dual booting. Hardly takes more than five minutes.
  • '/' This will be the root partition of your system.
  • 'swap' This will be the swap space.
  • and boot partition. 
  • You can opt to make /home. 
Linux hardly two or three commands: 
  • 'su --' will give you root access to your system, and there you are, ready to empower your thoughts.
  • Add the software repositories: RPM Fusion Repositories.
  • 'yum update' immediately after installation. This will update all packages to the latest.
Microsoft in very few scenarios, as in Office Products. What if tomorrow you have to come up with a Web Sites Tabular Data into an Excel Sheet Or Something like whole web pages being captured into a word document.

Monday, October 25, 2010

I did Java enterprise development with Jsp's and related technologies. This post refers to development earlier in my career Spring framework can be checked. This is a showcase and just a Tutorial for developers working on projects based on my 7 to 8 months experience.

Applications with simple JSP's:
If it's an application with no MVC, simple jsp's, still there are things which can be done.
  • Commenting e.g. the SQL queries what they are supposed to do.
  • Maintaining the data in session that is needed most often in more places, such as user id's etc. 
  • Following a standard naming convention, for Javascript and Java, e.g. id and name attributes can be same for HTML elements etc. 
  • Trimming fields before they go to the database. 
Applications with Apache Struts 1:
Struts a joy to program I had background in Jsp's that's why Struts was a delight Besides I had a background in Java and the book Mastering Jakarta Struts is a basic concise introduction to Struts. I remember when I cleaned my code in the last iteration. I was joyed to see the all the crappy code gone with few Java Classes left.

I was working on an application, where the user goes back and forth the Next Previous buttons you see on screens, then how would you deliver him the data he has submitted already, there you have to maintain it in Session. With struts it's the scope attribute, in struts-config, and the FormBeans get it from there. Complex screens having multiple elements, moving here and there, there I needed advanced struts scripting, e.g. Indexed Properties.

Struts Indexed Properties:
Let's consider an example, You have a form for the user to submit his education, such as.


We will use Indexed Properties here. The first attempt to put the RowObject (containing a single html row elements) directly in the FormBean, OR, if the single column is considered a Collection. Not The Struts Way.

Instead the FormBean contains the Collection and RowObjects are seperate Objects. RowObjects are assigned to the Collection in the FormBean through the setter as:
public void setRowObject(int i, RowObject rowObject) in the FormBean.

Here is the FormBean

The RowObject is SingleEducationUnit which is assigned to the Collection through the setter:
public void setSingleEducationUnit(int i, SingleEducationUnit singleEducationUnit) as above, The last method.

Here is the Single RowObject which is in our case.

Here is the education.jsp

We needed the Indexed Properties in several places in our application, and once I got it right it was nice going there on. You can figure out the rest, struts-config.xml, for example.

Add Row:
The real fun started when we had dynamic rows in the tables which the user can make, there I passed hidden attribute for how many new rows the user created, and then at the server side I extended the array list, with this hidden attribute.

Books: Mastering Jakarta Struts. (Handy book, concise, Good Starting Point)
             Jakarta Struts Live (Good Book, free I think).          

Client End Scripting:
I had to program extensively in Javascript, DHTML, CSS. Dynamically generating all sorts of Screen Elements, Using Calendars etc.

Accessing the Database:
The DAO Layer, we used it for a medium sized J2EE application. My manager wrote it. Using it was good, as we were spared from writing SQL queries. There are Create, Retrieve, Update, Delete Operations for DB tables, (Which is the common CRUD Operations). I have seen the DAO Layer pattern in PHP (Symfony framework), for example. MVC and DAO are everywhere, once you get the concept e.g. I got from Struts, it's same in other frameworks.

Ofcourse there should be validation, for which Validator Framework can be used, Using Calendars, use of Message Resources, but you can figure that out yourself.