Wednesday, September 27, 2006

DWR Incredibly Helpful for your daily Java web app

Just another AJAX "tool". Superb. i've been using this DWR n it's really helpful. Very easy to use. So much simplification comparing to pure AJAX life. for example we dont have to type the XmlHttp connections and any other i/o form. just need the dwr.jar, configure some xml and voila!! We can use for form validation that is need to connect to database and also any other needs to retrieve data from database.
Just as simple as primitive jsp scripting that integrated w/ servlets, only without refreshing the page. for example we just need to prepare:
1. java methods to called --> these methods will have to b "registered" within the xml configuration file, so that the dwr javascript would notice n recognize these methods. e.g.: we put a static method className.fooMethod() that returns a string.
2. jsp for interface --> just call the created methods within the javascript className.fooMethod() --> and boom it works. just so simple. u can get from getahead website and also from ibm website, just download the jar file.
"Just a Cup of Java"

Tuesday, September 19, 2006

My Most Unforgettable Trip

Just a month ago (15-22Aug'06) i went to Lombok to hike Rinjani Mt. w/ SWR frens (helen,meidy,mea,dessy) we r all from the same society that is SWANARAPALA, rinjani's highest peak is about 3,726 metres above the sea level it appears to b the 3rd highest mt. in indonesia. We named ourself "Challenger Gals" hahaha. Quite funny actually since there r only gals n no one of us has ever been there before hehe. We r so lucky from the first day we arrived in bali,


Base Camp - Sembalun Lawang

we got meidy's cousin to send us to bali harbour Padang Bai (far from airport), then we use ferry to cross to Lombok. suddenly there's a guide from some travel agency greet us in english, he thot we r sporean, he brought along some italian tourists, then we got sent to rinjani base camp (Sembalun Lawang) for Rp 260,000 (5 people) n it's very far (so it's fair enough). Just when we r about to step up, once again we r very lucky, we met several people that is from Unram, Sala3, Bali. there r 3 gals n 7 tough guys, they offer if we want to come w/ them. then finally we r on our way together.
They r : Anjas, Totok, Bengkok, Adhi, Isti, Nunik, Wati, Agus, Bowo, Kliwon. It's very fun n i really think they'r nice fren. And for myself, i also consider myself very lucky to have them around (helen, meidy, dessy, mea).

We started to go up around less than 3 PM. It took about 3 hours to reach Pos 2. And we stay there for a night. Here we met bunch of (quite silly) guys from Jakarta they r: Rheza, Capt., Hendri, Agus, Restu, Abah, Stefanus. They were using porters...so envy...hahaha. (FYI, u can use a porter if u want to for Rp 60,000/day - highly recommended for beginners). Then the next morning, we all continue our trip to Pelawangan. Before reach Pelawangan, we have to pass the somewhat called "Primary Summit"? Very beautiful place. There we had reached just above the clouds, but cannot stop there. after few pics, then we headed to Pelawangan camp, also very beautiful place (all part of rinjani r very beautiful though).

At around 2 AM we continue our trip to reach the highest summit. it's a tough trek n quite steep on the upper. 1st point : i wear a not very comfortable shoes a bit too big (that's also why my toe nail n another off from place where it's belong..hix... =( ..it hurts a lot), 2nd point : i cannot step steadily on the sandy trek. so i really really spent so much time just to walk there. Phew...while the other walking very fast. n i got myself down n think "at least i still can walk even very lil step" . And finally we all had reached Rinjani's highest peak at 3.726 m.

Hard to believe we were all there. After a few nice pics, then we head back to our camp, to prepare and continue to the next and our real desirable destination : Segara Anak Lake. Really can't wait to reach there.


Lake Segara Anak - Rinjani

I can see rinjani's lake view everyday on my desktop comp. n finally i was really there =P (after a looong - approximately 3 hrs walking). The lake is somehow unbelievably beautiful. So many bule around. Most people thot we r japanese hahaha Konnichiwa .... =P


Lake Segara Anak - Rinjani

Very beautiful place. Wish can go there again some other time. Sadly, our trip companion had to go and leave the five of us (Team Challenger Gals) and the team Manteppp Totok, Bengkok, Adhi. We spent 2 night in this area. Very peaceful actually if not too many people. Oh, n we also enjoyed the hot spring. Ooooh...

After a 2 peaceful night stay (excluding the noisy bad people), the next morning we headed to Senaru. We started walk around 10 something. We have to go up to reach Pelawangan Senaru. And there really really beautiful (so many 'beautiful' words haha - but all for real). We can see the lake view in different angle. And as usual, take pics .... =) Senaru trek very similar to Putri Mt. trek. And we reached the Senaru Village around 6 PM, then get a place to stay (some motel).

The next noon we head to Lombok Mataram University. Mas Totok, Bengkok and Adhi took us to Wapala FH then meet other frens there. They r all really really nice people and they r all very welcome. And it's also very comfortable place in their base camp. We also got a chance to meet other frens from Mapala FKIP, there they cooked "ikan khas Sumbawa" for us and served other tasty snacks. Wooah very delicious. Dessy ate a lot. We r all very happy. On the evening some of those nice people took us to Senggigi Beach and have a tasty grilled corn in Batu Layar (Also w/ Anjas, Evi, n other guys from Wapala Unram). And we spent the night resting in Evi's house.

Finally we were all going back departed from Mataram Airport at around 2PM. Very hard to leave the place. I know we all going to miss this all. It's a very wonderful trip, a lot of nice people. hopefully can always keep in contact. I'm so happy was able to experienced such things =) ... This is the most beautiful mt. i've ever climb.
"Some moments r meant not to be forgotten for the rest of life" n this is one of those great moments.
Cheers ... =)


Sunrise View From Trek to Summit

Lake Segara Anak View from Summit

Sunset - Pelawangan Sembalun

Monday, January 09, 2006

About AJAX (2)

AJAX is based on open standards such as DHTML, CSS, JavaScript, DOM and XML. By choosing AJAX, you avoid the pitfalls of building on top of proprietary technologies. runs within standard web browsers. No additional downloads are required. As a user accesses an AJAX application, the required code is dynamically downloaded and cached as standard web content. can work also with ASP.net but as far as i know Java is the best.

By using DOM, AJAX app can construct the whole page (playing with CSS). You will need a correct tree structured DHTML. and servlets taking part on business logic,data connection n generating XML dynamically.


to configure n customizing XML properties, u will need a compiled java classes to support your personalized business logics. there's also some company specializing in providing tools and services for enterprise applications one of them is JackBe...i think their design is interesting.

Want to learn more about AJAX? i suggest to try "Foundation of AJAX" or "AJAX in Action" also can do.

some sample code from AJAX in action :

(some Javascript getDescription function)

var url = 'http://localhost/getDescription.jsp?itemId=' + itemId;
if (window.XMLHttpRequest) {
   req = new
   XMLHttpRequest();
} else if (window.ActiveXObject) {
   req = new
   ActiveXObject("Microsoft.XMLHTTP");
}
req.onreadystatechange = processRequest;
req.open("GET", url, true);
req.send(null);


function processRequest() {
   if (req.readyState == 4) {
      if (req.status == 200) {
         parseMessages();
      } else {
         alert ( "Not able to retrieve description" );
      }
   }
}



parseMessage function :

function parseMessages() {
response = req.responseXML.documentElement;
itemDescription = response.getElementsByTagName('description')[0].firstChild.data;
alert(itemDescription);
}


the scipt using XMLHttpRequest class as a bridge to read an XML document where we put the resultsets n other configurations. (this is the old brand new XMLHTTP)


"Java for Rhapsody"

Monday, December 26, 2005

WAP Servlet

Building WAP for mobile browser application using JSP and servlet
WAP programming model is based heavily on the Web programming modelWAP connection Illustration : 1 or many client (handhelds) communicates with the WAP gateway in the wireless network. The WAP gateway translates WAP requests to WWW requests, so the WAP client is able to submit requests to the Web server. Also, the WAP gateway translates Web responses into WAP responses or a format understood by the WAP client.
The Wireless Markup Language (WML) is an XML-based markup language that was designed to describe how WAP content is presented. WML concept works similar as HTML, but more likely XML.
in WML, each tag presents one page content.


Supported Images on WML is .wbmp type, Some wml editor provide to convert/edit images of the type.
When it comes to servlet we will need : response.setContentType("text/vnd.wap.wml");to set the MIME type to a WAP/WML document (if we want to generate a WML page using pure servlet).


WMLScript===> WMLScript, which is based on ECMAScript (the standard for JavaScript), is a language that you can use to provide programmed functionality to WAP applications. It is part of the WAP specification, and it can be used to add script support to the client. The main difference between WMLScript and ECMAScript is that WMLScript is compiled into byte code before it is sent to the client.You can use WMLScript to check the validity of user input, but most important, you can use it to generate messages and dialogs locally, so error messages and confirmations can be viewed faster.


WAP emulators and development tools In order to access WAP services, you need a WAP-enabled phone. There's a joke in the American wireless market is that WAP stands for Where Are the Phones.i'm using Nokia 7110 simulator (Wireless Companion) freely downloadable from yourwap.com


"Java for Rhapsody"

Saturday, December 17, 2005

Web Hosting

TOP 10 JSP WEB HOSTING (based on price under $8.00 -- not including free hosting)
  • Web Hosting - Network Solution ==> (4 Star customer service rating from PC Magazine)
  • Host Gator
  • Lunarpages
  • iPowerWeb
  • Micfo Hosting ==> cheapest (with 40 GB bandwidth)
  • iWeb Hosting ==> unlimited bandwidth
  • Apollo Hosting
  • Webserve
  • MidPhase ==> unlimited bandwidth
  • EasyCGI

  • ...Reviews coming soon

    FREE WEB HOSTING for JSP servlet...
    I've been looking for free web hosting for JSP servlet things. It's very hard to find though. Mostly offers PHP, html / htm only. And this i want to share with all : they are the best of the best
    Highly recommended for educative purpose
    **
    http://s43.eatj.com
    **
    http://www.myjavaserver.com ==> i'm using this one

    ...Anything new??? Please post a comment to share =)

    Wednesday, December 14, 2005

    About AJAX

    few days ago, i had my fren charly slightly pronounce "AJAX" when we were discussing web things. And to satisfy my curiousity, i started looking for this tech. And found out this amazing potential architecture. AJAX is on of several approaches to developing "Rich Internet Applications" (RIA) - desktop-like applications delivered using thin client technology.

    And it simply declared that this is not a tech, but an architecture, a framework. Combining javascript n XML config, it definitely takes the advantages of both side. Real fast loading. Google Suggest and Google Maps using this architecture. At first glance i thought that Google is using flash app to support the map view, but it's clearly not flash bcoz it wud be spend a veeeeerryyy long time to load...n i think AJAX is very powerful. (is that it allows Rich Internet Applications to run in a standard web browser).


    (to be continue)



    My Favorite Fun Qoutes

    Linux Qoutes :
    "Linux is like a Wig-Wam: No Gates, No Windows, Apache inside".

    "In a world without fences, who need Gates".

    "There are only 1 0 types of people in the world: those who can understand binary, and those who can't".

    Tuesday, December 13, 2005

    Java Out Of Memory Error

    I encountered "java.lang.OutOfMemoryError : PermGen Space" error. Most of the time occured when i just finished uploading java classes. All of the perfect solution i know is to set permSize bigger on tomcat catalina home, but sure i can't control the provider's tomcat server memory. Actually i could ask the provider to allot the permSize, but i still curious to find another solution, coz all my projects is on another host provider (n probably i could try someway without have to ask for more space).

    And still can't find anything else so far.
    But it's a fact that we will need bigger memory especially when using hibernate or struts. So i asked the technician to allocate 256MB permSize (juz in case it happen again).
    Does anyone know how to solve this problem??Any suggestions are welcome =)