We are building a web based application that allows Construction Project Managers to track tasks and the number of hours spent on each task, their costs, materials and equipment.
Currently, they are using a legacy Powerbuilder application along with emails and spreadsheets to track their progress. With this project, we are seeking to modernize this by building a HTML5 based application.
In this challenge we need to create a backend service which will be called by the front-end, to allow the user to download an Excel Workbook of data. We need your help!!
Produce a new controller 'export.js' with a function for exporting a multi-tabbed Excel Workbook as described below. An example of the desired output is provided in the forums. The route which will call this function will be "GET /export/excel/schedules/:projnum/schedule_types/:schdtype/rev/:rev". When this request is made, the user's browser will prompt them to save the Excel file.
The Excel Workbook will contain 5 tabs of data, all data is available through existing API calls in the application. Each sheet (tab) will have some "fixed" data and some data returned by the API. The example workbook has some colored shadding to demonstrate different areas of the sheet - but no shading is needed in the output produced by this challenge. The workbook consists of a summary of data for a specific "schedule" and all of it's associated parts (schedule, materials, equipment, and remarks). Details of the workbook will be provided in a document attached in the forums.
- Only very basic formatting is required
- Match the column widths shown in the example spreadsheet
- Use 'bold' where bold is used in the example
- Match the cell format "type" (for example, use the same date format as used in the example)
- No foreground or background coloring needed
- This service needs excellent documentation inline as there will likely be followup challenges expanding it
- Please use any 3rd party node libraries desired to achieve this, provided they are free for enterprise use
- Minimize the number of total API calls, don't repeat calls
- Example Excel Workbook with the tabs / worksheets in the desired format
- Document detailing the Workbook (attached in the Forums)
- Project code base (provided in the forums)
- This will contain the existing node application as well as a copy of the test database
- API blueprint - http://docs.webcs.apiary.io
- The blueprint is also included in the test_files directory of the code base
- Postman export for API testing (included in the test_files directory of the code base)
The recommended environment for this challenge is Windows 7 or above with .NET 4.5.2. Windows is needed becase the code base makes use of edge.js to wrap some .NET database calls. Several other configurations will work as well, but if you don't already have an environment, this will probably be the fastest setup. It is recommended that you also setup the test database for full functionality. This can be done by installing SQL Server 2012 Express (or 2008) and restoring the databse backup from test_files/db.zip located in the code base. Please see docs/Deployment_Guide.doc for further details and ask any questions on this in the forums.
Final Submission Guidelines
- Fully tested export.js ready to drop in place, providing the Excel export functionality (all 5 worksheet must be fully represented and named correctly in the Workbook)
- Code must be clean (no non-applicable comments, unused variables etc), tidy (consistent indents)
- Clear and purposeful naming for variables, classes etc.
- We need exceptional inline documentation on this challenge as it's likely to be expanded in the future