Thursday, July 27, 2006

Book Review : AJAX in Action

I have today completed the 1st of the 4 parts of this book and i must say that i loved reading it due to my growing interest in the AJAX methodology and the web application development, in general.

Part 1 of the book talks about what and why about AJAX, introduces the framework and toolset and the core technologies you need to know about when working on AJAX. This part is divided into 3 chapters (introducing AJAX, simple example with code and importance of refactoring the AJAX Javascript code).

Part 2 (this is where i am now in my reading) talks about the techniques to employ for coding the client and the server. Comprised of 2 chapters.

Part 3 (which i am yet to read) discusses about enhancing user experince (usability stuff that you should consider while developing AJAX application), security and performance of AJAX application. Comprised of 3 chapters.

Part 4 provides example applications using AJAX methodology like Dynamic double combo, type-ahead suggest, web portal with autosave functionality, live search using XSLT, and building a standalone RSS Feed Reader. Comprised of 5 chapters.

The reason i like this book alot is because i did not know much CSS, HTML DOM or Javascript before and there this book introduces those subject areas in a way that is relevant to the development of AJAX based application. And thats what a J2EE developer like me will require. We dont necessarily need to learn Javascript to develop libraries like Scriptaculous (i mean not like a web front end designer would want to know). All we need to know about CSS, Javascript and HTML DOM is to be able to work comfortably with those while making an AJAX application. The book has pretty good introduction to these topics and hence i have benefitted alot. The Appendix B named Javascript for object-oriented programmers is more than what i think i will need to know about the language. CSS and HTML DOM are introduced in chapter 2 and used throughout the book in the several examples thus giving one alot of room to practice. The coverage of examples using the most common scenarios where one would want to use AJAX methodology is also very nice. It also talks and demonstrates with examples, the use of different frameworks (like Rico, prototype, scriptaculous, etc) and also tell enough about the frameworks based on which you can decide which one will best suit your needs on a certain project. In short, you become educated enough to make a good decision on what framework to use for your project which can help you cut down the timeline for the project. If you are new to AJAX then do check out the book's website for a screencast by the authors on what is ajax. I just checked out on a few frameworks mentioned in the book and following are the ones which interested me most:

  • Rico: built over prototype library provides a AjaxEngine Javascript object which you can use to simplify the AJAX request/response and also provides some widgets like accordian for one.
  • DWR: Direct web remoting is an application framework which allows Java objects to expose their methods directly for AJAX requests to clients.
  • Echo2: is also an application framework which like DWR does not require you to know HTML, CSS and Javascript enabling the user interface to be created in pure Java. It provides a visual designer as an eclipse plugin using which you can layout your web forms easily and the corresponding code will be generated in Java. The SDK is open source but the eclipse plugin is not (a free trial for 30 days is available). Will write more as i read and learn more from this excellent book.

Sunday, July 16, 2006

My Studies so far...

I have read the following books in order so far since Nov 2005 when i made a move from embedded systems programming to the J2EE world:

  • Head first servlets and JSP by Kathy Sierra & Bert Bates
  • Mastering EJB 3rd Edn. by Ed Roman et al
  • SCJP 5.0 Study Guide by Kathy Sierra & Bert Bates
  • JBoss at Work: A Practical Guide by Tom Marrs & Scott Davis
  • Struts: The complete reference by James Holmes (only first 10 chapts).
  • Oracle University: Introduction to SQL
  • J2EE Webservices by Richard Monson-Haefel
  • Designing Webservices with J2EE 1.4 by Inderjeet Singh et al
  • Head First EJB by Kathy Sierra & Bert Bates
  • SNMP, SNMPv2, SNMPv3 and RMON 1 and 2, 3rd Edition, by William Stallings.

My plans are to complete the following books by November 2006:

  • Head first design patterns (for sure - started 25 Oct)
  • J2EE Design and Development by Rob Jhonson (May be)
  • Network Management: Principles and Practice by Subramanian (read 2 chapts.)
  • Oracle University: Program with PL/SQL (Oracle 9i)

Together with the above mentioned readings i have some certifications taken and planned for:

  • SCJP 5.0 CX-310-055 : Passed with 90% on May 15 2006
  • SCDJWS 1.4 CX-310-220 : Passed with 88% on Aug 10 2006
  • SCBCD 1.3 CX-310-090 : Passed with 85% on Sept 30 2006
  • SCWCD 1.4 CX-310-081 : Passed with 82% on Sept 18 2006

And some trainings:

  • Oracle Workforce development program:Introduction to SQL: Completed in May 2006
  • Oracle Workforce development program: Program with PL/SQL: Completed in Aug 2006.

Thats all about it till Nov 2006.

Tuesday, July 04, 2006

Preparing for SCDJWS

SCDJWS 1.4 is Sun Certified Developer for Java Web Services certification exam. I started preparing for this exam after taking the SCJP 5.0 exam earlier in May 2006. This exam covers alot of specifications (XML 1.0, XML Schema 1.0, WS-I BP 1.0a, J2EE 1.4 for WS 1.1, WSDL 1.1, SOAP 1.1, UDDI 2.0, JAX-RPC 1.1 to name a few). You can see the complete list at Valentin Crettaz's site. There isnt any certification guide available as of this writing for this exam so i followed the advices of people who have already taken this certification exam at JavaRanch SCDJWS Forum and following is my approach to prepare for the exam.

Again, as has become a standard practice for me, i started with a word document where i copy pasted the exam objectives and wrote down the reference material (name of the book and chapters) for each topic on the exam. In summary, following are the resources i am referring:
  • J2EE WebServices by Richard Monson-Haefel (RMH): all chapters + appendices E, F & G. I did not read the F and G from here but referred to MZ's notes for SwA with SAAJ.
  • Sun's Blueprint book - Designing Webservices using J2EE 1.4: whole book
  • Mikalai Zaikin's (MZ) WSD Notes and Quiz You will need to buy the quiz (~95+ questions) from Mikalai. I referred to the Security (chapter 8) and a section on SwA with SAAJ (a section in chapter 2) from MZ's notes. I went through all quiz questions once, a night before the exam.
  • XYZWS.COM - provides a free mock exam (in all 200 questions collection).
  • XSLT and TrAX from Elliot Rusty Harold's (ERH) excellent book Processing XML with Java.
  • Java Webservices Tutorial (WST) for tutorial on JAXB (chapters 1 & 2)

14th Jul 2006 - I am through with all chapters from the RMH book and am mid-way through the Blueprint book. I have to go back to RMH to cover appendices E, F & G which cover SwA, SAAJ with Attachments and JAX-RPC & SwA. I also have to cover the ERH book's XSLT/TrAX, MZ's notes + WS-Security and WST for JAXB/Security. This might take me another week. I plan to complete the syllabus by 21st Jul 2006. After this i will need another week's time to revise my notes and practice more on the code.

I have created some sample programs from RMH's book (on topics like XSD, XML namespaces, JAX-RPC JSE/EJB Endpoints and clients Generated stubs/Dynamic Proxies/DII, JAXR, JAXP DOM/SAX).

I practiced the JAXB samples (first 5 only) as discussed in the WST. The exam does not require one to know

customizing the JAXB bindings so i did not cover those topics. For security, i did not do any programming but just read the concepts from MZ's notes.

---
10th Aug, 2006 - I passed the exam (CX-310-220) with 88%. If you need my study notes (305 pages covering whole syllabus completely) the download it here. You can read my final tips to the ranchers on how to prepare at javaranch.com.

---
15th Mar, 2007 - I noticed that a few people (infact just 2, one wrote to me a thank you email and another mentioned of referring to my notes at Javaranch forum ) have used my SCDJWS 1.4 notes while preparing for the certification exam. If i could have posted my notes on a personal web site like MZ then probably more people will have been able to use it. Presently the single 305 pages pdf file might seem daunting to many. So setting up a web site is on my list of to-dos.

Tuesday, May 30, 2006

Learning Java Enterprise Edition (Java EE)

I started my learning of J2EE 1.4 late November 2005 with the book Head First Servlets and JSP by Kathy Sierra et al. It was a good book and i could understand what a MVC pattern means to the web application development. I took about 2 months to complete this book (in parallel i started developing a small application from my team in my place of work). I used the learnings from this book and by beginning April i could also read up Mastering EJB 3rd Edition by Ed Roman et al. It was excellent but a tome and i needed to revise the concepts from the beginning chapters by the time i could reach the end of the book. So i was not able to understand the sample application initially and did not give much effort to understanding in the first go as i thought i needed to make study notes to burn in the matter in the initial chapters. But reading the whole book in a go gave me some confidence in my approach to learning Java EE based development.

Then i thought of taking the Sun certifications and found that SCJP was a prerequisite so i bought the book SCJP 5.0 study guide by Kathy Sierra and Bert Bates and prepared for the exam. I scored 90% in the exam which i took mid of May. I then resumed with Mastering EJB book and started making my notes. By the end of this learning i strongly felt the need of some good book which explained how a real-world J2EE application is being developed. I had this notion after having read about Hibernate ORM being a preferred choice on the persistence tier and books like J2EE desing and development without EJB by Rod Jhonson which cautioned the developers against unwanted use of EJB in enterprise application development. Fortunately i found the mention of JBoss at work: A practical guide by Tom Marrs and Scott Davis book on jboss.org site. I could also get an Indian edition for that book which was released in October 2005 thus was reassuring enough that what it talked about must be latest practices in the developer community with regard to J2EE based enterprise development. I started reading the book and could cover most of it in 2 days. Yes it was easy cruise considering my sound foundations of Java SE edition and the knowledge i gained from Mastering EJB and HF Servlets & JSP books. Also this book gave me the knowledge of how the XDoclet and Hibernate can be used. This is where i am now in my learning cycle as of this writing.

As for my plans for the coming months, i want to complete my notes from HF Servlets & JSP book (for the sake of completeness and also to accumulate APIs i did not use in my small project work before i move on), then i want to start with the Struts: The complete reference book and finish that in 8 days gathering as much as possible in that time. Then the plan is to read J2EE Webservice book by Richard Monson Haefel. This is all for the month of June. After that in July i plan to read 3 books in order - Head First Design pattern (8 days), Core J2EE Patterns(10 days) and Mastering BEA Weblogic Server 8.1 (12 days). In the following month of August, i want to take SCDJWS certification exam and cover a book - Ajax in action which i bought long back but have not had the time to cover so far. The idea is to understand J2EE development on all tiers (web/presentation, business, persistence). In the month of september, i have not planned for yet, but what seems most logical to me now is that i will want to cover Mastering JSF and Hibernate in Action.

In october this year, i plan to start some open source project work, probably related to my field of expertise (network management systems and SNMP). I have contributed in the past on one open source project http://www.mibble.org in the UI development for SNMP MIB Browser using the mibble parser and westhawk snmp library in Java. I am still not sure what work i will be doing in october but it has to use my learnings on J2EE in some way. The idea is to gain enough expertise on the J2EE development and also to be in touch with the SNMP/NMS domain before i start my job search again.

Tuesday, May 02, 2006

Preparing for SCJP 5.0 Exam

While preparing for SCJP 5.0 exam, i did the following:

  1. Bought a certification guide (SCJP 5.0 Study Guide by Kathy Sierra & Bert Bates)
  2. Read the book from cover to cover
  3. The guide came with a ebook in pdf format on a CD with the book. I used the pdf document for copy pasting the contents i wanted to revise later into a word document notes i prepared.
  4. I first copied the 2 minute drills part (which was like a quick summary of essential parts of the chapter). Then i went to the relevant parts where i needed some examples copied from into my notes.
  5. I also copied the exercise examples to the respective sections of my notes. This really helps to see the kind of question on a topic you can get near to the notes on that topic.

I did the above for all chapters and captured my notes in one word document which i took a print out of and then revised and kept adding any special question which i could not answer from one of the several mock exams found on the internet.

As an end result, following the above process for any certification exam, will help one prepare not only a exam cram but a worthy quick reference for work and refreshing your knowledge on the subject for a job interview.

-------------

Well i passed the exam on 15th May, 06 with 90% score (65/72 questions answered correctly). And here's my final words on how i prepared for this exam: Thread on JavaRanch Discussion Form where i declared my pass result

Tuesday, April 25, 2006

My tryst with AJAX

It all started with a question bank application that i was asked to build for our staffing team's use. Once an interface to add/remove/update questions to a database was created i was asked to build a web form to allow the interviewers to manage the questions they asked in an interview session together with the ratings assigned per question per candidate. Also the interface to be quick enough for the interviewer to find the right question to ask and update on the web form while conducting the telephonic interviews. AJAX seemed to answer some of the questions like not having to reload the pages thus giving a desktop application like usability to the interviewers. And i gathered that it also a hot term in the industry today. So i thought i will make use of the simple web form work as my learning platform for AJAX. I had bought the book AJAX in action sometime back but never got time enough to start reading it. About 600 pages of it can be completed in no less that 10 days. I thought its worth to invest those 10 precisious days into the learning of this interesting concept. Will post back once i have made some head way into the book.

Popular micro services patterns

Here are some popular Microservice design patterns that a programmer should know: Service Registry  pattern provides a  central location  fo...