Thursday, September 23, 2004

Got 6 gmail invitations

Got an invitation to invite 6 more people to open gmail accounts.So if anyone needs a gmail account just post your name and e-mail address as comments to this post.

Tuesday, September 21, 2004

JBoss application server 4.0 released

The much awaited JBoss application server 4.0 is released on yesterday.This is the first open source application server to be certified J2ee 1.4 compliant.This also has the Tomcat web container and Hibernate for object relational mapping.
With the major re-work planned for EJB 3.0, the integration of hibernate provides an alternative in using plain java classes for persistence.
You can download the current version at:
http://www.jboss.com/downloads/index

Monday, September 20, 2004

Open source tools for .NET:the good and the evil

I am a fan of open source tools and i really have great admiration for people developing open source tools.I always believed one of the success factors for java is also the support provided by the open source community.
The other day i was reading a very active debate going on at www.theserverside.net on "Does the .NET community need open source?".I firmly believe a very vibrant open source community for .NET will be very good for both Microsoft as well as the developers.I truly believe it's a win win situation.And i really don't believe the arguments against open source and i don't see how an active community creating some great tools and releasing it under open source for the rest of the developer community can be bad for .NET.
Currently most of the java open source projects have their .NET counterparts developed or under development. For example:
junit - nunit (an unit testing framework)
hibernate - nhibernate (object relational mapping tool)
ant - nant (a build tool)
and a whole lot more...
So if you want to check out the open source tools available on .NET try the following links
http://csharp-source.net/
http://www.sourceforge.net/

Monday, September 13, 2004

Peek .NET 2005: Partial Classes...

One of the newest addition to the feature list of .NET 2005 is the concept of partial classes. Though it might not be a very exciting feature compared to the rest of the features .NET 2005 has to offer it sure does have its own list of benefits.So what is a partial class?A partial class is a partial definition of a class with the complete definition split across multiple files of class definitions. For example I can define a Customer class split across class definitions in VB.NET(2005) as:
Public Class Customer
Private CustName as String
End Class
Partial Public Class Customer
Private CustBalance as Double
End Class
So once i compile I'll have one single Customer class with two fields(CustName and CustBalance). But why would i want to do that?Why can't i just define both the fields in one Customer class definition?The actual benefit of partial class will be visible when you use code generation.Code generation usually involves your classes generated and your class definitions updated frequently.When you use VS.NET 2003 you might have noticed the Windows Forms Generated Code which is hidden by a region.So a Form in VS.NET 2003 has code that is generated as well as code written by the developer in the same file.With VS.NET 2005 the Form definition will be split using partial classes with one being generated and the other one being coded by the developer.This provides a clean seperation between the generated code and the code written by the developer.
As i said in my previous blog, code generation is a very important thing in current software development practice that shouldn't be ignored.And partial class complement code generation to integrate it into your development stream easily.

Friday, September 10, 2004

NAnt:More than just a build tool...

You have just done some change to your existing source or just started to write a few lines of code for a new project or u have done nearly 99% of the code for your project, your expectation of the build process differs by the stage you are in your project.Generally a build process does a compilation of your source and creates the output files or reports the compilation errors.But as your development work gets more complex you wish your build process can do more like checking out your source from VSS or e-mailing the build output to an admin or creating documentation or running your unit tests automatically.This is where NAnt comes in.
NAnt is very similar to Ant a Java build tool.You create build files with targets to be executed by NAnt.These targets will have tasks to do the work required such as compiling or checking out source etc...And if you want to perform a task thats not available(though NAnt and its associate projects have a big list of tasks) you can write your own task and include in in your build file.So if you want to try out NAnt check out the following links to download the necessary files:
http://nant.sourceforge.net/
http://nantcontrib.sourceforge.net/ This project defines some additional tasks not available with NAnt
So Happy building ... and post your experiences as well

Wednesday, September 08, 2004

Got a gmail account

Atlast got a gmail account.1GB for e-mails is what i needed as my hotmail was going over the limit.
Thx Jinath(http://jinath.weblogs.us) for sending the invitation.

Tuesday, September 07, 2004

Is AOP going to kill OOP?

I am pretty sure you have heard the buzz word about Aspect Oriented Programming...So what is AOP?Is it the next big thing in IT after OOP?So does that mean OOP is dead?
Actually AOP is in no means a competition to OOP.In fact it's a complement to OOP that adds value to your objects.Generally in OOP when we define classes, a principle we follow is that an object should have a clearly definable responsibility.For example if we take a Customer class it should contain functionalities of a Customer.But when we implement this in our program our domain classes (For example Customer) is cluttered with logging, security implementations etc...These are cross cutting concerns that shouldn't be part of our domain classes.So AOP provides you a way to extract these cross cutting concerns into Aspects and have them adorn our objects to get the required functionality.
So How do you do AOP?Well either you can implement your own AOP frameworks or try out the following:
http://www.rapier-loom.net for a .NET AOP implementation
http://eclipse.org/aspectj for a Java AOP implementation

Monday, September 06, 2004

NUnit-Write test code and code???Thats a lot of work...

Well that was my first impression when i was introduced to JUnit a java unit testing tool.At the start when i started playing around with it, it seemed like lot of work writing test classes and test cases but as i got used to it...it became a very important tool in my collection of development tools.Actually it saves you a lot of time when it comes to testing as your testing can be automated instead of running your entire project to figure out whether a portion of your source is doing what it's supposed to do.
And with NUnit I get the same facility in my .NET programming.It's really simple to incorperate NUnit to your development.
1.Add a test project to your solution(preferably a class library lets call
this Test project)
2.Add reference to NUnit.Framework and the projects in your solution that you want to test.
3.Write Test classes in your test project for the classes or functions you
want to test.
4.Invoke the NUnit-GUI and select the Test project.dll you created and click
on Run.
It's really that simple...So if you want to try out NUnit...go to http://www.nunit.org/ and download the required assemblies.Go through the docs and if you have any trouble post a comment...will try to help out in my spare time.

Annual Book Exhibition

The Annual Book Exhibition is on today from the 6th to the 12th at BMICH.Got a huge book list to buy and hopefully will be able to get every single one i need...

Friday, September 03, 2004

Code Generation

I know there are lot of developers with mixed reactions about code generators.Ok,I'll speak for myself...I used to hate code generators and always looked at them with a doubt in my eye.But are code generators so bad? Well nowadays I am starting to trust them a little bit more than i usually do and use them in my day to day work a lot more...So recently came across an open source project in C# called Data Tier Generator available at http://sourceforge.net/projects/csharpdatatier/. Once your database is created in SQL server with all the relationships between tables, you can use the generator to generate stored procedures for accessing your tables and cSharp code for calling the generated stored procedures.The Data Tier Generator will generate stored procedures for common data access code such as insert,update,delete by primary key,select by primary key, delete by foreign key and select by foreign key.This is a very good example of how much work can be cut down by code generators.With the data tier generated you can quickly start coding the business classes and use the generated data tier to persist your business objects.
So if you are interested in writing your own code generators check out the book Code Generation in Microsoft.NET by Kathleen Dollard which uses a XSLT based approach for generating code.
And if you are not interested in code generators think again, there are a lot of areas in software development where you can cut out development time by automating repetitive tasks through code generation.This will allow you to focus more on tasks very specific for your business domain such as business rules.

Thursday, September 02, 2004

Book:Another Head First...

Wanna know the next big thing in the java community after the release java 5.0 code named tiger...It's the release of the book Head First Servlets and JSP. Planning to get hold of a copy as soon as its available in a nearby book store.If you are a previous reader of any Head First book, pretty sure you will be looking forward to as well.
Hope Kathy and Bert will knit a few more books filled with technology and laughter (Wonder how they mixed those two together)...Great work guys

Srilankan Dot Net Forum 3rd meeting

The third meeting of the Srilankan dot net forum (http://www.dotnetforum.lk) was held yesterday(Unfortunately couldn't make it again...) The Srilankan forum is becoming a very vibrant community on .NET.Hats off to everyones contribution large and small

Atlast I am blogging

Decided to start a blog 2 months ago and finally started blogging... (Yipeeee)
So mostly i'll be blabbering(I mean blogging) about development in Sun and Microsoft related technologies...(Yes they will co-exist in my blog and the world of web services)