
While developing Collective Congress over the past year, I faced many tough design decisions. It took me multiple iterations, sometimes with nearly complete re-writes of the code, to get it right (or as right as I can make it).
There is a trade-off between
simplicity and
extensibility that must be weighed when designing a large software system. Solving a problem in a generalized way often requires more code, but it's worth it if you expect to run into that same problem again in the future. In developing Collective Congress, I have (for better or for worse) leaned in the direction of extensibility over simplicity. This is partly due to the nature of the particular problem we are trying to solve, and partly due to the value solving the problem in a general way.
Developing with this philosophy has produced, in addition to a prototype of Collective Congress, a reusable web development framework built on top of Google Web Toolkit. I've named this framework
Burocrat, because it mainly functions to manage the data and client-server communication of a GWT app. It also includes custom GWT widgets for data entry forms, lists, a debug terminal, etc.
Features can be tested at
http://cc-burocrat.appspot.com/
If anyone is interested in contributing to Burocrat (or Collective Congress), please email us at
colcongress@gmail.com.
Below is a more detailed description copied from Burocrat's
GitHub page:
Burocrat does all the boring stuff for you!
The system is based on three key concepts:
- All data is structured in the form of maps (sets of key-value pairs)
- Maps can be represented as and parsed from strings in any appropriate format
- Client-server communication is implemented with the command pattern (passing strings back and forth)
Features include:
- Model code that can be referenced by both client and server code
- Command line interface for client-server communication
- Data storage via the GWT Datastore
- Logging of all user activity
- Notification system for user alerts (emails, etc.)
- Data encryption via Jasypt (http://www.jasypt.org/)
- Custom GWT Widgets
- Data entry forms, with validation and configurable form logic
- Data display lists, with pagination and sorting
- Debug terminal for testing server commands
To develop a web application with Burocrat:
- Define the model in plain Java code
- Argument definitions
- Item type definitions
- Command definitions
- Implement the server
- Argument implementations
- Item type implementations
- Command implementations
- Implement the client
- Page implementations
- Item page implementations
- CSS and images