JUG HEAD
The second DNR Java Users Group was excellent. One Java programmer handed over his code to get picked apart by the experts and we all learned from it. Tim Loesch wrote a small application in JSP that had most of the java logic inside the JSP pages. Mica showed him how to implement the Model View Controller (MVC) way of doing things that separates out the database logic (SQL) from the view (HTML) and ties it all together with an applet called the Controller. The benefits are many. For one thing, the HTML looks clean and java only shows up as custom tags. Another is that all the database connections scripts are contained in one connection bean that is stored as an object in the session. Mica used an Interface to store a list of constants. Is this what interfaces are for? I looked it up and it is most definitely not what it was intended for... Oh well. They are really to implement protocols so unrelated objects can interact just like the remote is an interface between you and the television. It translates finger movements into signals that the T.V. understands. Reasons to use interfaces: Capturing similarities among unrelated classes without artificially forcing a class relationship. Declaring methods that one or more classes are expected to implement. Revealing an object's programming interface without revealing its class.
The DNR uses MySQL for as many database apps as possible. This allows us to get a smaller Oracle License. Our Oracle license depends on CPU cycles and we need to watch every cent.
In JSP don't bother using Try-Catch. The JSP server has this built in. Catch errors by redirecting to something like error.jsp
Mica used a custom tag to do something that I want to try in PHP. It is very unsophisticated of me, but I have been generating option lists with tiresome loops through recordsets. I should be letting a PHP object take care of that for me. Just send a result set to one PHP function that builds an option list out of my own custom template. In any case, JSP and its custom tag libraries makes this available and very slick.
Tim also bore witness to the wisdom of using the stringBuffer object instead of concatenating strings to output HTML or text.
We all agreed to use connection pooling as a standard way of doing things.
The DNR java elite recommended Visual Slick Edit It supports C, C++, PHP, Java, VB, PERL, ETC.
3:00:28 PM
|