Hehe, another Microsoft & Java comparison.
Overall, both of them having a quite complete framework which let developers easy to develop web application.
ASP.NET 2.0 & Apache Struts framework comparison:
1) .NET Master Page = Struts Tiles Definition (Something like layout)
2) .NET Theme & Skin, Struts don't have this feature. (Store all the images, css in one place, make it easy to change from one set to another set)
3) Struts URL remap from .jsp to .do, .NET don't have this feature. (The jsp file for http://www.abc.com/index.do can be store at //server-root-path/somename/main.jsp, outsider won't know where is the exact location of the jsp file)
4) Struts Business Logic & Presentation Layer Separate, .NET don't have this feature. (Business logic centralize at Struts Action, separate from presentation layer which is the jsp, jsp only use to display selected data, all the logic on select what data out program at Struts Action)
5) Both have Resources for localization.
6) Both have Pre-compilation, create a cache copy on the server, let user open a website faster.
Secondly is the software use for web development:
1) Microsoft ASP.NET 2.0 - Microsoft Visual Studio 2005 (NOT FREE) or Microsoft Visual Web Developer (FREE) + Microsoft .NET Framework 2.0
2) Java Apache Struts - Netbeans (FREE) or Eclipse (FREE) + Struts plug in
Thirdly is how easy to pick up these new framework:
1) Microsoft ASP.NET 2.0 - I find it quite easy to learn. There are a lot of online resources available to view or download. I like W3Schools the most, all the basic information can get from there, easy to understand also.
2) Java Apache Struts - I find it hard to learn. There are too many things to handle for create a single page, struts-config, tiles-definition, application-resources, Action, Form & jsp 6 things. I took quite some time to pick up this framework.
But the way, I still haven't fully discover all the .NET features, I might miss out some important features on .NET. Overall, I like .NET, it is easy to learn.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." - Martin Fowler
Monday, November 19, 2007
Thursday, November 15, 2007
Java Class Cache Problem
I found this cache problem during my development. Example of how this problem can be happen:
If these two java files compiled into class files previously, then we might need to be careful when changing the "planId" constants value. The problem happen when we change the "planId" value to some other value & only compile the Constants.java file. In this case, Main.class file still refer to previous "planId" value which is "999".
So, the best solution is to remove all the classes & compile all java files again which we called it as Clean Build.
If these two java files compiled into class files previously, then we might need to be careful when changing the "planId" constants value. The problem happen when we change the "planId" value to some other value & only compile the Constants.java file. In this case, Main.class file still refer to previous "planId" value which is "999".
So, the best solution is to remove all the classes & compile all java files again which we called it as Clean Build.
Thursday, November 8, 2007
"div" Tag
I facing a lot of problems with "div" tag in IE browser, I just wondering is it IE not understand this tag or they don't want to understand this tag.
Just fix a small bug on IE browser which they don't understand "whitespace: pre" CSS under "div" tag, I use "pre" tag then the problem solve.
Just fix a small bug on IE browser which they don't understand "whitespace: pre" CSS under "div" tag, I use "pre" tag then the problem solve.
pngfix.js
Recently facing some problems on PNG transparent images in IE6 browser. The solution is include this javascript:
It seem like this javascript is quite common in used when I try make a Google search. This script change all the images object in a web page to span object and calling a Microsoft library to make PNG images transparent.
Only need to do this on IE5.5 & IE6.
It seem like this javascript is quite common in used when I try make a Google search. This script change all the images object in a web page to span object and calling a Microsoft library to make PNG images transparent.
Only need to do this on IE5.5 & IE6.
Thursday, October 18, 2007
Programming Trick
Here is some trick to let the code run faster, I face this long time ago, finally I am able to write it down.
For CodeA & CodeB:
The different will be very big when the String Array gone larger. If let say the size of the String Array is 100, CodeA will create 100 Integer object to store it's size, the program will end up like this CodeC.
Obviously, every loop set the String Array size is unnecessary. So, it is alway better to keep CodeB practice.
For CodeA & CodeB:
The different will be very big when the String Array gone larger. If let say the size of the String Array is 100, CodeA will create 100 Integer object to store it's size, the program will end up like this CodeC.
Obviously, every loop set the String Array size is unnecessary. So, it is alway better to keep CodeB practice.
Wednesday, October 17, 2007
"code" Support
Yo, I add in something that will be useful on my own posting since I am a programmer.
Here is the CSS I used to create this "code" tag:
I am still thinking how to implement this into RSS feed which is a XML, not support CSS. If you didn't understand what I mean, open this post in a browser, then you will see the different.
Here is the CSS I used to create this "code" tag:
I am still thinking how to implement this into RSS feed which is a XML, not support CSS. If you didn't understand what I mean, open this post in a browser, then you will see the different.
How to use Netbeans to generate Javadoc
I guess somebody already know this, but I think there are somebody who didn't know it as well, so, I just put it up here.
Next time when you having development in Netbeans, try to write comments using its Auto Comments feature.
So, after all the comments had been write, you just need to right click on the project and click on "Generate Javadoc", then this will come out.
Next time when you having development in Netbeans, try to write comments using its Auto Comments feature.
So, after all the comments had been write, you just need to right click on the project and click on "Generate Javadoc", then this will come out.
Subscribe to:
Posts (Atom)