Professional Documents
Culture Documents
Javadoc
Javadoc is a documentation generator for generating API documentation in HTML format from Java source code. Javadoc is the industry standard for documenting Java classes. For Javadoc to work effectively, a specially formatted comment is placed before any class, method or property.
Eclipse IDE
Modules for all apects of Java web app development, including Tomcat module Support for CVS, SVN repositories Smart editor: just hit CTRL-SPACE to see available methods etc Powerful refactoring tools: misspelled a class name? You are no longer stuck with your embarrassing mistake for life. Just open the refactor tool and rename the class, property, method - whatever. The system will rename all references including references in other projects. Documenation will be updated also. Not limited to Java: modules for C, C++, Python, PHP etc
Hibernate Search
Hibernate Search brings the power of full text search to Hibernate. Full text search engines like Apache Lucene allow applications to execute free-text search queries. However, it becomes increasingly more difficult to index a more complex object domain model - keeping the index up to date, dealing with the mismatch between the index structure and the domain model, querying mismatches, and so on.
select cust from Product prod, Store store inner join store.customers cust where prod.name = 'widget' and store.location.name in ( 'Melbourne', 'Sydney' ) and prod = all elements(cust.currentOrder.lineItems)
... and in SQL this looks something like ...
Hibernate Cache
Hibernate supports several caching systems including: EHCache, OSCache, SwarmCache, JBoss Tree Cache. Objects and query results can be cached.
Hibernate Search Prior to Hibernate Search, you would need to add code to your business logic to update Lucene index whenever an object was modified. In response to a search Lucene would return record IDs which then need to be fetched separately. But no more...
Decide what fields you want indexed using Java annotations Perform free text queries using Lucene engine and get Java objects in response Index is automatically updated whenever an domain object is modified or deleted Index structure automatically generated from the domain model
Velocity
Template + Context -> render -> output Context is just a bundle of name -> object pairs.
#parse ("_invoice_lineitem_table.vm")
</body>
Instead I use JSP as a glue that links HTTP GET/POSTs from the use with the core classes and Velocity templates.
Nice things about JSP: Can apply hot fixes to application without need to restart. Most post-commissioning bug fixes involve modifications to JSP and not core classes
ImageTable - challenges
ImageTable uses Hibernate for image metadata, but goes direct to the JDBC layer to transfer image binary. It was found that both JDBC and Hibernate were not optimized for large binary objects (multiple copies were made in memory). Partial solution was to go direct to JDBC. The quality of ImageMagick scaling operations was found to be far superior to those generated from the Java Imaging API. JMagick provides a Java interface to ImageMagick, but it was found that a forking a process with a regular 'convert' command was just as fast and simpler to implement. May pose some portability issues.
YUI Modules
Grids: A CSS library which facilitates many common layouts. Connection Manager: send asynchronous (AJAX) requests Event utilities: attach events to DOM objects Calendars, Tabs, Menus, Trees, Color picker Rich text editor Charts (uses Flash for rendering) Animation (animate any property, including colors for fade effects etc) Drag & Drop File uploader (uses Flash) Debug logger Javascript compressor and much more...
Google GWT
Google GWT is an alternative approach to developing client side application. Whereas YUI facilitates writing client applications in Javascript, with GWT you write in Java. The Java is then compiled into Javascript. In effect Javascript becomes the "machine code" of the web browser. This has some huge advantages: You can develop in a "real" language and benefit from tools such as Eclipse IDE etc Product optimized Javascript: including only the bits that you need
Monitoring (1/2)
Monitoring (2/2)
Testing
JUnit - unit testing Monitoring app Selenium Manual testing
Conclusions
The good bits: Productive development environment Predictable deployment environment: Quirks of OS are abstracted away. Automatic documenation with Javadoc Scalable Secure I18N Good skill availability Good tool and support availability Possible pitfalls: Use the right tools for the job. Most apps don't need high powered frameworks such as EJB. Java needs memory space. Don't skimp on memory for production setups: bigger resource footprint than, say PHP.
Require (insert minimal hw spec: eg 3GHz CPU, 3GB RAM, 30GB HDD etc)
Installations
Galway.Net City Guide CMS: Galway.Net Xposed.ie IrelandAdventures.com
Other apps: Moore Institute Landed Estates Database http://www.landedestates.ie/ (name deleted) camera manufacturer: push software updates to camera software (FN Inc) Galway.Net billing system
YUI: http://developer.yahoo.com/yui/
GWT: http://code.google.com/webtoolkit/
JMeter: http://jakarta.apache.org/jmeter/
Firebug: http://getfirebug.com/