Our first sprint began with what I’m going to be calling “Project Shylock” that we are making for *******.
I am leading a passionate team of 3 other UI/UX developers who are all trying to make to best possible website that time will allow. The emphasis is particularly on “time will allow“.
Our organization is now known to us to as a place that will not give us realistic time to complete a project. So at some point, time will run out and we will have to make a decision on whether best practice continues, or we deliver all our required functionality.
Time will tell.
Our team’s goal for this project is:
- To deliver code that we will be proud of in two years time
- To use technology that will help, make sense, not just to look good on a resume
- To be able to handover completed code that will make sense to a future UI developer who may have to maintain it.
Technology and Methodology
- Sass style sheets
- Sass is fucking cool.
- .scss format is backwards compatible with regular .css
- Allows us to create style module files
- Re-usable variables
- Can comment with // (seriously, this may be the best thing about Sass!)
- NOT using Coffeescript
- Harder to handover to a fresh developer
- Feels backwards to use a language that turns into another language
- Mocking data with Mockjax
- Mocking allows us to develop without having to wait for the backend Java developers (referred to as Backend or BE) to write a service to connect to
- Allows us to give an example to BE to demonstrate the desired data contract
- We can re-use the mock in a unit test
- Object Oriented CSS
- All styles are defined by classes.
- No objects have their own style. They use a styles from a set of rules to display themselves
- Close-to-zero page specific css rules
- Style rules dictates page layout, not the other way around
- Unit testing with QUnit
- Will initially be avoiding Test Driven Development, as this approach require heavy pre-planning of design, and our delivery structure doesn’t allow for that.
- We will be writing unit tests after our functionality is written
- Using Mockjax to simulate AJAX transactions
- Unit tests will be reviewed in Code Reviews
- We will use an automated test runner to execute our unit tests on a frequent schedule
- Code Reviews
- Code reviews are the best way to improve code quality as well as to cross-train team members of other’s functionality
- The only two times a code review won’t be required is for a basic copy text change or when development was performed as part of Paired Programming
- Code reviews will include copy text and localization (l10n)
- Code reviews will include unit tests
- Paired Programming
- There is no requirement for Paired Programming, but if a developer is unsure of the best way to do something or is having difficulty fixing a problem, then why not grab a buddy and work on it together! It’s fun! 🙂
- If you pair program something, then you don’t have to do an additional Code Review!
- Localization (l10n)
- Currently the project users don’t need a second language supported, but it will be used in multiple countries and they cannot 100% rule out that it will ALWAYS be in one language (en-US)
- Adding l10n once the project is completed is a special punishment reserved for those who spit gum on the street, play techno in apartments at night, or mistreat animals. If there is a chance it will be needed, we will add it to our project from the ground floor.
- l10n libraries will be minimalist to invoke, have helper classes and try and avoid getting in the way of development
- Copy Text will be organized into property files based on culture, and internally will be grouped into namespaces
- Using jQuery because it makes everything easy and predictable
- All code will be enclosed in function encapsulation
- Functions will be broken into logical modules
- Common modules will be included in each page with a JSP include, so that when we are ready to combine and gzip them, it will be in one place only
- Functions will be written with Injection Dependency in mind. Core functionality will take parameters for UI objects and data, so that they are easier to write unit tests for.
- Using FooTable to handle responsive table layout
- Using Sass media directives to handle different viewport sizes
- Using a percentage-based grid layout to simplify structure and flow
- Agile Scrum
- Everyone says they are doing Agile Scrum, but we really are.
- If it’s not in JIRA, being tracked in our current sprint, then it’s not getting done
- Do not maintain your own personal “secret list” of things you have to get done. If you keep that list, be willing to work on that list in your own time on the weekend.
- Be transparent, put everything substantial into JIRA as a task so we can see what we can fit into a sprint
- All tasks in the current sprint to have story points.
- Use story point poker cards or shirt sizes to estimate all projects. Have multiple short rounds of estimates and discussions if you cannot agree initially on points
- Mustache.js HTML Templating
- Mustache allows only template defined control blocks which makes templates easier to read
- No-code templates promotes MVC architecture
- MVC (Model-View-Controller) Application Design
- The UI layer is broken into 3 sections, Controllers, Models & Views
- Models – Our JSON objects that we receive from our AJAX calls
- Views – Using Mustache.js templates, we render business-logic-less localized templates
There is almost certainly more stuff we have decided on, and as I remember them I will add them to this list. Additionally, I will try to report back on what decisions worked, and which ones didn’t. I just hope we have enough time to get it done right.