Friday, September 09, 2005

Rapid Prototyping and Development--Options

In this post, I continue my analysis of rapid prototyping for Java Web apps. I see a few essential ingredients necessary for rapid prototyping:

  1. Fast and simple development of pages and page flow: must be able to easily create pages, get parameters from a submission, do business stuff, go to the next page, and present dynamic data--without manually touching 12 different files.
  2. Automation of basic CRUD activities: Even in complex apps, so much code fits a basic CRUD template. It is extremely helpful to be able to automate the first cut at this, by specifying model information once in the database, the code, or a neutral spec.
  3. Quick develop/run cycles: If it takes 45 seconds to see a change to the width of a text field, rapid prototyping is in trouble.
  4. Extensibility: Whatever cool automatic stuff is done for us, we need to be able deviate from the happy path and customize stuff.
  5. Anything else I am missing?

Are there Java technologies that allow developers to skip the enterprise stuff initially, and add it in later with a little refactoring?

  • JSPs with code in the pages (or Velocity templates w/out the MVC, etc.): Good for 1 & 3, but ignores 2.
  • IDE / Graphical tools: E.g. Java Studio Creator (is there a comparable Eclipse plugin?).
  • Rife framework:
  • Trails framework:
  • Model Driven tools: I looked at AndroMDA a while back, and I don't remember it striking me as a tool for rapid prototyping. But it is probably worth another look. Since I started this post, I have come across Gorilla Logic, which looks very intriguing.

Are non-Java tools, e.g. Ruby/RAILs, that allow for development that is so inexpensive that we are willing to throw the prototype away?

  • RAILS claims a 10x productivity advantage over J2EE, and judging by their demo it is at least that. So even if Ruby CGI is insufficient for Enterprise requirements, you can create a throw-away that is worth the effort.

To Be Continued...

Rapid Prototyping and Development--Questions

I've been thinking again about rapid prototyping and RAD tools for Web development. Perhaps it is because I have been working with Enterprise apps for a few years, with their focus on hard-core non-functional requirements (security, scalability), but I don't see much going on anymore. It seems to me that J2EE, and the various Java frameworks, are so focused on robustness and maintainability that rapid prototyping is nearly impossible.

In the wild and whacky early days of Web development, it seemed that we got the functional requirements right, but then endured hell when our applications didn't perform or missed the mark on non-functional requirements. Why? Because we did very minimal requirements and immediately dived into scripting pages, essentially rapid prototyping. Now, as I see it, the Web world has inverted this situation: we have to do more requirements because it is more expensive to get working code in front of the user, but the technologies are more robust. I contend that, in general, it has become more difficult to get the functionality right, and that we now have applications that are often over-engineered.

I'd like to figure out how to re-introduce rapid prototyping into the realm of Java Web development. Here is what I think I need to figure out:
  • I see a few essential ingredients necessary for rapid prototyping: Fast and simple development of presentation code, automation of basic CRUD activities, and quick develop/run cycles. What else?
  • Are there Java technologies that allow developers to skip the enterprise stuff initially, and add it in later with a little refactoring?
  • Are non-Java tools, e.g. Ruby/RAILs, that allow for development that is so inexpensive that we are willing to throw it away?

Monday, August 15, 2005

Java Exception Prescription

What are truly the best practices for using Exceptions in Java? Should checked exceptions be the norm? How should the Exception classes be structured? In this posting I attempt to achieve a personal approach to using Exceptions.

In Handling Exceptions from the Sun Java Tutorial, stresses the use of checked exceptions:

If a client can reasonably be expected to recover from an exception, make it a
checked exception. If a client cannot do anything to recover from the exception,
make it an unchecked exception

Sun's view is probably the excepted wisdom. But some leading Java guys are rethinking this, like Alan Griffiths, Bruce Eckle, and Rod Johnson.

Code written using checked exceptions tends to exhibit a couple of problems: catch clauses are often stubbed out for expediency, leading to "swallowed" exceptions. Also, all calling code ends up bloating with handling for errors that the caller may not want/need to handle.

Why not let callers catch what they want, otherwise let the error propogate up the chain? Rod defines the following rule of thumb from when to use a checked exception:

Should all callers handle this problem? Is the exception essentially a second return value for the method?

For Example,

Spending limit exceeded in a processInvoice() method

I seems to me right now that this is the way to go. Basically, throw checked if the caller can and should do something about it, otherwise throw unchecked.

Wednesday, August 10, 2005

Looking at Spring

I have found that I can no longer resist the Spring Framework. Having been beguiled by its popularity and intrigued by its principals, I have decided to spend some time checking it out. The following chronicles my findings.

First, I am really interested in some of the underlying design goals, for which I turn to Chapter 4 of Rob's book, at the ServerSide. Spring aside, this is just a great essay on OO design.

So far I am impressed. Dependency Injection is just too sensible, and makes TDD much more practical.

To Be Continued...

Monday, August 08, 2005

Shameless Promotion 3: John in a Nutshell

I am a software development expert who can contribute directly to successful application development, and also make broader contributions to an organization's success:

  • I know how to develop software with maximum value for any timeframe and budget.
  • I am a versatile professional who can fulfill many roles... roles often requiring several resources.
  • I am a highly productive contributor, I can get solutions done quickly.
I have top notch software development skills--coding expertise in Java and experience in C, Perl, VB, and Ruby; architecture, analysis, and design skills; and competence with a host of acronyms (UML, J2EE, SOAP, SQL, TDD, Ajax etc.)

Hands-on development is my foundation, but I have also worked hard to hone strong business skills: I have an MBA, several years of line and technical project management experience, and polished communication skills. I have led technical teams of 10 people, departments of around 20, and have countless hours interacting with Clients at all levels.

Encompassing both my technical and business skill sets is an overarching expertise in software development. This expertise is what enables me to deliver maximum value for any timeframe and budget. My unique combination of skills allows me to add strategic thinking and decision-making on top of a concrete, in-depth understanding of technology. This combination is also what enables me to fulfill so many roles; from developer to architect to resource manager and more.

My Resume and generic Cover Letter describe my skills in much more detail.

In terms of full-time positions, my mix of skills probably best matches a Principal Engineer, Architect, or Lead role with a small software company or consultancy. I am also very open to freelance work, where I can deliver on projects of all sizes. On top of software design and development, I can fulfill many of the crucial needs of a successful project:
Planning, staffing, defining team structure and roles, scoping, defining development process and tools, prototyping, and architecture.

As a consultant, I must always keep an eye out for the next gig. I'd love to discuss potential opportunities, whether in the planning stage or thereafter, Lead, freelancer, or other key role. If you are interested in someone like me, drop me a line.

- John Troxel

Denver, Colorado

jtroxel@yahoo.com

Shameless Promotion 2: John's Resume

John D. Troxel
Wheat Ridge, CO  ||  303.667.3280  ||   johntrox@gmail.com  ||  codecraftblog.com
Objectives
Opportunities to help companies outperform their competition with pragmatic software solutions.
To leverage my unique software engineering expertise and deliver effective solutions.
To provide the leadership in analysis, architecture, design, and engineering necessary to successfully launch and scale software products.
Skills Summary
  • BS Computer Science, MBA / MIS with over 20 years of software development experience, specializing in Web-based applications
  • Programming: Java, Javascript, Groovy, Ruby, C, Perl, JSP, Visual Basic, Python, Rails, Grails, AJAX, Spring, Maven, MySql, Oracle, MongoDB, Memcached, JBoss, Tomcat, Node.js
  • Software engineering methodologies, processes, and tools: UML, Requirements Analysis and Management, Agile methods, Unified Process (RUP). Object design (OOAD), system and software architecture, Open Source, SCEA, SCJP, Rational Certified Consultant RUP/OOAD
  • Technical line and project management, organization design, team mentoring
Professional Experience

Freelance Software Developer and Architect -- August 2012 - Present

codecraft solutions LLC, Denver

  • Execute custom design and development, Ruby, Groovy, Java, Javascript, and .Net
  • Conduct software refactoring and system architecture improvements enabling better scale.
  • Design and build mobile and single page apps using AngularJ, Ionic, and other JavaScript libraries.
  • Grails framework customization, data import processing, ecommerce web UI
  • Worked with clients including haughtcodeworks.com, The Trade Desk, and Deem.com

Senior Software Engineer -- September 2015 - June 2016

Reach150 Social, Los Altos
  • Primary architect and developer for new hybrid mobile application
  • Built platform and features using AngularJS, Ionic, Java, and Node.js tools
  • Enhanced service API using Java, RESTEasy, and Spring tools

Partner & Senior Developer -- April 2015 - September 2015

Forefront Labs, Denver/Lincoln
  • Partner and Sr. Consultant, developing custom applications
  • Specialized in Rails, mobile, and customer engagement

    Software Consultant -- July 2013 - March 2015

    Flickr/Yahoo, San Francisco
    • Refactored core Java middleware components for increased stability and maintainability
    • Revamped entire caching infrastructure: implemented Twitter twemproxy as a key platform component and integrated across hundreds of PHP and Java hosts
    • Enhanced the continuous delivery process spanning several technologies including Python, Perl, and PHP

    Principal Software Engineer -- March 2011 – July 2012

    Rearden Commerce, Foster City, California
    • Key architect and developer for content integration tools using Spring Batch, Camel, and custom tools.
    • Lead developer for a custom content curation system in Grails.

    Senior Software Engineer -- January 2008 – March 2011

    • Senior contributor to common Ajax and UI components.
    • Developed Endeca faceted search applications and data-processing tools.
    • Enhanced in-house MVC framework using Javascript and Java.
    • Contributed to design and development of new UI framework using Spring MVC.

    Freelance Software Developer & Architect -- June 2006 – December 2008

    • Lead all development efforts for BuyBak.com--an eCommerce startup providing reverse logistics capabilities--using Java, Struts, Spring, iBatis, Grails, as well as Ruby and MySQL.
    • Developed the system architecture and design (UML domain model, site map, etc.) for start-up healthcare service.
    • Developed Ruby on Rails, Javascript, and Java code to create a digital video system inside a Web-based, Ajax-style email system (Zimbra).

    Sr. Software Engineer -- March 2005 – June 2006

    McKesson (System Engineering Services), Denver, Colorado
    Java software design and development for mission critical applications.
    • Development key internal application using Java, Tomcat, XSLT, and AJAX
    • Development of all Web Service interfaces to the core system using JbossWS
    • Development of core components using JMX on JBoss

    Sr. Java Developer; Sr. Systems Analyst -- March 2004 – March 2005

    Veteran’s Administration (Express Management Solutions), Denver, Colorado
    Major contributor to critical systems development for the Health care Administration Center.
    • Leading establishment of System Analysis discipline and spearheading analysis of major initiative
    • Key team contributor for software architecture and programming for Oracle 9i and STRUTS

    Developer; Product Manager -- June 2002 – March 2004

    Grizella Corporation, Lakewood, Colorado
    Developer of Web-based products for a Transportation software company.
    • Architecture and programming for service-oriented system using Tomcat/Java Servlets/JSP
    • Developed an e-commerce ordering application with a credit card gateway interface
    • Created Web application to effectively utilize resources for a major Trucking association
    • Created a Web UI framework (MVC) for rapid development of Web-based services
    Technical Consultant -- February 2001 – May 2002
    Experio Solutions, Denver, Colorado
    Manager of technical project teams.
    • Project Manager for a critical process re-engineering of the IT department of a major utility
    • Developed components and workflows for a business service model using SeeBeyond
    • Contributed to J2EE and Enterprise Application Integration interest groups
    • Attended TIBCO training and maintained a Web-based InConcert demo
    Operations Director; Process Improvement Lead -- June 1998 – January 2001
    iXL, Denver, Colorado
    Various Management roles for Denver office of iXL.
    • Managed departments of up to 18 reports: Technical Services, Quality Services, Requirements Management
    • Successfully implemented improved Requirements Management and Change Request Management processes as Chair of Denver office best practices taskforce
    • Defined the corporate methodology framework utilizing RUP principles as key member of Corporate Methodology Team
    • Provided guidance to teams on program and project best practices
    Technical Director; Technical Lead -- October 1998 – June 2000
    iXL, Denver, Colorado
    Leader of technical development group for a top Internet-based business solutions company.
    • Managed technical teams of up to 10 developers, from requirements through deployment, for Budget Rent-a-Car, National Processing Corporation, and American Water Works Association
    • Lead Architect and Developer for ServletExec/NES/Oracle and IIS/SQL Server/ASP projects
    • Created and managed Technical Requirements and Architecture documents using Use-case specifications and realizations, sequence diagrams, and Deployment diagrams
    • Technical Project Management and primary technical interface with high-level Client management and vendor partners
    Director, Engineering Services -- August 1996 – June 1998
    iXL (Green Room Productions), Sausalito, California
    Leader of Web application development for a successful Web development company.
    • Established and managed the Engineering Services team, that grew to 17 employees
    • Internet application projects for travel clients including Sheraton Hotels, Walt Disney World, Travelocity, Mountain Travel Sobek, and Abercrombie and Kent
    • Developed interactive Web applications using Perl, Server-Side JavaScript (SSJS), Oracle, ASP, and MS SQL Server
    • Led development of Web-based Workflow system, including project, assignment, and hours tracking
    Systems Engineer (Part Time) -- May 1995 – March 1996
    Visual Movement Corporation, Denver, Colorado
    Internship with a software development team specializing in the transportation industry.
    • Technology selection and market research, implementation of installation utility in Visual Basic
    Associate Engineer -- June 1991 – August 1994
    Cooper & Chyan Technology, Inc., Cupertino, California
    Integral member of software engineering team for a start-up CAD software company.
    • Directed the design and content of a successful new GUI for an advanced CAD system
    • Maintained and enhanced a run-time graphics library using C, Motif, and X-Windows. This library was used to build the GUI listed above
    Education
    MBA / MIS. University of Denver (Daniels College of Business) June 1996
    · GPA: 3.51 / 4.00
    · Member of Information Technology Association and charter member of Toastmasters
    B.S. Computer Science. Colorado State University May 1991
    · Active member of Sigma Alpha Epsilon Fraternity. Vice President, Alumni Chairman
    Certifications
    · Sun Certified Enterprise Architect for J2EE, November 2003
    · Sun Certified Java Programmer, December 2001
    · Rational Certified Consultant in RUP and OOAD, March 2002

    Shameless Promotion 1: John's "Cover Letter"

    I am a professional software engineer and manager, and my expertise in software development can improve the success of software projects. I have over 11 years experience in software development as a leader and a key contributor in several roles.

    I am a leader who can code, and a developer who can manage people and projects. I believe I have a truly unique breadth of skills that make me an indispensable asset to software development projects:

    • Technical lead, architect, and developer on dozens of projects, including large engagements for clients like Sheraton Hotels, Travelocity, Budget Rent-A-Car, and the Veteran's Administration
    • Sun Certified Architect for J2EE
    • Programming experience in Java (4 years), C (3), VB/ASP (3), and Perl (2)
    • Sun Certified Java Programmer
    • Effective, hands-on skills as a software engineer, architect, and business/systems analyst
    • Several years of experience as an engineering line manager and as a technical project manager
    • Rational Certified Consultant in RUP and OOAD
    • MBA and a Bachelor's in Computer Science

    Please let me know if you would like a current resume, or to discuss how I can help you to succeed. Sincerely,

    John Troxel

    303.667.3280

    jtroxel@yahoo.com

    Thursday, July 28, 2005

    Unit Testing Thoughts

    In no particular order and with absolutely no structure, some thoughts on unit testing:

    • In order to properly unit test, your design must properly seperate concerns. This means that true business logic should be decoupled from specific APIs, conventions, and protocols... and these from eachother. For example, you shouldn't have the following mixed into business logic: SQL statements, JDBC calls, J2EE API objects, etc.
    • There is a spectrum from "pure" unit testing to complete integration testing, something like:
    1. (Pure) Unit Tests: Have no dependencies and no side effects: test constructors, accessors, comparisons, algorithms. Generally this consists of a single client, the test class, and a single class under test. Developed by developers for developers.
    2. Partial Integration / Integration Boundary Tests? Tests integration between layers, components, or technologies. Where possible, tests should focus on a single boundary, e.g. data access code <-> Database, SOAP Client code <-> SOAP Service, etc. Code that has dependencies on other APIs should use mock objects or some sort of debug-dummy mode. For the debug mode strategy, the property could be "injected" by the runtime invironment with a settor or a special constructor. These tests are also by developers for developers.
    3. Full Integration / System Tests? These test a path through the system that provides verification of some subset of requirements. These tests can be employed by developers, using tools like HTTPUnit. They can also be maintained by testers or properly trained business experts, using functional test automation tools.

    Many automated tests, including some unit tests, have side effects on the data that can mess up other tests. For example, tests may rely on a pre-condition state of the database to succeed, and manual testing can be maddening if the data is changing underneath you. Either all tests must mutate data completely independent of any other test or user, or the database must be restored to a consistent state before testing (which still might mess up other testers). Some strategies for managing this situation include:

    • Complete database restore, in an isolated database or schema. E.g. SQL DDL scripts, dbUnit scripts, or programmatically. If the developer's database is a different technology or version from production, this introduces the challenge of maintaining a restore capability for two technologies, as well as potential bugs caused by differences in the production database. To test for problems caused by a different technology in production, the team could use a shared database instance specifically for periodic execution of all unit tests. You could also have multiple levels of restore, e.g. a bare bones one for unit testing, one that adds reference data, and one that puts some example data in for manual testing. I like the idea of using Hibernate (or something similar) to abstract the db technology, using HSQL (or similar) locally, and providing utility methods to add in the required data.
    • Transactions / rollback? This implies that data access code must have mechanisms for using injected transactions, managed by the test code, and/or skipping commits in test mode. Add setAutoCommit, commit, rollback to DAO API?
    • Have each test clean up it's data. This requires that 1) all data created can be identified or tracked by the test, and 2) that the database allows the proper permissions to delete data.

    To Be Continued...

    Tuesday, July 26, 2005

    Qualifying the "Simplest Thing" rule

    In XP, and Agile methods, decisions are often made with the criteria of "the simplest thing that could possibly work." I think this applies not only to code construction and detailed design decisions, but to Architecture as well. Strict use of this rule will almost always result in the most prudent approach, but I do think there are a couple of caveats:
    1. The decision should still be reversible, so that you don't paint yourself into a corner for future changes in the requirements.
    2. The simplicity should be weighed carefully against the flexibility and the cost of changing later. If the simplest solution costs 20% less now, but will likely cost 30% more over time, then it may not be the best choice. You have to decide how likely likely is.

    I would stress that even with these caveats, one should still be very careful breaking the rule. If you don't have a strong case for a very real risk of ir-reversibility problems or future costs, you should just stick with the simplest solution.

    Friday, July 08, 2005

    JBoss CMP versus Hibernate

    UPDATE 07/26/05
    I stuck with Hibernate. Very simply put, they both have many of the same benefits--declarative programming, transactions, etc. But EJB introduces a whole layer of overhead realted to remote access. Unless you are doing a true N-tier, highly distributed application, I don't think that overhead is warranted.
    =======

    I am starting to look at a persistence technologies for an application I am working on in JBoss 4.0.2. I am currently looking at the (built in) Hibernate in JBoss versus CMP. SO far I am just kicking the tires, gathering info. If you come across this, please feel free to comment.

    Harshad Oak has a posting on the topic with comments.

    Right now, I can't see any reason why not to use Hibernate: I can use pojos, but still get transactions. I don't see the benefit of creating EJBs for every entity we need to persist.

    Thursday, May 05, 2005

    UML: Labels versus Stereotypes for Associations and Dependencies

    I think I am clear on what to use where for Associations: The label is very specific, identifying the association or relationship between the two specific nodes. A stereotype doesn't normally make sense for associations, since it identifies a kind of association. Examples I have seem is <<include>> for use cases, and identification of the protocol for component associations.

    For Dependencies: A label often does not make sense, since the relationship is always "depends on." A stereotype further defines the nature of the dependency.

    Good UML Links

    I really like Scott Ambler's stuff at: http://www.agilemodeling.com/style/

    This looks like a solid overview: http://www.vico.org/UML_FAQ_jGuru.pdf

    Looks interesting: http://www-inf.int-evry.fr/COURS/UML/semantics/

    And of course: http://www.uml.org/#UML2.0

    Hmmm: http://www.holub.com/goodies/uml/

    Wednesday, May 04, 2005

    Thoughts on Requirements Terminology

    It occurred to me a while back that there are two distinct categories of requirements: Those that are deemed necessary and can be categorically verified, and those that are more lofty and more difficult to test.

    I suggest that the first set are called Imperative Requirements, or simply requirements. These are binary in nature, either they make it into the system or they don't--a test case can be written that will pass or fail. Use cases and functional requirements fall into this category, as well as performance, reliability, security, and perhaps other non-functional areas as well.

    The second category, which I'll call Non-Imperative Requirements (or maybe just Qualities), are different. They can not be tested or verified in any straight forward way, but rather are qualities to shoot for. Scalability, maintainability, useability, and ease-of-development, for example, fall into this category. These Qualities are better expressed as goals with relative importance. Those less verifiable, these need not be completely useless. Qualities can be expressed with relative importance weights, and still traced with a correlation matrix.

    In future posts, I plan on fleshing out my idea of a requirements model, especially regarding how requirements should be systematically addressed in architecture.

    Thursday, April 21, 2005

    If you ever get a java.lang.NoClassDefFoundError at runtime, and you are certain the class identified is in your classpath, take a look at the inheritence hierarchy. The java.lang.ClassLoader will identify the child, even if it is a parent who is missing. At least that is what happened to me.

    Friday, March 25, 2005

    JBoss EJB Security

    In addition to the well-documented steps for securing EJBs, configuring in JBoss has some potential issues. Setting up an authentication policy requires editing some JBoss-specific files:

    conf/login-config.xml:
    <application-policy name="policy-name">
    <authentication>
    <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="optional">
    <module-option name="unauthenticatedIdentity">anonymous</module-option>
    </login-module>
    </authentication>
    </application-policy>


    META-INF/jboss.xml:
    <jboss>
    <security-domain>java:/jaas/policy-name</security-domain>
    ...

    If you set up a policy like this, you apparently must establish a method-permission in ejb-jar.xml for every method (or *) of every bean. Misnaming a method, or trying to do a partial wildcard (get*, can't do that), gives an error:

    Insufficient method permissions, principal=user, ejbName=Bean, method=method, interface=SERVICE_ENDPOINT, requiredRoles=[], principalRoles=[user-role1, user-role2]