Hey all,

I've been pretty quiet the last couple months because I've been very, very 
focused on a high-priority project here at the factory. We recently decided to 
use T5 for the project (a pretty major move which I expect to extend to the 
rest of engineering) and I thought I'd share some of what I'm doing and how 
it's gone so far.

The project is a internal application that will handle ~200 users at a time 
during peak usage and will manage 12,000+ projects per year. It's integrating 
with up to 5 external systems. I wish I could give you more detailed info 
because it's got some sweet features but, alas, I cannot.

Notes on project infrastructure:
 * Uses Hibernate extensively
 * Uses Lucene for searching
 * We have an internal t5-based library (or 3 actually) that aids in building 
CMS and other administrative applications. One library provides super-slick 
Lucene integration for Hibernate entities. Some of this (like the @Cached 
annotation) has already been donated to t5. I'm very open to donating more in 
the future if I feel like it fits into T5 and isn't too specific to our company.
 * Testing environment is all embedded, staging is on tomcat with oracle. 
Deployment is on weblogic with oracle in a big cluster.

Some notes on the development environment:
 * Testng is used for testing. Selenium is used for web tests.

 * Jetty is used for the web server. On start-up (at registry creation), an 
embedded HSQLDB instance is started and the tables are created based on the 
Hibernate entities automatically. Takes 2-3 seconds.

 * All web tests are written against the Selenium interface. However, I've 
built some tools around this (in addition to the normal helper methods):

   * A wrapper that watches for Tapestry exception pages. If one is found it 
parses the exception type, message, and stack trace and rethrows it in the test 
(as a nested exception) so that you get 1) where and how your test failed and 
2) what the exception was in the application. 99% of the time it eliminates the 
need to re-run the test or manually click through the pages to find out what 
the problem really is.

   * An unbelievably slick adapter that allows running any or all web tests in 
HtmlUnit instead of Selenium without ever touching the HtmlUnit API or even 
knowing it's there. Most of the features are supported (except for things like 
taking a screenshot) and the transition is seamless. The HtmlUnit tests start 
up and run *much* faster than Selenium which helps a ton if you are doing TDD 
(which we do).

   * I'm considering writing a similar Selenium adapter over PageTester to make 
writing page/component unit tests easier (and take advantage of things like our 
helper methods).

 * For component/page unit testing, we have a base class that creates a 
PageTester and starts an embedded HSQLDB instance as with the full Jetty 
integration tests. Also, any service from the t5 IoC registry can be injected 
into your test case class using the @Inject annotation (even on private fields).

Some things I've found difficult (off the top of my head):
 * Knowing the format for a contribution and the service I need to contribute 
to. Is it an ordered config or non-ordered? What type does the configuration 
take? etc. I normally find what I need by searching through TapestryModule for 
similar contributions.
 * Having an event handler not get called and not knowing why. Specifically not 
being able to use onValidateFromFieldname() with beaneditform is a bummer. I've 
had to fall back to using onValidateForm() instead.

After eating my own dog food the last couples weeks the experience has been 
pretty positive, especially considering the framework is still in beta. Overall 
it's a vast improvement over T4 in terms of development speed and the potential 
for efficiencies is huge. It's also just a lot of fun. Development on this 
project is just starting so I'm sure I'll have more comments at the end of it.

Dan Adams
Senior Software Engineer
Interactive Factory
p: 617.235.5857


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to