August 2006 - Posts
This is a good news for those who have no experience developing with Oracle like myself. I haven't read the terms of use yet but who cares? It's free!
http://www.oracle.com/technology/products/database/xe/index.html
I was lurking in javaranch when I bumped into this interesting thread.
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=7&t=017627
I didn't know you could actually break down your web.xml into smaller pieces. It's annoying when
everything gets bloated up with code...
<?xml versionfiltered="1.0" standalone="no"?>
<!DOCTYPE webapp [
<!ENTITY servlets SYSTEM "servlets.xml">
]>
<webapp>
&servlets;
</webapp>
where servlets.xml has
<servlet>
<servlet-name>blah</servlet-name>
<display-name>blah</display-name>
<servlet-class>blah.blahclass/servlet-class>
</servlet>
An alternative would probably be the Front Controller Pattern which is actually also mentioned in the thread. Read about it, I use it in my app to make everything easy to maintain.
Before I started reading about hibernate, I had a hard time which technology to learn first. ORM or Webservices? As they are both essential technologies, I am left with such confusion. I already read some introductory articles about webservices, mainly Apache SOAP/Axis. But there's just nothing to do with it now so I read about ORM too! But which ORM tool to use? I've already heard of two co-I.T. professionals who use Ibatis, another ORM tool. I was confused until I read about ORM in wikipedia and discovered that hibernate is indeed the widely-accepted, most matured, opensource ORM tool out there. As a starting point, I googled and found this article to be helpful...
http://www.gloegl.de/5.html
I was fiddling witht the new Eclipse IDE 3.2 (nothing to do with
this post). I was experimenting, creating my own version of the
singleton ConnectionManager class that I got from my senior during my
training with my previous company. I had a lot of doubts about
inheritance in my mind, especially about member variables. Since member
variables are logically not overidden(there'sno point of doing so
according to experts), I wondered what would happen if I declared a
member in an abstract class, and declare it again in base class. So I
tried something like this:
class A
{
protected int p;
public int getP()
{
return p;
}
}
class B extends A
{
protected int p;
public int getP()
{
return p;
}
}
Now this is absolutely legal,
it will compile and will not make any runtime exception(I think). But I
was told that this is a bad practice and could lead to hard-to-find
bugs. If somebody needs an explanation, when an instance of class B is
created and the getP() method is invoked the p that is returned is that
of B's. Unless of course you call super.getP(). Plain ol polymorphism.
The point in this post is that this is a bad practice and should be
avoided at all cost.
Just as I was modifying our database, I thought again of support for localizing our app. I was given advise by someone here in the devpinoy.org community, to support localization in your app your app must be planned with it from the ground up. Since we don't have that much data yet, it won't hurt to change things in the database. I'm gonna be changing the fields that needs localization support to UTF-16 as suggested in this article in the mysql website.
http://mysql.com/doc/refman/5.0/en/mysql-config-wizard-character-set.html
After about 4 months of development, I was finally able to deploy our app. I had a lot of trouble dealing with Virtual hosting for Apache and Tomcat and had to fix a lot of JSP/Servlet/Struts related stuff... Finally, my apache server and tomcat server are now best friends. Me and my boss plans on developing a simple site and put this incomplete app as our first entry on our company portfolio. There are still a lot of tightening up to do like adding more features and tightening up security.
Check it out: http://www.gm-recruitment.com
I don't know if this is the thing I've been looking for... But this looks promising to me. My company wants to host multiple applications on a single server. However, our hosting provider won't give us any support for Tomcat. What we need actually is like this
www.mysite1.com points to xxx.xxx.xxx.xxx:8080/application1
With the lack of experience to do this, I'm really starting to get frustrated. While browsing the forums at Javaranch, I encountered the term virtual hosting with Tomcat. Hmmmm... Rings a bell! So I googled and bumped into these two interesting sites:
http://tomcat.apache.org/connectors-doc-archive/jk2/jk2/vhosthowto.html
http://www.ex-parrot.com/~pete/tomcat-vhost.html
I haven't tried these yet. But I hope this works for me.